---
title: "Restore a removed document"
method: POST
path: "/vaults/{id}/documents/{documentId}/restore"
tags: ["Contract Intelligence"]
---

# Restore a removed document

`POST /vaults/{id}/documents/{documentId}/restore`

## Request

- Base URL: `https://app.gc.ai/api/external/v1`
- URL: `https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/restore`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/gc-ai/apis/gc-ai-external-api/docs/vaults/:id/documents/:documentId/restore/post.ts> (a function with typed inputs; its response is checked against the schema)

Bring a removed document back into the vault table with the values it already had. Find removed documents with `GET /vaults/{id}/documents?include_deleted=true`.

Restoring works on the upload, so every row that shares this row's `file_id` comes back with it.

A restore that would put the vault over its document limit is refused whole with `403`, and nothing comes back. Restoring a document that is already live returns `200`, so a retried call is safe.

Requires the `editor` or `owner` role in the vault and the organization-level permission to manage vaults.

Requires a user-scoped API key (`u:gcai_...`). A vault is shared with named people, so an organization-scoped key has no identity to resolve vault access with.

## Path parameters

- `id` string, uuid, required: The vault ID
- `documentId` string, uuid, required: The `document_id` of a row from `GET /vaults/{id}/documents`.

## Response `200`

Document restored

- VaultDocumentRestoreResponse
  - `restored` boolean, required: Always `true` on success

## Other responses

- `401`: Missing or malformed API key
- `403`: Contract Intelligence is not enabled for this account. Contact support to request access., the caller cannot restore documents in this vault, or the restore would put the vault over its document limit
- `404`: Vault or document not found, or access denied
- `409`: The vault is archived. Restore it with `POST /vaults/{id}/restore` before changing it.
- `422`: Vault access is per-user and requires a user-scoped API key (u:gcai_...).
- `429`: Rate limit exceeded. See [Rate Limits](https://docs.gc.ai/api-reference/concepts/rate-limits) for the tiers, limits, and how to back off.
- `500`: Internal server error
- `503`: Service temporarily unavailable

---

[API](https://skmtc.dev/gc-ai/apis/gc-ai-external-api.md) - [All operations](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/revisions/2bbdfddf7107?raw)
