Delete Faces
Removes indexed faces from a collection by their image IDs. Use it to honour erasure requests and to unwind an enrolment made in error.
Endpoint
http
POST /v1/delete_faces
Content-Type: application/jsonjson
{
"image_ids": ["image_id_1", "image_id_2"],
"collection": "default"
}Parameters:
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
image_ids | string[] | Yes | — | Image IDs in the DB. Must be images that were previously indexed. |
collection | string | No | default collection | Collection to remove the faces from. |
Sample Request
bash
curl -X POST \
'<BASE_URL>/v1/delete_faces' \
-H 'Authorization: ATV <ACCESS_ID>:<SIGNATURE>' \
-H 'X-TV-Timestamp: <TIMESTAMP>' \
-H 'Content-Type: application/json' \
-d '{
"image_ids": [
"image_id_1",
"image_id_2"
]
}'Response
json
{
"data": {
"request_id": "80f2d57d-1277-4f6a-b075-451639e9b349"
},
"errors": []
}| Field | Type | Description |
|---|---|---|
data.request_id | string | Request ID; quote it to CAKE Support when checking logs. |
errors | array | Detail of each failure. Empty on success. |
WARNING
Deletion is irreversible and removes the face from the search index — anyone deleted will no longer be found by Search Faces, so duplicate and blocklist checks will stop flagging them. Confirm the image IDs before calling.
Errors
| Code | Message |
|---|---|
2001010 | Access ID not found. |
401100 | You are not authorized to perform the action. |
4001000 | Input parameter violates a constraint. |
4001001 | The X-TV-Timestamp header is expired, need a newer one. |
5001000 | Some unexpected error occurs while processing the request. |
| Code | Description |
|---|---|
access_denied_exception | You are not authorized to perform the action. |
invalid_parameter_exception | Input parameter violates a constraint. |
request_time_too_skewed | The X-TV-Timestamp header is expired, need a newer one. |
image_not_found_exception | The image ID is not found in DB. |
request_timeout_exception | Request takes too long to process. |
rate_limit_exception | The number of requests exceeded your throughput limit. |
internal_server_error | Some unexpected error occurs while processing the request. |
Next Steps
- Index Faces — re-enrol a face after deletion
- eKYC Overview — the full API surface