Lease templates

Create a lease template (multipart)

Creates a lease template by uploading the PDF in one multipart request. Kept for older integrations; new work should request an upload session and then create the template by its session id.

Request an upload session, upload the PDF there, then create the template with the JSON 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

multipart/form-data

filefilerequired

The template PDF. Must not be empty.

leaseTemplateCategoryIdstringrequired

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

namestringrequired

Template name.

descriptionstring

What the template is for.

typeenum<string>

What the template is used for. Defaults to lease.

leaseleaseRenewallateRentNoticeevictionsignatureOnlyinformation

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 · No file was sent, or the file was empty.

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

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