Delete dataset
/v1/datasets/{datasetId}Permanently deletes a dataset together with everything inside it: processed items, their embeddings, queued ingest rows, the data sources that feed it and any pending sync jobs. Sync history logs are removed shortly afterwards.
The dataset, items, embeddings, queue rows, sources and sync jobs are removed in a single transaction — if any step fails, nothing is deleted.
This cannot be undone. If you only want to take a dataset out of rotation, use Archive dataset instead; it keeps the data and can be reversed.
The response reports how many records of each kind were removed. Counts for embeddings and sync logs are not included.
Path parameters
1The dataset to delete.
Response
Always true on success.
Dataset records removed. Always 1 on success.
Processed items the dataset held. The dataset is gone at once; its items, their photos and search entries are removed in the background, usually within seconds.
Ingest-queue rows the dataset held, removed with its items.
Data sources removed.
Pending sync jobs removed.
Errors
20Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
Organization '<organizationId>' not found.The organization that owns the key no longer exists.
Dataset '<datasetId>' not found for organization '<organizationId>'.No dataset with that id belongs to your organization, or it vanished while the transaction ran. Nothing was deleted.
Invalid 'datasetId': expected a non-empty string.datasetId is empty.
curl -X DELETE "https://stylor.ai/api/v1/datasets/YOUR_DATASET_ID" \
-H "Authorization: Bearer $STYLOR_API_KEY"{
"deleted": true,
"deletedCount": 1,
"itemsDeletedCount": 1296,
"queuedDeletedCount": 5,
"sourcesDeletedCount": 1,
"syncJobsDeletedCount": 0
}