---
title: "Update a document file name"
method: PATCH
path: "/api/v1/documents/{documentId}"
tags: ["documents"]
---

# Update a document file name

`PATCH /api/v1/documents/{documentId}`

## Path parameters

- `documentId` string, uuid, required

## Request body

- DocumentUpdateRequestDTO
  - `fileName` string — The new name for the document file

## Response `201`

- DocumentResponseDTO
  - `contentSize` integer, required — The size of the document content in bytes
  - `createdAt` string, date-time, required — The date and time the document was created
  - `documentRole` 'attachment' | 'consent', required — Whether the document is an attachment or a consent document
  - `fileName` string, required — The name of the document file
  - `fileType` 'pdf' | 'pptx' | 'txt', required — The type of the document file
  - `id` string, uuid, required — The unique identifier of the document
  - `lastUpdatedAt` string, date-time, required — The date and time the document was last updated
  - `organizationId` string, uuid, required — The unique identifier of the organization that owns the document
  - `uploadedBy` string, uuid, required — The user ID who uploaded the document
  - `version` integer, nullable — Monotonic version number; only set for consent documents

---

[API](https://skmtc.net/wejam/apis/jam.md) · [All operations](https://skmtc.net/wejam/apis/jam/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wejam/jam/revisions/bd5a5f406bca/schema)
