Documents

Document Delete

DELETE
/documents/document/{documentGuid}/delete

Soft-deletes a document by its GUID.

Authorization

AuthorizationBearer <token>

JWT token to authenticate the request.

In: header

X-Api-Key<token>

API key, sent as a request header.

In: header

Path Parameters

documentGuid*string

GUID of the document to delete.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/documents/document/16fd2706-8baf-433b-82eb-8c7fada847da/delete"
{  "result": {    "data": {      "documentGuid": "16fd2706-8baf-433b-82eb-8c7fada847da",      "message": "Document deleted successfully."    },    "statusCode": 200,    "message": "OK"  },  "origin": "DELETE https://api.doctavian.com/v1/documents/document/{documentGuid}/delete",  "dateTime": "2026-07-14T09:30:00.000Z",  "operationId": "952504da6b42069ede28d1a299dbfad7",  "userId": "05e0994b-8806-442f-b68d-684ce8fed4c1"}
{  "userId": "4b080609-1a6c-4841-b4b7-f742ac23ef6b",  "error": {    "statusCode": 400,    "message": "Name is required.",    "innerErrors": [      {        "code": "DATA_NAME_REQUIRED",        "message": "Name is required.",        "userMessage": "Name is required."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/document/{documentGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "38044773ce629b8c72940400b1c7d87f"}
{  "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/{documentGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "a399c9d5d51ae6da602c288afac45da6",  "userId": "748b2a39-7231-4b49-832b-9ef189074a21"}
{  "error": {    "statusCode": 404,    "message": "The requested resource was not found.",    "innerErrors": [      {        "code": "NOT_FOUND_BY_ID",        "message": "The requested resource was not found.",        "userMessage": "We couldn't find that resource. Check the id and try again."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/document/{documentGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "a826b5e81b999ca6d457a3108ec0edf7",  "userId": "748b2a39-7231-4b49-832b-9ef189074a21"}
{  "userId": "c20bfe00-0eeb-4f5b-b6f2-bad3be34ae0a",  "error": {    "statusCode": 500,    "message": "An unexpected error occurred.",    "innerErrors": [      {        "code": "GET_DATA_SOURCE_ERROR",        "message": "An unexpected error occurred.",        "userMessage": "An unexpected error occurred."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/document/{documentGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "f2336fb7725c38e39b396ee32fb21856"}