curl -X DELETE https://api.zerodrift.ai/api/v3/batches/BATCH_ID \
-H "x-api-key: YOUR_API_KEY"
{
"api_version": "v3",
"batch_id": "batch_e511e74dd1ea49ba8c5f4293a68427be",
"deleted": true
}
Batches
Delete a Batch
Permanently delete an ended or failed batch, its files and its record.
DELETE
/
api
/
v3
/
batches
/
{batch_id}
curl -X DELETE https://api.zerodrift.ai/api/v3/batches/BATCH_ID \
-H "x-api-key: YOUR_API_KEY"
{
"api_version": "v3",
"batch_id": "batch_e511e74dd1ea49ba8c5f4293a68427be",
"deleted": true
}
Permanently deletes a batch that has ended or failed: its input, results and report files, and its record. This can’t be undone. Cancel a running batch first. Needs a full-access API key.
Files are deleted automatically 14 days after a batch ends (
files_deleted_at). Use this to remove them sooner, or to remove the batch record too.
Path Parameters
curl -X DELETE https://api.zerodrift.ai/api/v3/batches/BATCH_ID \
-H "x-api-key: YOUR_API_KEY"
{
"api_version": "v3",
"batch_id": "batch_e511e74dd1ea49ba8c5f4293a68427be",
"deleted": true
}
Errors
| Status | Code | Meaning |
|---|---|---|
404 | batch_not_found | No batch with this ID is yours. |
409 | batch_not_deletable | The batch is still running (cancel it first), or its results or report are still being built (retry shortly). |
500 | batch_delete_failed | Some files couldn’t be removed. The batch is kept; retry the delete. |

