Skip to main content
POST
/
v2
/
attachments
Upload an attachment
curl --request POST \
  --url https://thirdparty.qonto.com/v2/attachments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Qonto-Idempotency-Key: <x-qonto-idempotency-key>' \
  --form file='@example-file'
{
  "attachment": {
    "id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

X-Qonto-Staging-Token
string

Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.

X-Qonto-Idempotency-Key
string
required

Learn more in Idempotent Requests.

Example:

"123e4567-e89b-12d3-a456-426614174000"

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"
file
file

Response

Returns the uploaded attachment.

attachment
object