Delete a document
const url = 'https://api.sonicdocs.ai/v1/documents/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.sonicdocs.ai/v1/documents/example \ --header 'Authorization: Bearer <token>'Status: planned. Contract v1.0.0; this endpoint is not deployed. Required scope: documents:write.
Tombstone immediately; deny all subsequent reads and cancel queued work/delivery. Physical purge completes within 24 hours. Repeat or unknown ID returns 204 without existence disclosure.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Document inaccessible; purge scheduled or already complete.
The caller must supply a valid bearer API key.
object
Included in service-generated upload errors to locate intake diagnostics.
Example generated
{ "title": "example", "status": 1, "code": "example", "detail": "example", "trace_id": "example"}Headers
Section titled “Headers”Example
BearerSee service-interfaces.md for the per-operation status and code mapping.
object
Included in service-generated upload errors to locate intake diagnostics.
Example generated
{ "title": "example", "status": 1, "code": "example", "detail": "example", "trace_id": "example"}See service-interfaces.md for the per-operation status and code mapping.
object
Included in service-generated upload errors to locate intake diagnostics.
Example generated
{ "title": "example", "status": 1, "code": "example", "detail": "example", "trace_id": "example"}default
Section titled “default”See service-interfaces.md for the per-operation status and code mapping.
object
Included in service-generated upload errors to locate intake diagnostics.
Example generated
{ "title": "example", "status": 1, "code": "example", "detail": "example", "trace_id": "example"}