REST API: data erasure
Data erasure log
Prove what was erased, when, why and by whom.
Purpose
Use this call to read the journal of destruction and deletion for your group over a period, for example to answer an audit question or to confirm to a person that their data was erased. The caller needs the logsKYC permission. The journal comes back oldest first.
Request
POST <API_BASE_URL>/kyc/session/erase/log. All calls are POST under your API address. Replace <API_BASE_URL> with the API address provided with your access.
Send a permanent API token in the token field of the body, or a user token in the token header. See authentication.
Content type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
token | string (uuid) | if no header | Your permanent API token. Required unless you send a user token in the token header. |
from | string (date-time) | yes | The start of the period, inclusive. a date and time with a time zone offset, or a date alone, taken as UTC midnight. |
to | string (date-time) | yes | The end of the period, exclusive. Same formats. from must not be after to, and the period is at most 366 days. |
sessionId | string | no | Only the records of this session or questionnaire record. |
clientUser | string | no | Only the records of sessions with this clientUser. With sessionId, both filters apply. |
page | integer | no | The page number, starting at 1. |
pageSize | integer | no | Records per page, 1 to 500. |
Response
HTTP 200. The records of your group in the period, oldest first.
| Field | Type | Description |
|---|---|---|
status | string | Always ok on this body. |
operations | array of object | The records of this page. |
operations[].at | string (date-time) | When the operation was recorded, a UTC timestamp. |
operations[].sessionId | string | The session or questionnaire record the operation was about. |
operations[].clientKey | string | The client key of the session, as you set it. |
operations[].clientUser | string | The clientUser of the session, or null when it has none. |
operations[].action | string | erase: the personal data was destroyed. delete: the record was deleted from the dashboard. |
operations[].channel | string | Where the operation came from: rest for erase session personal data, cabinet for an operator in the dashboard, system for the background retry. |
operations[].actor | string | The email of the user who made the call. Null for staff operations, for the system channel and when the user no longer exists. |
operations[].reason | string | Why the data was destroyed: one of the five values of the erase call. |
operations[].categories | object | The kinds of data the operation destroyed, each with its description. |
operations[].parts | object | The state of each kind of data after the operation; only the kinds that apply are present. |
page | integer | The page returned. |
pageSize | integer | Records per page, as requested. |
total | integer | The number of records in the period, across all pages. |
The period is the interval from from up to, but not including, to: a record made exactly at from is included and one made exactly at to is not.
Errors
400: The body does not match the request schema, orfromis afterto, or the period is longer than allowed.401: The token is missing, expired or unknown.403: The token holder lacks thelogsKYCpermission.500: An unexpected internal failure. The answer hasstatusoferrorand the fixed textinternal error; nothing in the body helps you branch beyond the code.
A refusal can also come before the operation runs: an address outside your IP allowlist, a token bound to another address, or a body that is not valid JSON. See response format and errors.
Example
Request:
curl -X POST "<API_BASE_URL>/kyc/session/erase/log" \
-H "Content-Type: application/json" \
-d '{
"token": "<your permanent API token>",
"from": "2026-01-01",
"to": "2026-02-01",
"page": 1,
"pageSize": 100
}'
Response:
{
"status": "ok",
"operations": [
{
"at": "2026-01-05T09:30:00Z",
"sessionId": "00000000-0000-0000-0000-000000000000",
"clientKey": "<your identifier for the person>",
"clientUser": null,
"action": "erase",
"channel": "rest",
"actor": "<operator email>",
"reason": "subject_request",
"parts": {
"text": {
"state": "erased"
},
"media": {
"state": "erased"
},
"person": {
"state": "erased"
},
"questionnaire": {
"state": "absent"
}
}
}
],
"page": 1,
"pageSize": 100,
"total": 1
}