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.
Authorization
AuthorizationstringrequiredBody
application/json
What you are about to upload. The file itself is not sent here.
fileNamestringrequiredThe file's name, between 1 and 250 characters. It is kept as the stored file's name.
fileSizeintegerrequiredThe file's size in bytes. At least 1 and at most 20971520 (20 MB).
contentTypestringrequiredThe file's MIME type, between 1 and 200 characters. Must be application/pdf or match image/*.
Response
200 · The reserved upload slot.
sessionIdstringrequiredThe upload session. Quote it as documents[].uploadSessionId when you request a connected account. A Snowflake id, sent as a decimal string.
endpointstringrequiredThe pre-signed URL to send the file to.
methodstringrequiredThe HTTP method to use against endpoint, for example POST or PUT.
fieldsobjectrequiredForm 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-timerequiredWhen 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.
- Reserve the slot
Call this endpoint with the file's name, size in bytes, and MIME type. It answers with
endpoint,method,fields, and asessionId. - Upload the bytes
Send the file to
endpointusing the HTTP method named inmethod, including every name and value infieldsas form fields alongside the file. That request goes to the storage provider, not to MagicDoor, and carries no MagicDoor access token. - Attach it
Pass the
sessionIdas adocuments[].uploadSessionIdon Request a connected account. Nothing is kept until that call succeeds, and an unused session expires on its own.
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.