Upload an attachment
OAuth scope: attachment.write
Uploads a single attachment (JPEG, PNG or PDF).
This operation will enable you to link the uploaded attachement to an external transfer (through POST /v2/external_transfers or POST /v2/external_transfers/checkout).
In the Qonto app, attachments are files uploaded onto transactions by users. Attachments typically correspond to the invoice or receipt, and are used to justify the transactions from a bookkeeping standpoint.
Authorizations
Bearer authorization header: Bearer <token>
, where <token>
is the access token received from the authorization server at the end of the OAuth 2.0 flow.
Headers
This endpoint supports idempotency for safely retrying requests without accidentally performing the same operation twice.
"4668aec5-4e9c-4a41-b6d1-fc3c13c70dd5"
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Body
You have to specify multipart form data in order to attach the file to the request. When using curl
it will look like that:
curl --request POST \
--url https://thirdparty.qonto.com/v2/attachments \
-H "Content-Type: multipart/form-data" \
-H "Authorization: {Auth}" \
-F file="@path/to/a/file.jpg"
The body is of type object
.
Response
Returns the uploaded attachment.
The response is of type object
.