Skip to main content

Delete Document

DELETE /v1/documents/{document_id}
Delete a document and all its blocks. Requires the documents:write role.

Request

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key

Path Parameters

ParameterTypeDescription
document_idstringThe 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

CodeDescription
404Document not found
403Access denied (not the document owner)