---
title: "Rename attachment"
method: PUT
path: "/documents/{document}/attachments/{attachment}"
tags: ["Document Operations"]
---

# Rename attachment

`PUT /documents/{document}/attachments/{attachment}`

## Request

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

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

Changes the file name of an attachment of the given [document](/#documents).

Attachments can only be renamed 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.

## Path parameters

- `document` string, required
- `attachment` string, required

## Request body

- UpdateAttachmentRequest
  - `file_name` string, required: The new name of the attachment

## Response `200`

`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/:attachment/put.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)
