Data erasure log

POST /kyc/session/erase/log


Description

The method returns the log of personal data erasure and record deletion operations for a period: kyc/session/erase calls, session deletion in the personal account and questionnaire deletion. Records go from oldest to newest, page by page.

The user who owns the token must have the permission to view KYC logs.


Request format

  • HTTP method: POST
  • URL: /kyc/session/erase/log
  • Content type: application/json

Authorization

Pass the token in one of two ways:

  • the token: <jwt-token> header — a temporary JWT token obtained with the user/login method;
  • the token field in the request body — a permanent API token (UUID) from the personal account.

Without a token the request returns 401 access denied. See Authentication for details.


Request parameters

ParameterTypePassed inRequiredDescription
tokenstring (UUID)body—Permanent API token, if there is no token header
fromstringbody✅Period start, inclusive. ISO 8601 with offset (2026-03-01T00:00:00+03:00) or a date (2026-03-01 — midnight UTC)
tostringbody✅Period end, exclusive. Same format as from. from is not later than to, the period is at most 366 days
sessionIdstring (UUID)body❌Only operations on this session or questionnaire record
clientUserstringbody❌Only operations on this user, from 1 to 36 characters. Together with sessionId both filters apply
pageintegerbody❌Page number, from 1. Default 1
pageSizeintegerbody❌Records per page, from 1 to 500. Default 100

Request example (cURL)

curl -X POST "https://api.neuro-vision.ru/v1/kyc/session/erase/log" -H "token: <jwt-token>" -H "Content-Type: application/json" -d '{"from": "2026-03-01", "to": "2026-04-01", "page": 1, "pageSize": 100}'

Log record fields

FieldTypeDescription
atstringWhen the operation was performed, ISO 8601 UTC
sessionIdstringSession or questionnaire record
clientKeystringSession client key
clientUserstring \null
actionstringerase — personal data erased; delete — record deleted
channelstringWhere the operation came from: rest — through the API, cabinet — an operator in the personal account, system — the system completed the erasure itself
actorstring \null
actorStaffbooleantrue if the operation was performed by platform staff on your behalf
reasonstringReason passed to kyc/session/erase
categoriesobject \null
partsobject \null

Response examples

Success (200 OK)

{
  "status": "ok",
  "operations": [
    {
      "at": "2026-03-10T08:00:00.000Z",
      "sessionId": "00000000-0000-0000-0000-000000000000",
      "clientKey": "client-0001",
      "clientUser": "user-0001",
      "action": "erase",
      "channel": "rest",
      "actor": "operator@example.com",
      "actorStaff": false,
      "reason": "subject_request",
      "categories": { "text": "document data, contacts, browser fingerprint, check provider answers" },
      "parts": {
        "text": { "state": "erased" },
        "media": { "state": "erased" }
      }
    }
  ],
  "page": 1,
  "pageSize": 100,
  "total": 1
}

total — the total number of records for the period.

Error (400 Bad Request)

The body does not match the schema, from is later than to, the period is longer than 366 days, or clientUser is empty or longer than 36 characters.

{
  "status": "error",
  "result": "invalid_request",
  "details": []
}

Error (403 Forbidden)

No permission to view KYC logs.

{
  "status": "error",
  "result": "no_permission"
}

Error (500 Internal Server Error)

{
  "status": "error",
  "message": "internal error"
}