Leases

List a lease's files

Returns every file attached to the lease, each with the stored file record and who uploaded it.

GET
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/files

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.

Path parameters

leaseIdstringrequired

The lease whose files you want. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Response

200 · The files attached to the lease.

idstring

Id of the attachment. Use this to update or remove it. A Snowflake id, sent as a decimal string.

fileNamestring

Display name of the attachment.

descriptionstring

Note about the file.

createdstring · date-time

When the file was attached, in the company's timezone.

uploaderNamestring

Name of whoever uploaded it.

uploaderTypestring

What kind of user uploaded it, for example PropertyManager.

shareTypesstring[]

Who outside the company portal can see it.

relationTypeenum<string>

What the file is attached to. Always lease here.

lease
relationIdstring

Id of the thing it is attached to. A Snowflake id, sent as a decimal string.

fileobject

The stored file.

fileIdstringdeprecated

Use file.id.

fileUrlstringdeprecated

Use file.secureUrl.raw.

fileThumbUrlstringdeprecated

Use file.secureUrl.variantTemplate.

fileSizeBytesintegerdeprecated

Use file.size.

propertyIdstringdeprecated

Use relationId with relationType.

leaseIdstringdeprecated

Use relationId with relationType.

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

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