Property managers

Create a property manager custom field upload session

Reserves an upload slot for a file that will become the value of a file-typed custom field on this property manager. Upload the file to the returned target, then pass the session id to set a property manager custom field value.

POST
https://api.portal.magicdoor.com/company-app/property-managers/{propertyManagerId}/custom-fields/{customFieldId}/upload-sessions

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

propertyManagerIdstringrequired

The property manager whose custom fields you are working with. A Snowflake id, sent as a decimal string.

example: 1830472847398404098
customFieldIdstringrequired

The custom field definition. A Snowflake id, sent as a decimal string.

example: 1830472847398404200

Body

application/json

Describe the file you are about to upload. Custom field files may be up to 100 MB and must be an image or a PDF.

fileNamestringrequired

Name of the file you are about to upload. 1 to 250 characters.

example: insurance-certificate.pdf
fileSizeintegerrequired

Size of the file in bytes. Must be at least 1.

example: 184320
contentTypestringrequired

MIME type of the file. 1 to 200 characters.

example: application/pdf

Response

200 · Where and how to upload the file.

sessionIdstring

Id of the upload session. Send it back in the follow-up call that attaches the file.

endpointstring

Absolute URL to upload the file to.

methodstring

HTTP method to use for the upload, for example POST.

fieldsobject

Form fields the storage provider requires. Send every key and value exactly as given, as multipart/form-data, with the file itself last.

expiresstring · date-time

When the session stops accepting the upload.

401 · The access token is missing, expired, or does not belong to a property manager.

404 · No custom field with that id exists for the calling company. A record that belongs to another company is reported the same way as one that does not exist. The id you asked for is in `entityId`; `detail` names only the kind of record.

The session response tells you the endpoint, the method, and a set of fields. Send every one of those fields, unchanged, as multipart/form-data, with the file itself as the last part. The session expires at expires; after that you have to ask for a new one.

The file is not attached to the custom field until you call the set endpoint with its session id.