Skip to main content

Delete Document

Permanently delete a document with DELETE /v1/documents/:id. Removes the original file, OCR output, and every extraction result. Irreversible by design.

The Delete Document endpoint, DELETE /v1/documents/:id, permanently removes a document from your Talonic workspace along with its original file, extracted text, and all associated extraction results. This operation cannot be undone. Use it for cleanup after export or to remove files uploaded in error.

Deletion is irreversible. The original file, OCR output, and all extraction results are permanently removed. If the document is part of a case or entity group, its links are also removed.
DELETE/v1/documents/:id

curl

curl -s -X DELETE https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer tlnc_your_api_key"

Response

Response fields

deletedbooleanAlways true on success.
idstringID of the deleted document.

Response

{
  "deleted": true,
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Most integrations call this endpoint as part of a cleanup workflow after data has been exported or when a document was uploaded in error. A typical pattern is to list documents with GET /v1/documents, identify candidates for deletion, then call this endpoint for each one.

The response includes a deleted field set to true and the id of the removed document. There is no soft-delete mechanism: the original file, OCR markdown, and all extraction results are permanently purged from storage.

Pair this with GET /v1/documents/:id beforehand to verify you are deleting the correct resource. Note that if the document participated in entity linking or cases, those links are removed and affected cases may be recomputed during the next backfill cycle.

Errors

Error responses

401unauthorizedMissing or invalid API key.
403forbiddenThe API key lacks the scope required to delete documents.
404document_not_foundNo document with this ID exists for your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Frequently asked questions

Can I recover a deleted document?+
No. Document deletion is permanent and irreversible. There is no soft-delete or trash mechanism. Ensure you have a backup before deleting.
What happens to linking and cases when a document is deleted?+
Entity links referencing the deleted document are removed. If the document was part of a case, the case may be recomputed with the remaining documents during the next backfill.
How do I delete every document from one source?+
List the documents first with GET /v1/documents?source_id=... to collect their IDs, then call DELETE /v1/documents/:id for each one. There is no bulk delete endpoint, so iterate over the paginated list.