SightRadardocs
API referenceSelfies

Delete one selfie (immediate, not restorable)

Deletes one registered selfie (Rekognition DeleteFaces analog) by the selfieId you supplied to POST… (DELETE /v1/collections/{id}/selfies/{selfieId})

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

Deletes one registered selfie (Rekognition DeleteFaces analog) by the selfieId you supplied to POST /v1/collections/{id}/selfies. Every stored version of that selfie is removed. Free and synchronous.

  • Immediate only. There is no soft mode and no restore: the vectors are physically removed before the 200 is returned.
  • Verified. A 200 means no matching selfie remains. If one is still stored after the delete, the response is a 503 and you should retry; the delete is idempotent, so a retry converges.
  • Idempotent. An unknown or already-deleted selfieId returns 200 with deleted: [].

If the same selfieId was registered under several users, pass ?userId= to delete only that user's copy. An empty ?userId= is a 400, never a delete of every copy.

Photo faces are not touched; to remove a person from indexed photos use DELETE /v1/collections/{id}/photos/{photoId}.

Example request

curl -X DELETE "https://api.sightradar.com/v1/collections/$ID/selfies/$SELFIEID" \
  -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.
selfieId requiredpathstringThe selfieId supplied at registration (at most 512 bytes).
userIdquerystringOnly delete the copy registered under this userId.
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
200Selfie deleted (or was never stored).
400The selfieId or 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