SightRadardocs
API referenceCollections

Recreate a purged collection

Brings back a collection whose deletion has fully completed (status=deleted) as a new, empty collection under the… (POST /v1/collections/{id}/recreate)

Last updated
POST/v1/collections/{id}/recreate
Auth
Bearer API key
Billing
free (0 credits).

Brings back a collection whose deletion has fully completed (status=deleted) as a new, empty collection under the same id. Nothing from before the delete comes back: re-index the photos you still need. Free.

POST /v1/collections keeps returning 409 for a deleted id, and indexing into one is refused, so a stale job can never revive it by accident. Recreating it has to be this explicit call.

Returns 409 while the collection is still active, deletion_pending (use restore instead) or deleting; when the erasure was compliance-class; when deletion was not verified complete; or while work accepted before the delete is still queued or running.

Example request

curl -X POST "https://api.sightradar.com/v1/collections/$ID/recreate" \
  -H "Authorization: Bearer $SR_API_KEY"

Parameters

NameInTypeDescription
id requiredpathstringCollection id.

Response body

FieldTypeDescription
collection_idstring
status"active" | "deletion_pending" | "deleting" | "deleted"
counts_sourcestringWhere the counts came from: postgres = the gateway's count registry (the normal case), engine = a live read from the engine (a collection whose registry counts are not ready yet, or ?verify=true).
photo_countinteger
face_countinteger
selfie_countinteger
created_atstring
purge_afterstringPresent on deletion_pending collections: when the soft delete becomes permanent.

Status codes

StatusMeaning
200Collection recreated, active and empty.
401Missing or invalid API key.
403Account is read-only.
404Resource not found.
409Not recreatable. The error message says which condition failed.

On this page