Delete face data stored in the SightRadar face recognition API and confirm it is gone. Use when the user needs to remove a person's selfie or photos, handle a GDPR, CCPA or BIPA erasure or "right to be forgotten" request, delete an event or collection, undo an accidental delete, set up retention clean-up, or prove that face data was erased.
0 votes
0 copies
1 view
Added December 5, 2026
ai-agentspythongobashapi
Works with
api
Security analysis
A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of face-data-deletion?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sightradar-hq-face-data-deletion)
---
name: face-data-deletion
description: Delete face data stored in the SightRadar face recognition API and confirm it is gone. Use when the user needs to remove a person's selfie or photos, handle a GDPR, CCPA or BIPA erasure or "right to be forgotten" request, delete an event or collection, undo an accidental delete, set up retention clean-up, or prove that face data was erased.
license: MIT
compatibility: Needs network access to api.sightradar.com, a SightRadar API key in SIGHTRADAR_API_KEY, and curl.
metadata:
author: SightRadar team
version: "1.0.0"
homepage: https://sightradar.com
---
# Face data deletion
SightRadar stores faceprints, never the photos. Faceprints sit in three places, each with its own delete. All deletes are free.
| What | Call | Default | Undo |
| --- | --- | --- | --- |
| A whole collection (event, library) | `DELETE /v1/collections/{id}` | soft | `POST /v1/collections/{id}/restore` |
| The faces indexed from one photo | `DELETE /v1/collections/{id}/photos/{photoId}` | soft | `POST /v1/collections/{id}/photos/{photoId}/restore` |
| One registered selfie | `DELETE /v1/collections/{id}/selfies/{selfieId}` | permanent | none |
| Every selfie of one user | `DELETE /v1/collections/{id}/users/{userId}` | permanent | none |
**Soft** means the data stops being served at once and is erased after a grace window; until then it can be restored. **Permanent** means the faceprints are removed before the call returns.
## Rules for the agent
- Deleting is the one thing here that cannot always be undone. **Name exactly what will be deleted and get a clear yes from the user before any permanent delete** (`?immediate=true`, `?compliance=true`, selfie and user deletes).
- Prefer the soft default unless the user asked for erasure.
- Key: `export SIGHTRADAR_API_KEY="frs_..."`. Never print or commit it. If it is missing, ask the user to set it; do not ask them to paste it in chat.
```bash
B="https://api.sightradar.com"; AUTH="Authorization: Bearer $SIGHTRADAR_API_KEY"
```
## Look before deleting (free)
```bash
curl -s "$B/v1/collections" -H "$AUTH" # all collections
curl -s "$B/v1/collections/event-2026" -H "$AUTH" # photo_count, face_count, selfie_count
```
## Delete a collection
```bash
curl -s -X DELETE "$B/v1/collections/event-2026" -H "$AUTH"
# 202 {"status":"deletion_pending","mode":"soft","restorable":true,"purge_after":"..."}
curl -s -X POST "$B/v1/collections/event-2026/restore" -H "$AUTH" # undo, any time before purge_after
curl -s -X DELETE "$B/v1/collections/event-2026?immediate=true" -H "$AUTH" # erase now, not restorable
curl -s -X DELETE "$B/v1/collections/event-2026?compliance=true" -H "$AUTH" # same, recorded as a compliance erasure
```
Erasure runs in the background. Confirm it finished:
```bash
curl -s "$B/v1/collections/event-2026/deletion" -H "$AUTH"
# {"phase":"completed","verified_zero":true,"deletion_class":"compliance","completed_at":"..."}
```
The data is gone when `phase` is `completed` **and** `verified_zero` is `true`. Poll every few seconds until then. `phase` is one of `not_deleting`, `deletion_pending`, `deleting`, `completed`, `blocked`. If it stays `blocked`, tell the user and point them to support@sightradar.com. After completion the same id can be started again, empty, with `POST /v1/collections/{id}/recreate`.
## Delete one photo's faces
```bash
curl -s -X DELETE "$B/v1/collections/event-2026/photos/IMG_0012" -H "$AUTH"
# {"deleted":true,"photo_id":"IMG_0012","mode":"soft","restorable":true,"found":true}
curl -s -X POST "$B/v1/collections/event-2026/photos/IMG_0012/restore" -H "$AUTH" # undo
curl -s -X DELETE "$B/v1/collections/event-2026/photos/IMG_0012?immediate=true" -H "$AUTH" # permanent
```
`photoId` is the id passed when the photo was indexed. URL-encode it if it contains spaces or other special characters. An id that contains `/` cannot be addressed by this route, even encoded: delete the collection instead, or index with slash-free ids. `found: false` means that photo had no faces in the collection. The call is safe to repeat.
## Delete a person's selfies
```bash
curl -s -X DELETE "$B/v1/collections/event-2026/users/u_42" -H "$AUTH" # every selfie of user u_42
# {"deleted_selfie_ids":["s1"],"deleted_count":1}
curl -s -X DELETE "$B/v1/collections/event-2026/selfies/s1" -H "$AUTH" # one selfie
curl -s -X DELETE "$B/v1/collections/event-2026/selfies/s1?userId=u_42" -H "$AUTH" # only that user's copy
```
These are permanent and verified: a 200 means no matching selfie remains. A 503 means one is still stored; retry the same call. An unknown id returns 200 with nothing deleted. Add `?compliance=true` to record the delete as a compliance erasure.
## Handling an erasure request for one person
A person's data can be in two forms, and a full erasure covers both:
1. **Their selfies**: `DELETE /v1/collections/{id}/users/{userId}` in every collection where they registered.
2. **Their face in indexed photos**: SightRadar keeps no link between a photo face and a user, so first find the photos, then delete them.
- Before deleting the selfie, search the collection with it (see the `face-search` skill) to list the `photo_id`s the person appears in. Have the user confirm the list, because a search can include look-alikes.
- Delete each confirmed photo with `DELETE /v1/collections/{id}/photos/{photoId}?compliance=true`. This removes every face indexed from that photo, including other people's.
3. Record what was deleted and when: the ids, the timestamps, and the responses. That record is the user's evidence.
The user's own copies of the images, backups and logs are outside the API. Remind them those need handling too. This skill covers the mechanics; whether and when a request must be honoured is a legal question for the user.
## In code
```python
# pip install sightradar
from sightradar import SightRadar
sr = SightRadar() # reads SIGHTRADAR_API_KEY
sr.delete_user_selfies("event-2026", "u_42")
sr.delete_photo("event-2026", "IMG_0012") # soft; sr.restore_photo(...) undoes it
sr.delete_collection("event-2026", compliance=True) # permanent
print(sr.deletion_status("event-2026").erased) # True when completed and verified
```
## Errors
401 bad key. 403 the key cannot delete in this account. 404 collection not found. 409 the collection is already being deleted, or a restore came after the purge started. 503 on a selfie delete: retry. Full docs: https://sightradar.com/llms.txt