SightRadardocs
API referenceCollections

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})

Last updated
DELETE/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

NameInTypeDescription
id requiredpathstringCollection id.
photoId requiredpathstringThe photoId supplied at index time.
immediatequerybooleanPhysically delete the vectors now instead of soft-deleting them. Not restorable.
compliancequerybooleanAlias for immediate=true, additionally recorded as a compliance-class erasure.

Response body

FieldTypeDescription
deletedboolean
collection_idstring
photo_idstring
mode"soft" | "immediate"Which delete mode was applied.
restorablebooleanTrue for a soft delete (undo via the restore endpoint); false for an immediate delete, and false when found is false.
foundbooleanWhether this photo id had faces in the collection when the delete ran. Omitted only when neither the photo registry nor the engine could tell.
engineobjectThe engine's own acknowledgement, echoed for audit (includes purge_after as unix seconds on a soft delete).

Status codes

StatusMeaning
200Faceprints deleted.
401Missing or invalid API key.
404Resource not found.
502Deletion service unavailable.

On this page