Lease templates

Copy a lease template

Makes a copy of an existing template — including MagicDoor's built-in ones — under a new name and category, so you can edit it without touching the original.

POST
https://api.portal.magicdoor.com/company-app/lease-templates/copy

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Body

application/json

fromLeaseTemplateIdstringrequired

The template to copy. A Snowflake id, sent as a decimal string.

leaseTemplateCategoryIdstringrequired

The category to put the copy in. A Snowflake id, sent as a decimal string.

namestringrequired

Name for the copy. 1 to 150 characters.

descriptionstring

Description for the copy. Up to 1000 characters.

Response

200 · The new template.

idstring

Id of the template. A Snowflake id, sent as a decimal string.

leaseTemplateCategoryIdstring

The category the template sits in. A Snowflake id, sent as a decimal string.

namestring

Template name.

descriptionstring

What the template is for.

typeenum<string>

What the template is used for: a lease, a leaseRenewal, a lateRentNotice, an eviction notice, a signatureOnly page, or an information sheet.

leaseleaseRenewallateRentNoticeevictionsignatureOnlyinformation
isDefaultboolean

True for MagicDoor's built-in templates, false for ones the company added.

signersLeaseTemplateSigner[]

The signer slots defined on the template.

annotationsLeaseDocumentAnnotation[]

The boxes placed on the template's PDF.

fileobject

The template's stored PDF.

fileIdstringdeprecated

Use file.id.

fileNamestringdeprecated

Use file.name.

fileExtensionstringdeprecated

Use file.extension.

signedUrlstringdeprecated

Use file.secureUrl.raw.

contentTypestringdeprecated

Use file.contentType.

fileSizeintegerdeprecated

Use file.size.

400 · The request failed validation. `errors` maps each field name to what was wrong with it.

401 · The access token is missing, expired, or not for this company.

404 · No source template or category matched the id, or it belongs to another company.