ReferenceREST API

Sessions

Create, list, retrieve, decide and cancel verification sessions; evidence URLs and PII erasure.

View as Markdown

Guide: sessions.

Base URL https://api.okyc.stream/v1 · API version 2026-10-01 · authenticate with Authorization: Bearer sk_test_….

POST /v1/sessions

Create a verification session.

Request body (CreateSession, required)

FieldTypeRequiredNotes
workflow_idstringyes—
reference_idstringYour user's id — max length 128
countrystringApplicant's country; defaults to the workflow's — length 2
prefillobject—
prefill.phonestring—
prefill.emailstringformat email
prefill.full_namestring—
localestring—
redirect_urlstringformat uri
metadataobject (map)—
expires_inintegerSeconds — min 300, max 2592000

Responses

StatusDescriptionBody
201CreatedCreatedSession
400ErrorError
401ErrorError

GET /v1/sessions

List sessions.

Parameters

NameInTypeRequiredNotes
limitqueryintegermin 1, max 100, default 25
starting_afterquerystring—
statusquerycreated | started | in_progress | processing | approved | declined | review | resubmission_requested | expired | cancelled—
reference_idquerystring—

Responses

StatusDescriptionBody
200OKobject

GET /v1/sessions/{id}

Retrieve a session.

Parameters

NameInTypeRequiredNotes
idpathstringyese.g. ses_in_01j…
expandquerystringe.g. checks,applicant

Responses

StatusDescriptionBody
200OKSession
404ErrorError

POST /v1/sessions/{id}/decision

Decide a session in review (or override a final decision).

Parameters

NameInTypeRequiredNotes
idpathstringyese.g. ses_in_01j…

Request body (Decision, required)

FieldTypeRequiredNotes
outcomeapproved | declined | resubmission_requestedyes—
reason_codestringyesmax length 64
notestringmax length 2000
stepsstring[]For resubmission: steps the applicant must redo

Responses

StatusDescriptionBody
200OKobject
409ErrorError

POST /v1/sessions/{id}/cancel

Cancel an active session.

Parameters

NameInTypeRequiredNotes
idpathstringyese.g. ses_in_01j…

Responses

StatusDescriptionBody
200OKobject
409ErrorError

POST /v1/sessions/{id}/client_token

Issue a fresh client token (resume in the frontend).

Parameters

NameInTypeRequiredNotes
idpathstringyese.g. ses_in_01j…

Responses

StatusDescriptionBody
200OKobject
409ErrorError

GET /v1/sessions/{id}/evidence/{evidence_id}

Short-lived URL for an evidence file.

Parameters

NameInTypeRequiredNotes
idpathstringyese.g. ses_in_01j…
evidence_idpathstringyes—

Responses

StatusDescriptionBody
200OKobject
404ErrorError

DELETE /v1/sessions/{id}/pii

Erase personal data (DPDP erasure).

Parameters

NameInTypeRequiredNotes
idpathstringyese.g. ses_in_01j…

Responses

StatusDescriptionBody
200OKobject

On this page