Skip to content

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/json
json
{
  "image_ids": ["image_id_1", "image_id_2"],
  "collection": "default"
}

Parameters:

ParamTypeRequiredDefaultDescription
image_idsstring[]Yes—Image IDs in the DB. Must be images that were previously indexed.
collectionstringNodefault collectionCollection 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": []
}
FieldTypeDescription
data.request_idstringRequest ID; quote it to CAKE Support when checking logs.
errorsarrayDetail 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 ​

CodeMessage
2001010Access ID not found.
401100You are not authorized to perform the action.
4001000Input parameter violates a constraint.
4001001The X-TV-Timestamp header is expired, need a newer one.
5001000Some unexpected error occurs while processing the request.
CodeDescription
access_denied_exceptionYou are not authorized to perform the action.
invalid_parameter_exceptionInput parameter violates a constraint.
request_time_too_skewedThe X-TV-Timestamp header is expired, need a newer one.
image_not_found_exceptionThe image ID is not found in DB.
request_timeout_exceptionRequest takes too long to process.
rate_limit_exceptionThe number of requests exceeded your throughput limit.
internal_server_errorSome unexpected error occurs while processing the request.

Next Steps ​

Developers