Skip to main content
POST
/
v2
/
insurance_contracts
/
{id}
/
attachments
Upload a document to an insurance contract
curl --request POST \
  --url https://thirdparty.qonto.com/v2/insurance_contracts/{id}/attachments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Qonto-Idempotency-Key: <x-qonto-idempotency-key>' \
  --form 'name=Contract Axa' \
  --form type=contract \
  --form file=@example-file
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Contract Axa",
"type": "contract"
}

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"

Path Parameters

id
string
required

UUID of the insurance you are uploading the document for

Body

multipart/form-data

PDF file representing the document

file
file
required

The PDF file to upload

name
string<string>
required

the name of the file

Example:

"Contract Axa"

type
string<string>
required

type of the file, for example - contract, statement

Example:

"contract"

Response

Returns the PDF document uploaded.

id
string<uuid>

ID of the newly created attachment

Example:

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

name
string<string>

the name of the file

Example:

"Contract Axa"

type
string<string>

type of the file

Example:

"contract"