---
title: "Restore Document from Trash"
method: POST
path: "/documents/document-restore"
tags: ["Document AI — DMS"]
---

# Restore Document from Trash

`POST /documents/document-restore`

## Request

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

Restore one or more soft-deleted documents from the trash. Also supports document folders (.podf). Only restorable while phase=pending (not permanently deleted).

## Request body

- object
  - `pofid` string, required: POFID or array of POFIDs to restore
  - `target_workspace_id` integer: Optional: Restore to this workspace instead of original

## Response `200`

Success

- object: Document restored
  - `status` 'success' | 'error': Request status (ok/error)
  - `message` string: Status message
  - `pofid` string: PaperOffice File ID
  - `processing_time` string: Request processing time (e.g. "123.45ms")
  - `restored_count` string: Restored count
  - `failed_count` string: Failed count
  - `restored_documents` string: Restored documents
  - `failed_documents` string: Failed documents

## 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)
