Suparse
API Documentation

Delete Document

deletes selected document. The operation is irreversible.

DELETE/api/v1/documents/{document_id}

Overview

This endpoint deletes selected document. The operation is irreversible.

Request

Path Parameters

NameTypeRequiredDescription
document_idstring (UUID)YesThe unique identifier (UUID) of the document to delete.

Headers

NameTypeRequiredDescription
X-API-KeystringYesYour API key for authentication.

Code Examples

curl -X DELETE "https://api.yourapp.com/api/v1/documents/a1b2c3d4-e5f6-7890-1234-567890abcdef" \
  -H "X-API-Key: pk_abcd1234_secretsecretsecretsecretsecret"
 

Response Example

204

Document successfully deleted (No Content).

(No Content)
 

Response Example

400

The provided document ID is not in a valid UUID format.

{
  "detail": "Invalid document ID format."
}
 

Response Example

401

Authentication failed due to an invalid or missing API key.

{
  "detail": "Invalid API key."
}
 

Response Example

403

Not authorized to delete this document.

{
  "detail": "Not authorized to delete this document"
}
 

Response Example

404

A document with the specified ID was not found.

{
  "detail": "Document not found"
}