---
title: "Remove a document from a vault"
method: DELETE
path: "/vaults/{id}/documents/{documentId}"
tags: ["Contract Intelligence"]
---

# Remove a document from a vault

`DELETE /vaults/{id}/documents/{documentId}`

## Request

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

Remove a document from the vault. The document leaves the table, stops counting toward the vault document limit, and stops being read by chat and playbooks. Nothing is destroyed: `POST /vaults/{id}/documents/{documentId}/restore` brings it back with its extracted values, and a connected source never re-adds it.

Removal works on the upload, so every row that shares this row's `file_id` goes with it. That matters for a bundled upload GC AI split into several documents: removing one of them removes the whole upload.

Removing a document that is already removed 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 removed

- VaultDocumentDeleteResponse
  - `deleted` 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., or the caller cannot remove documents from this vault
- `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)
