Delete a document
DELETE/v1/documents/{documentId}
Deletes a document and its file, as the Documents tab's Delete does. It cannot be undone, so confirm (a query parameter) must be the document's exact name. To hide a document from travelers without deleting it, PATCH it to visibility: staff.
Permissions: documents:write · Kind: destructive · Cost: 1 unit · MCP tool delete_document
Cannot be undone.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
documentId |
uuid | yes |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
confirm |
string | yes | The document's exact name. max 200 chars |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
object |
"document" | yes | |
id |
uuid | yes | |
deleted |
true | yes |
Errors
Errors are problem details. Besides the refusals described above, any call like this one can return:
invalid_request— Invalid requestunauthorized— Missing or invalid API keyinsufficient_scope— Missing permissionrate_limited— Rate limit reachednot_found— Not foundidempotency_key_reused— Idempotency-Key reusedrequest_in_progress— Request in progressforbidden— Not allowed