curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'X-Anyformat-Skip-Deletion-Window: true'
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
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'
curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'X-Anyformat-Skip-Deletion-Window: true'
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
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.
Skipping the deletion window
By default the deletion’s record is kept for a deletion window of 14 days, or 24 hours for an organization with zero data retention, and its deletion certificate is issued once that window ends. SendX-Anyformat-Skip-Deletion-Window: true to forget the deleted packet at once instead, so its certificate is issued within about ten minutes. Any other value, or no header, keeps the window. Use it when you need the certificate now, for example to test deletion end to end.
curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY'
curl -X DELETE 'https://api.anyformat.ai/v3/document-packets/069dcc2c-e14c-7606-8000-2ee4fb17b4e1/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'X-Anyformat-Skip-Deletion-Window: true'
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
Authorizations
Headers
Response
Successful Response

