---
title: "Prepare an attachment upload"
method: POST
path: "/attachments/presign"
tags: ["Attachments"]
---

# Prepare an attachment upload

`POST /attachments/presign`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/attachments/presign`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Creates a company-scoped attachment and returns a presigned PUT URL. Upload the exact file bytes to uploadUrl, then pass attachment.id when creating or replying to a client request. Use the company id in x-organization-id.

## Request body

- object
  - `fileName` string, required
  - `contentType` string, required
  - `fileSize` number, required

## Response `201`

Attachment record and presigned PUT URL

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
