SightRadardocs
API referenceSelfies

Delete every selfie of a user (immediate, not restorable)

Deletes every selfie registered under userId in the collection (Rekognition DeleteUser analog). (DELETE /v1/collections/{id}/users/{userId})

Last updated
DELETE/v1/collections/{id}/users/{userId}
Auth
Bearer API key
Billing
free (0 credits).

Deletes every selfie registered under userId in the collection (Rekognition DeleteUser analog). Free and synchronous, with the same contract as the selfie delete: immediate, not restorable, verified (503 if a matching selfie remains; retry), and idempotent (an unknown userId returns 200 with deleted: []).

deleted_selfie_ids lists the selfieIds that were removed. Photo faces are not touched: SightRadar stores no link between a photo face and a user, so to remove the person from indexed photos use DELETE /v1/collections/{id}/photos/{photoId}.

Example request

curl -X DELETE "https://api.sightradar.com/v1/collections/$ID/users/$USERID" \
  -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

NameInTypeDescription
id requiredpathstringCollection id.
userId requiredpathstringThe userId supplied at selfie registration (at most 512 bytes).
compliancequerybooleanRecord the erasure as compliance-class in your audit trail. The delete itself is the same.

Response body

FieldTypeDescription
collection_id requiredstring
selfie_idstringThe selfieId from the path (selfie delete only).
user_idstringThe userId from the path (user delete) or from ?userId= (selfie delete, only when given).
deleted requiredstring[]Point ids of the removed selfies (the point_id returned at registration, the Rekognition FaceId analog). Empty when nothing was stored.
deleted_selfie_ids requiredstring[]The selfieIds that were removed.
deleted_user_ids requiredstring[]The userIds whose selfies were removed.
unsuccessful requiredobject[]Always empty: a delete that cannot be completed is a 503, never a partial 200.
deleted_count requiredintegerNumber of entries in deleted.
mode required"immediate"Always immediate; selfie and user deletes have no soft mode.
compliance requiredbooleanEchoes ?compliance=true.
verified requiredbooleanAlways true on a 200. The engine checked that no matching selfie remains.
restorable requiredbooleanAlways false; there is no restore for a selfie or user delete.

Status codes

StatusMeaning
200The user's selfies deleted (or none were stored).
400The userId is empty, longer than 512 bytes, or contains '/', '', a control character, or is '.' / '..'.
401Missing or invalid API key.
403The account is read-only.
404Resource not found.
502Deletion service unavailable.
503The delete could not be verified (a matching selfie is still stored), or deletion is temporarily shed. Retry; the delete is idempotent.

On this page