Bank accounts (Portal)

Request a bank statement upload session

Asks for a one-time upload slot for a bank statement belonging to this account. Upload the file to the returned endpoint, then pass the session id to the connect endpoint as statementUploadSessionIds. Statements may be images or PDFs of up to 20 MB.

POST
https://api.portal.magicdoor.com/company-app/bank-accounts/{bankAccountId}/connections/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

bankAccountIdstringrequired

The bank account the statement belongs to. A Snowflake id sent as a decimal string.

example: 1801556677120004096

Body

application/json

fileNamestringrequired

The name to store the statement under. 1 to 250 characters.

fileSizeintegerrequired

The size of the file in bytes. Statements are limited to 20 MB.

contentTypestringrequired

The file's media type. Statements must be an image type or application/pdf.

Response

200 · The upload slot. Post the file to `endpoint` with `method`, including every entry in `fields` as a form field, before the session expires.

sessionIdstring

The session. Pass it to the connect endpoint as one of statementUploadSessionIds once the file has been uploaded.

endpointstring

The URL to upload the file to.

methodstring

The HTTP method to upload with.

fieldsobject

Form fields that must accompany the upload, as a name-to-value map. Send them exactly as given.

expiresstring · date-time

When the slot stops accepting the upload, in the company's timezone.

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

404 · No bank account with that id exists for the caller's company. One belonging to another company reads the same way.