curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
document_packet_id = "069dcc2c-e14c-7606-8000-2ee4fb17b4e1"
url = f"https://api.anyformat.ai/v3/document-packets/{document_packet_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.delete(url, headers=headers)
assert response.status_code == 204
{
"error": "The request failed validation.",
"detail": "The request failed validation.",
"error_code": "VALIDATION_ERROR",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "Authentication failed.",
"detail": "Authentication failed.",
"error_code": "AUTH_FAILED",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "You do not have access to this resource.",
"detail": "You do not have access to this resource.",
"error_code": "ACCESS_DENIED",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "Resource not found.",
"detail": "Resource not found.",
"error_code": "NOT_FOUND",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "Rate limit exceeded — retry after backoff.",
"detail": "Rate limit exceeded — retry after backoff.",
"error_code": "RATE_LIMITED",
"retryable": true,
"request_id": "req_abc123"
}{
"error": "An internal error stopped the request.",
"detail": "An internal error stopped the request.",
"error_code": "INTERNAL_ERROR",
"retryable": true,
"request_id": "req_abc123"
}Document packets
Delete Document Packet
Delete a document packet, its files, and its extraction results
DELETE
/
v3
/
document-packets
/
{document_packet_id}
/
curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
document_packet_id = "069dcc2c-e14c-7606-8000-2ee4fb17b4e1"
url = f"https://api.anyformat.ai/v3/document-packets/{document_packet_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.delete(url, headers=headers)
assert response.status_code == 204
{
"error": "The request failed validation.",
"detail": "The request failed validation.",
"error_code": "VALIDATION_ERROR",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "Authentication failed.",
"detail": "Authentication failed.",
"error_code": "AUTH_FAILED",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "You do not have access to this resource.",
"detail": "You do not have access to this resource.",
"error_code": "ACCESS_DENIED",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "Resource not found.",
"detail": "Resource not found.",
"error_code": "NOT_FOUND",
"retryable": false,
"request_id": "req_abc123"
}{
"error": "Rate limit exceeded — retry after backoff.",
"detail": "Rate limit exceeded — retry after backoff.",
"error_code": "RATE_LIMITED",
"retryable": true,
"request_id": "req_abc123"
}{
"error": "An internal error stopped the request.",
"detail": "An internal error stopped the request.",
"error_code": "INTERNAL_ERROR",
"retryable": true,
"request_id": "req_abc123"
}Rate limit tier: general, 600 requests/min. See Rate limits.
Deletes a document packet and every file in it, along with its runs and extraction results. The delete is permanent and takes effect at once, and the API offers no call that undoes it. The stored files are deleted right after. For an organization with zero data retention that deletion is final; otherwise storage keeps a deleted file’s previous version for up to 60 days before destroying it.
Returns
204 No Content on success. An unknown id returns 404, as does a packet belonging to another organization.
curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
document_packet_id = "069dcc2c-e14c-7606-8000-2ee4fb17b4e1"
url = f"https://api.anyformat.ai/v3/document-packets/{document_packet_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.delete(url, headers=headers)
assert response.status_code == 204

