Leases

Rename a lease file

Changes the display name and description of a file already attached to the lease. It does not replace the file's contents — attach a new file for that.

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

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 the file is attached to. A Snowflake id, sent as a decimal string.

example: 1830472847398404096
fileAttachmentIdstringrequired

The attachment to change, from the list-files response. A Snowflake id, sent as a decimal string.

example: 1838475620198404096

Body

application/json

fileNamestringrequired

New display name. 1 to 250 characters.

descriptionstring

New note about the file. 1 to 1000 characters.

Response

200 · The updated attachment.

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.

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 file attachment on this lease matched the id, or it belongs to another company.