---
title: "Rename document"
method: POST
path: "/documents/document-rename"
tags: ["Document AI — DMS"]
---

# Rename document

`POST /documents/document-rename`

## Request

- Base URL: `https://api.paperoffice.ai/latest`
- URL: `https://api.paperoffice.ai/latest/documents/document-rename`
- Auth: HTTP bearer

Rename a document. The original extension is always preserved. Path separators (/, \, .) are rejected. Special characters are removed, leading dots are deleted. Maximum length: 255 characters.

## Response `200`

Success

- object: Document renamed
  - `status` 'success' | 'error': Request status (ok/error)
  - `message` string: Status message
  - `pofid` string: PaperOffice File ID
  - `new_name` string: New name
  - `processing_time` string: Request processing time (e.g. "123.45ms")
  - `document` string: Document
  - `old_file_name` string: Old file name
  - `new_file_name` string: New file name
  - `workspace_id` string: Workspace id

## Other responses

- `4XX`: Error
- `5XX`: Error

---

[API](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api.md) · [All operations](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/revisions/c6a6228a4509?raw)
