Withdraw a document
Takes a document out of every default read while keeping its history. The withdrawal is archived as a tombstone version, so one mechanism answers what a document holds now and there is no second lifecycle flag for a reader to miss.
Its chunks are dropped from the knowledge index, so a withdrawn document costs a live search nothing. The content is not lost with them: it is in the version before the tombstone, which POST /v1/projects/{project_id}/documents/{document_id}/versions/{version}/restore re-chunks from.
DELETE stays what it is — permanent, and it removes the backing file. Withdrawal is the reversible act. It does not apply under /.system/: a platform-written document keeps the owning module's lifecycle.
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/documents/{document_id}/withdraw
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)
Path parameters
Headers
The version the caller believes the resource holds, as an entity tag (3 or "3"). Equivalent to expected_version in the request body; * states no precondition beyond the resource existing. A mismatch is 409 VERSION_CONFLICT.
Request body
Example request
{
"version_label": "superseded-by-q2",
"expected_version": 3
}Response
The withdrawn document
Example response
{
"id": "doc_V1StGXR8Z5jdHi6B",
"file_id": "file_V1StGXR8Z5jdHi6B",
"project_id": "proj_V1StGXR8Z5jdHi6B",
"path": "/reports/q1.txt",
"filename": "my-doc.txt",
"content_type": "application/pdf",
"size": 42,
"status": "ready",
"version": 1,
"content": "The quick brown fox jumps over the lazy dog.",
"chunk_strategy": "size",
"chunk_size": 800,
"chunk_overlap": 120
}Changes
No recorded changes to this operation across all 1 revision of this API.