---
title: "Upload a PDF document for a specific insurance contract"
method: POST
path: "/v2/insurance_contracts/{id}/attachments"
tags: ["Insurance Contracts"]
---

# Upload a PDF document for a specific insurance contract

`POST /v2/insurance_contracts/{id}/attachments`

## Request

- Base URL: `https://thirdparty.qonto.com`
- URL: `https://thirdparty.qonto.com/v2/insurance_contracts/{id}/attachments`
- Auth: OAuth 2
  - Authorization code: `https://oauth.qonto.com/oauth2/auth`
  - Token URL: `https://oauth.qonto.com/oauth2/token` scopes: `insurance_contract.write`

OAuth scope: `insurance_contract.write`

---

This endpoint allows you to upload a PDF file representing a document for a specific insurance contract.

## Path parameters

- `id` string, required

## Headers

- `X-Qonto-Staging-Token` string
- `X-Qonto-Idempotency-Key` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The PDF file to upload
  - `name` string, string, required: the name of the file
  - `type` string, string, required: type of the file, for example - contract, statement

## Response `201`

Attachment created successfully

- object
  - `id` string, uuid: ID of the newly created attachment
  - `name` string, string: the name of the file
  - `type` string, string: type of the file

## Other responses

- `400`: Returns a bad request error
- `401`: Returns an unauthorized error
- `403`: Returns a forbidden error
- `404`: Returns a not found error

---

[API](https://skmtc.dev/hiit-consulting-fr/apis/qonto.md) - [All operations](https://skmtc.dev/hiit-consulting-fr/apis/qonto/llms.txt) - [OpenAPI document](https://skmtc.dev/hiit-consulting-fr/apis/qonto/revisions/25208d6f9deb?raw)
