SightRadardocs
API referenceCollections

Delete a collection (soft by default, restorable)

Schedules a durable cascade delete — all faces and selfies are removed asynchronously. (DELETE /v1/collections/{id})

DELETE/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_pending and stops accepting index/search operations immediately, but nothing is erased until the grace window elapses. Undo with POST /v1/collections/{id}/restore any 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

NameInTypeDescription
id requiredpathstringCollection id.
immediatequerybooleanSkip the grace window and begin erasing now. Not restorable.
compliancequerybooleanAlias for immediate=true, additionally recorded as a compliance-class erasure.

Response body

FieldTypeDescription
status"deletion_pending" | "deleting"deletion_pending for a soft delete (still restorable); deleting once erasure has been scheduled.
mode"soft" | "immediate"
workflow_idstring
restorablebooleanTrue for a soft delete (undo via POST /v1/collections/{id}/restore); false for an immediate delete.
purge_afterstringWhen the grace window elapses and erasure begins. Soft deletes only.
messagestring

Status codes

StatusMeaning
202Deletion scheduled.
401Missing or invalid API key.
404Resource not found.
409Collection is already deleting or deleted.
Last updated

On this page