Delete a data source

delete/v1/datasets/{datasetId}/sources/{sourceId}

Permanently deletes a source together with all of its sync jobs and sync logs. The response tells you how many of each were removed.

Items the source previously imported into the dataset are left in place — delete or archive them through the Dataset Items endpoints if you no longer want them. A job that is currently processing is deleted from the queue, but the worker running it may still finish importing items from that pass; only the job and log records disappear.

Private keyapi.v1.datasets.sources.deleteNo demo

Path parameters

2
datasetIdstring (uuid)required

The dataset the source belongs to.

sourceIdstring (uuid)required

The source to delete.

Response

200The source and its history were deleted.
successbooleanrequired

Always true on a 2xx response.

deletedLogsintegerrequired

Number of sync logs removed with the source.

deletedJobsintegerrequired

Number of sync jobs removed with the source.

Errors

18

Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.

404
Data source not found or access denied

No source with that sourceId belongs to the organization that owns the key, or the source belongs to a different datasetId than the path.

curl -X DELETE "https://stylor.ai/api/v1/datasets/YOUR_DATASET_ID/sources/YOUR_SOURCE_ID" \
  -H "Authorization: Bearer $STYLOR_API_KEY"
Response · 200
{
  "success": true,
  "deletedLogs": 42,
  "deletedJobs": 3
}