Documents

Data Source Delete

DELETE
/documents/datasource/{dataSourceGuid}/delete

Soft-deletes a data source 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

dataSourceGuid*string

GUID of the data source to delete.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/documents/datasource/3f2504e0-4f89-41d3-9a0c-0305e82c3301/delete"
{  "result": {    "data": {      "dataSourceGuid": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",      "message": "Data source deleted successfully."    },    "statusCode": 200,    "message": "OK"  },  "origin": "DELETE https://api.doctavian.com/v1/documents/datasource/{dataSourceGuid}/delete",  "dateTime": "2026-07-14T09:30:00.000Z",  "operationId": "56784ff40e158b8d7bc6051a7c8224ef",  "userId": "e9593294-80fc-490c-89ad-c44776fda4c7"}
{  "userId": "15243b3a-9d23-4861-9ef8-b7f9c2caa4e4",  "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/datasource/{dataSourceGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "96b6e4787d4cbb5ce05c4448cbf5ded8"}
{  "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/datasource/{dataSourceGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "5e01114674b01b82d587b2e0f06bb484",  "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/datasource/{dataSourceGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "2bc6a82e29029fcb79f0da9172dfd1c4",  "userId": "748b2a39-7231-4b49-832b-9ef189074a21"}
{  "userId": "b03ce67d-44c7-48c0-84f6-8bc5df286993",  "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/datasource/{dataSourceGuid}/delete",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "b61c331a520a9d60741bd811dd7b57ff"}