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.

FieldTypeRequiredDescription
tokenstring (uuid)if no headerYour permanent API token. Required unless you send a user token in the token header.
fromstring (date-time)yesThe start of the period, inclusive. a date and time with a time zone offset, or a date alone, taken as UTC midnight.
tostring (date-time)yesThe end of the period, exclusive. Same formats. from must not be after to, and the period is at most 366 days.
sessionIdstringnoOnly the records of this session or questionnaire record.
clientUserstringnoOnly the records of sessions with this clientUser. With sessionId, both filters apply.
pageintegernoThe page number, starting at 1.
pageSizeintegernoRecords per page, 1 to 500.

Response

HTTP 200. The records of your group in the period, oldest first.

FieldTypeDescription
statusstringAlways ok on this body.
operationsarray of objectThe records of this page.
operations[].atstring (date-time)When the operation was recorded, a UTC timestamp.
operations[].sessionIdstringThe session or questionnaire record the operation was about.
operations[].clientKeystringThe client key of the session, as you set it.
operations[].clientUserstringThe clientUser of the session, or null when it has none.
operations[].actionstringerase: the personal data was destroyed. delete: the record was deleted from the dashboard.
operations[].channelstringWhere the operation came from: rest for erase session personal data, cabinet for an operator in the dashboard, system for the background retry.
operations[].actorstringThe email of the user who made the call. Null for staff operations, for the system channel and when the user no longer exists.
operations[].reasonstringWhy the data was destroyed: one of the five values of the erase call.
operations[].categoriesobjectThe kinds of data the operation destroyed, each with its description.
operations[].partsobjectThe state of each kind of data after the operation; only the kinds that apply are present.
pageintegerThe page returned.
pageSizeintegerRecords per page, as requested.
totalintegerThe 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, or from is after to, or the period is longer than allowed.
  • 401: The token is missing, expired or unknown.
  • 403: The token holder lacks the logsKYC permission.
  • 500: An unexpected internal failure. The answer has status of error and the fixed text internal 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
}

Questions about erasure?

Write to us and we will help.

Talk to us