REST API: KYC

Filter KYC sessions

Search sessions, page through them or export them.

Purpose

Use this call to find sessions by date, status, client key, scenario and other criteria, and to export the matching sessions as an archive. The caller needs the logsKYC permission.

Request

POST <API_BASE_URL>/kyc/sessions/filter. 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.
pagenumbernoThe page number. Starts at 1.
pageSizenumbernoSessions per page.
zipbooleannoSet to true to order an export instead of a listing. The answer then carries the archive name, and the archive is built after the answer is sent.
isXLSbooleannoWith zip, the file inside the archive is XLSX instead of CSV.
filtersobjectnoThe search criteria, see below.

Filters

All criteria go inside the filters object. Criteria combine; leave out the ones you do not need.

CriterionMeaning
rangeCreation date. An object with start, end (dates such as 2026-01-31) and sortOrder (ASC or DESC). Dates are calendar days in UTC. With only one boundary the window is one day.
statusOne session status: idle, processing, success, failed, exception, suspicious or expired.
sessionA session identifier. A search by session ignores the date range.
clientThe client identifier that the platform resolved for the person. Exact match.
clientKeyA match on your clientKey or clientUser field.
schemaIdExact match on the scenario identifier.
groupByClientIdA boolean. The contract example sends false. Leave it out unless you need it.
ocrAn array of strings searched in the recognized document fields. Several values combine with OR.
typeAn array of document types. Several values combine with OR.
errorsAn array of error codes of the steps. Several values combine with OR.
checksAn object of the form { "<check caption>": "<status>" }.

Response

HTTP 200. One page of sessions.

FieldTypeDescription
statusstringAlways ok on this body.
results.sessionsarray of objectThe sessions of this page. Each item is a session object. The order is not defined unless you send filters.range.sortOrder.
results.pageInfo.totalnumberThe number of pages, not of sessions.
results.pageInfo.currentPagenumberThe page you asked for, echoed back.
results.pageInfo.totalItemsnumberThe number of sessions that match the filter.

Export. With zip set to true the answer carries results.archiveName and results.totalSessions instead of sessions. The archive is built after the answer is sent, so the first download attempts can answer not found. Fetch it with download logs archive.

Redaction, not omission. Without the permissions to view document text, checks or images, the matching key of every step arrives as the string Access denied instead of being left out.

Errors

  • 400: The body failed validation. The answer has status of error and a details list with one entry per offending field (path, expected, actual).
  • 401: The token is missing, expired or unknown.

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/sessions/filter" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "<your permanent API token>",
    "page": 1,
    "pageSize": 20,
    "filters": {
      "status": "failed",
      "range": {
        "start": "2026-01-01",
        "end": "2026-01-31",
        "sortOrder": "DESC"
      }
    }
  }'

Response:

{
  "status": "ok",
  "results": {
    "sessions": [
      {
        "sessionId": "00000000-0000-0000-0000-000000000000",
        "status": "failed",
        "schemaId": "<your scenario id>",
        "clientKey": "<your identifier for the person>",
        "secondsToLive": 3600,
        "createdAt": "2026-01-01T10:00:00.000Z",
        "errors": [],
        "results": [
          {
            "type": "document",
            "status": "idle"
          },
          {
            "type": "selfie",
            "status": "idle"
          },
          {
            "type": "liveness",
            "status": "idle"
          },
          {
            "type": "faces",
            "status": "idle"
          }
        ]
      }
    ],
    "pageInfo": {
      "total": 1,
      "currentPage": 1,
      "totalItems": 1
    }
  }
}

Questions while integrating?

Write to us with the details and we will help.

Talk to us