DELETE
/v1/documents/:idDelete Document
Permanently delete a document.
Permanently delete a document and all associated data. This action cannot be undone. If the document is currently published, it will also be unpublished.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The document UUID |
Response
Returns a success confirmation.
| Field | Type | Description |
|---|---|---|
success | boolean | Always true on success |
Errors
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 404 | not_found | Document not found or does not belong to you |
| 500 | internal_error | Unexpected server error |
curl -X DELETE https://api.unmarkdown.com/v1/documents/doc_abc123 \
-H "Authorization: Bearer um_your_key"
const res = await fetch('https://api.unmarkdown.com/v1/documents/doc_abc123', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer um_your_key'
}
});
const data = await res.json();
console.log(data.success); // true
import requests
res = requests.delete(
'https://api.unmarkdown.com/v1/documents/doc_abc123',
headers={'Authorization': 'Bearer um_your_key'}
)
print(res.json())
Response
{
"success": true
}