Connected accounts

Start a connected account document upload

Reserves a slot for one supporting document and returns a pre-signed URL to upload the file to. You upload the bytes to that URL yourself, then quote the returned sessionId in the documents array when you request a connected account.

POST
https://services.magicdoor.com/payments/company-portal/accounts/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.

Body

application/json

What you are about to upload. The file itself is not sent here.

fileNamestringrequired

The file's name, between 1 and 250 characters. It is kept as the stored file's name.

fileSizeintegerrequired

The file's size in bytes. At least 1 and at most 20971520 (20 MB).

contentTypestringrequired

The file's MIME type, between 1 and 200 characters. Must be application/pdf or match image/*.

Response

200 · The reserved upload slot.

sessionIdstringrequired

The upload session. Quote it as documents[].uploadSessionId when you request a connected account. A Snowflake id, sent as a decimal string.

endpointstringrequired

The pre-signed URL to send the file to.

methodstringrequired

The HTTP method to use against endpoint, for example POST or PUT.

fieldsobjectrequired

Form fields the storage provider requires alongside the file. Send every one of them, names and values unchanged. The set is provider-specific — do not interpret it.

expiresstring · date-timerequired

When the slot stops accepting the upload, in the company's timezone and without an offset.

400 · The file name, size, or MIME type is missing or out of range — a size below 1 byte or above 20 MB, or a type that is neither `application/pdf` nor `image/*`.

401 · The request carried no valid access token.

403 · The token is not a property manager token.

  1. Reserve the slot

    Call this endpoint with the file's name, size in bytes, and MIME type. It answers with endpoint, method, fields, and a sessionId.

  2. Upload the bytes

    Send the file to endpoint using the HTTP method named in method, including every name and value in fields as form fields alongside the file. That request goes to the storage provider, not to MagicDoor, and carries no MagicDoor access token.

  3. Attach it

    Pass the sessionId as a documents[].uploadSessionId on Request a connected account. Nothing is kept until that call succeeds, and an unused session expires on its own.

What may be uploaded

A connected account document must be a PDF or an image — the accepted MIME types are application/pdf and anything matching image/* — and at most 20 MB. A fileSize or contentType outside those limits is rejected with 400 before any slot is reserved.