On this page
documents.delete
Delete a document and return storage/provider deletion receipts
Request
DELETE /api/v1/documents/{document_id}
- MCP:
documents_delete - SDK:
client.documents.delete(SDK path arguments usepath; MCP usesparams). - Minimum API key role: member.
- Idempotency: natural.
Use the request schema below. Read IDs from earlier operation results.
Input schema
json
{
"parameters": [
{
"name": "document_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": null
}
Responses
json
{
"200": {
"description": "Delete a document and return storage/provider deletion receipts",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DocumentsDeleteResponse200"
}
}
}
},
"4XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
Referenced schemas
json
{
"components": {
"schemas": {
"DocumentsDeleteResponse200": {
"type": "object",
"properties": {
"document_id": {
"type": "string",
"format": "uuid"
},
"receipts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeletionReceipt"
}
}
},
"required": [
"document_id",
"receipts"
],
"additionalProperties": false
},
"DeletionReceipt": {
"type": "object",
"properties": {
"receipt_id": {
"type": "string",
"format": "uuid"
},
"artifact_id": {
"type": "string",
"format": "uuid"
},
"store": {
"type": "string",
"enum": [
"s3",
"postgres"
]
},
"locator": {
"type": "object",
"properties": {
"bucket": {
"type": "string",
"nullable": true
},
"key": {
"type": "string",
"nullable": true
},
"version_ids": {
"type": "array",
"items": {
"type": "string"
},
"default": []
}
},
"required": [
"bucket",
"key"
],
"additionalProperties": false
},
"request_id": {
"type": "string",
"nullable": true
},
"deleted_sha256": {
"allOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
],
"nullable": true
},
"provider_copies": {
"type": "string",
"enum": [
"none",
"declared_provider_retention"
]
},
"purged_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"receipt_id",
"artifact_id",
"store",
"locator",
"request_id",
"deleted_sha256",
"provider_copies",
"purged_at"
],
"additionalProperties": false
},
"ApiError": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthenticated",
"forbidden",
"not_found",
"conflict",
"invalid_request",
"idempotency_conflict",
"policy_denied",
"capability_unavailable",
"provider_unavailable",
"knowledge_unavailable",
"publication_invalid",
"run_not_active",
"rate_limited",
"outcome_unknown",
"internal"
]
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"outcome": {
"type": "string",
"enum": [
"none",
"unknown"
]
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"code",
"message",
"retryable",
"outcome"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
Errors and recovery
See API error handling and Troubleshooting.
Related guides
Content version 0e94f11aMarkdown source