Lease templates

Create a lease template

Creates a lease template from a PDF you have already uploaded. The uploadSessionId comes from the template upload-session endpoint; place the signer slots and boxes afterwards with the update endpoint.

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

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

leaseTemplateCategoryIdstringrequired

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

namestringrequired

Template name. 1 to 150 characters.

uploadSessionIdstringrequired

The upload session the PDF was sent to. A Snowflake id, sent as a decimal string.

descriptionstring

What the template is for. Up to 1000 characters.

typeenum<string>

What the template is used for. Defaults to lease.

default: leaseleaseleaseRenewallateRentNoticeevictionsignatureOnlyinformation

Response

200 · The template that was created.

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 lease template category or upload session matched the id, or it belongs to another company.