Document Delete
Markdown for LLMsDeletes a document record — the stored entry describing a generated document, with its title, format, delivery method and provenance. Identify it by the record's id, as returned by documents-document-list, or as documentId on a completed document request from documents-request-get. The record's urn addresses the file and is a different id: sent here, it fails with 500 DOCUMENT_NOT_FOUND.
Afterwards the record no longer appears in documents-document-list. Deleting the same id again returns 200 again.
An id that matches no document record fails with 500 DOCUMENT_NOT_FOUND, and an id that is not a GUID with a bodiless 404.
JWT token to authenticate the request.
In: header
API key, sent as a request header.
In: header
Path Parameters
Id of the document record to delete: the record's id, as returned by documents-document-list, or as documentId on a completed document request from documents-request-get — not its urn, which addresses the file and is what documents-document-download takes. Must be a GUID: a value that is not one matches no route and returns a bodiless 404. A well-formed id that matches no document record, including a file's urn, returns 500 DOCUMENT_NOT_FOUND.
uuidResponse Body
application/json
application/json
application/json
curl -X DELETE "https://example.com/documents/document/16fd2706-8baf-433b-82eb-8c7fada847da/delete"{ "result": { "statusCode": 200, "message": "Deleted" }, "origin": "DELETE https://api.doctavian.com/v1/documents/document/{documentId}/delete", "dateTime": "2026-07-14T09:30:00.000Z", "userId": "05e0994b-8806-442f-b68d-684ce8fed4c1", "operationId": "952504da6b42069ede28d1a299dbfad7"}{ "error": { "statusCode": 401, "message": "The request could not be authenticated.", "innerErrors": [ { "code": "UNAUTHORIZED", "message": "The request could not be authenticated.", "userMessage": "Your session has expired or is invalid. Please sign in again." } ] }, "origin": "DELETE https://api.doctavian.com/v1/documents/document/{documentId}/delete", "dateTime": "2026-01-02T12:34:56.000Z", "operationId": "a399c9d5d51ae6da602c288afac45da6", "userId": "748b2a39-7231-4b49-832b-9ef189074a21"}{ "error": { "statusCode": 500, "message": "Internal Server Error", "innerErrors": [ { "code": "DELETE_DOCUMENT_ERROR", "message": "The document record could not be deleted.", "userMessage": "Something went wrong. Please try again or contact support.", "eventId": "c2f4e1a7-9b3d-4e58-a6f0-1d7b8e2c5a94" } ] }, "origin": "DELETE https://api.doctavian.com/v1/documents/document/{documentId}/delete", "dateTime": "2026-10-13T08:55:27.000Z", "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5", "operationId": "1ff15b3d9779d3b51ff15b3d9779d3b5"}