Delete a collection (soft by default, restorable)
Schedules a durable cascade delete — all faces and selfies are removed asynchronously. (DELETE /v1/collections/{id})
/v1/collections/{id}- Auth
- Bearer API key
- Billing
- free (0 credits).
Schedules a durable cascade delete — all faces and selfies are removed asynchronously. Returns 202 with a workflow id. Free.
Two modes:
- Soft (default, no flag) — the collection is tagged
deletion_pendingand stops accepting index/search operations immediately, but nothing is erased until the grace window elapses. Undo withPOST /v1/collections/{id}/restoreany time before the purge starts. This is the safe default: an accidental mass-delete from your own automation is recoverable. - Immediate (
?immediate=true) — skips the grace window and starts erasing now. NOT restorable.
?compliance=true is an alias for immediate=true that additionally
records the erasure as compliance-class for your own audit trail.
Poll GET /v1/collections/{id}/deletion for authoritative progress.
Example request
curl -X DELETE "https://api.sightradar.com/v1/collections/$ID" \
-H "Authorization: Bearer $SR_API_KEY"Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Collection id. |
immediate | query | boolean | Skip the grace window and begin erasing now. Not restorable. |
compliance | query | boolean | Alias for immediate=true, additionally recorded as a compliance-class erasure. |
Response body
| Field | Type | Description |
|---|---|---|
status | "deletion_pending" | "deleting" | deletion_pending for a soft delete (still restorable); deleting once erasure has been scheduled. |
mode | "soft" | "immediate" | |
workflow_id | string | |
restorable | boolean | True for a soft delete (undo via POST /v1/collections/{id}/restore); false for an immediate delete. |
purge_after | string | When the grace window elapses and erasure begins. Soft deletes only. |
message | string |
Status codes
| Status | Meaning |
|---|---|
202 | Deletion scheduled. |
401 | Missing or invalid API key. |
404 | Resource not found. |
409 | Collection is already deleting or deleted. |
Describe a collection
Returns the collection with LIVE face/selfie counts merged from the engine. (GET /v1/collections/{id})
Undo a soft collection delete
Restores a collection that is still inside its grace window (status=deletion_pending) back to active, cancelling the… (POST /v1/collections/{id}/restore)