Documentation Index
Fetch the complete documentation index at: https://surfacedocs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Delete Document
DELETE /v1/documents/{document_id}
Delete a document and all its blocks. Requires the documents:write role.
Request
| Header | Required | Description |
|---|
X-API-Key | Yes | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|
document_id | string | The document ID |
Example
curl -X DELETE https://api.surfacedocs.dev/v1/documents/doc_abc123 \
-H "X-API-Key: sd_live_..."
Response
Status: 204 No Content
No response body.
Errors
| Code | Description |
|---|
| 404 | Document not found |
| 403 | Access denied (not the document owner) |