---
title: "Add an attachment to a document"
method: POST
path: "/documents/{document}/attachments"
tags: ["Document Operations"]
---

# Add an attachment to a document

`POST /documents/{document}/attachments`

## Request

- Base URL: `https://app.fynk.com/v1/api`
- URL: `https://app.fynk.com/v1/api/documents/{document}/attachments`
- Auth: HTTP bearer

<small>Requires an API token with the **Document Manager** role.</small>

Adds a previously uploaded file as an attachment to the [document](/#documents) referred to by the URL.

This endpoint requires a three-step upload process:

1. Generate upload URL: Call the [Create document attachment upload URL](/operations/v1.file-uploads.document-attachment.create) endpoint to get a presigned upload URL
2. Upload file: Make a POST request to the returned URL with the specified form fields, followed by the file contents in a `file` field
3. Add the uploaded file to the document: Call this endpoint with `file_upload_uuid` set to the `uuid` received in step 1

Attachments can only be added while the document's content can still be changed. A `409` response is returned
if, for example, the document is archived, approved, in signing or bound by a preemptive signature, or if the
file type of the uploaded file is not supported.

For a complete guide with examples, see [How to add an attachment to a document](/#how-to-add-an-attachment-to-a-document).

> Not to be confused with a document's [file storage](/#attachments-and-file-storage), which holds internal
> working files that are not part of the signed document.

## Path parameters

- `document` string, required

## Request body

- StoreAttachmentRequest
  - `file_upload_uuid` string, uuid, required: The UUID received in the [Create document attachment upload URL](/operations/v1.file-uploads.document-attachment.create) response
  - `file_name` string, required: The name of the attachment

## Response `201`

`AttachmentMinimalResource`

- object
  - `data` AttachmentMinimalResource, required
    - `uuid` string, required: UUID of the attachment.
    - `sha256` string, required: SHA256 hash of the attachment file.
    - `file_name` string, required: Name of the attachment.
    - `file_size` integer, required: Size of the attachment file in bytes.
    - `mime_type` string, required: MIME type of the attachment file.

## Other responses

- `401`: Unauthenticated
- `403`: Authorization error
- `404`: Not found
- `422`: Validation error

## Changes

- **2026-11-02** `121033338e69`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fynk/apis/fynk-api-reference/changes/documents/:document/attachments/post.md)

---

[API](https://skmtc.dev/fynk/apis/fynk-api-reference.md) - [All operations](https://skmtc.dev/fynk/apis/fynk-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/fynk/apis/fynk-api-reference/revisions/121033338e69?raw)
