Delete one photo's faceprints (soft by default, restorable)
Deletes the face vectors indexed from one photo (by the photoId you supplied at index time), without… (DELETE /v1/collections/{id}/photos/{photoId})
/v1/collections/{id}/photos/{photoId}- Auth
- Bearer API key
- Billing
- free (0 credits).
Deletes the face vectors indexed from one photo (by the photoId you
supplied at index time), without touching the rest of the collection.
Synchronous and free. Idempotent — deleting an already-removed photo
still returns 200. The response also says whether the photo had any
faces in the collection (found), from the gateway's photo registry or,
where that is not complete, from the engine's count of the photo's face
points at the time of the delete; a photo with none returns
found: false and restorable: false.
Two modes, mirroring the collection delete:
- Soft (default, no flag) — the faces are tagged deleted and drop out
of search immediately, but the vectors survive the grace window so the
delete can be undone with
POST /v1/collections/{id}/photos/{photoId}/restore. This is the safe default: an accidental delete from your own automation is recoverable. - Immediate (
?immediate=true) — the vectors are physically removed now. NOT restorable.
?compliance=true is an alias for immediate=true that additionally
records the erasure as compliance-class for your own audit trail.
Example request
curl -X DELETE "https://api.sightradar.com/v1/collections/$ID/photos/$PHOTOID" \
-H "Authorization: Bearer $SR_API_KEY"Put each id in the path percent-encoded, as a single path segment. An id with /, ?, #, % or a space otherwise addresses a different URL. In code, use your HTTP library's path encoding (for example encodeURIComponent in JavaScript or urllib.parse.quote(id, safe="") in Python).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | Collection id. |
photoId required | path | string | The photoId supplied at index time. |
immediate | query | boolean | Physically delete the vectors now instead of soft-deleting them. Not restorable. |
compliance | query | boolean | Alias for immediate=true, additionally recorded as a compliance-class erasure. |
Response body
| Field | Type | Description |
|---|---|---|
deleted | boolean | |
collection_id | string | |
photo_id | string | |
mode | "soft" | "immediate" | Which delete mode was applied. |
restorable | boolean | True for a soft delete (undo via the restore endpoint); false for an immediate delete, and false when found is false. |
found | boolean | Whether this photo id had faces in the collection when the delete ran. Omitted only when neither the photo registry nor the engine could tell. |
engine | object | The engine's own acknowledgement, echoed for audit (includes purge_after as unix seconds on a soft delete). |
Status codes
| Status | Meaning |
|---|---|
200 | Faceprints deleted. |
401 | Missing or invalid API key. |
404 | Resource not found. |
502 | Deletion service unavailable. |