DELETE
/
api
/
datasets
/
{datasetId}
curl --request DELETE \
  --url https://app.pathors.com/api/datasets/{datasetId} \
  --header 'x-api-key: <x-api-key>'

Delete Dataset

Permanently deletes a dataset and its associated chunks from your knowledgebase.

Endpoint

DELETE /api/datasets/{datasetId}

Path Parameters

datasetId
string
required

The ID of the dataset to delete

Headers

x-api-key
string
required

Your project API key for authentication

Response

A successful request will return a 200 status code indicating the dataset was deleted.

Example response:

{
  "message": "Dataset deleted successfully"
}

Error Responses

Status CodeDescription
401Invalid API key
404Dataset not found
500Internal server error

Warning

This action is irreversible. Deleting a dataset will:

  • Remove the dataset file from storage
  • Delete all associated chunks
  • Remove all embeddings generated from this dataset

Usage Notes

  • Ensure you have backed up any important data before deletion
  • The deletion process will automatically clean up all related resources
  • This operation cannot be undone
  • The knowledgebase will be immediately updated to exclude the deleted dataset’s content from search results