{"openapi":"3.0.0","info":{"description":"This is a Identification SaaS API specification","version":"2.0.0","title":"Identification SaaS","termsOfService":"https://verigram.ai","contact":{"email":"support@verigram.ai"},"license":{"name":"Verigram","url":"https://verigram.ai"}},"tags":[{"name":"Flow","description":"Flow management"},{"name":"Servicelogs","description":"Journals of service executions"},{"name":"Liveness","description":"Liveness verification service"},{"name":"Face","description":"Face recognition service"},{"name":"Resources","description":"Resources required for or produced by the execution of the services, directly or indirectly, like access_tokens, webhooks, media files, etc."},{"name":"Mocking services","description":"Mocking services for testing and development purposes"}],"externalDocs":{"description":"Identification SaaS documentation","url":"https://support.verigram.ai/docs"},"servers":[{"url":"https://demo.verigram.kz"},{"url":"https://services.kz-ala-1.verigram.kz"}],"paths":{"/flow":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"post":{"security":[{"ApiKey":[]}],"tags":["Flow"],"summary":"Create a new flow","description":"Initialize a new identity verification flow for a specific person.  Requires a person identifier and can be customized with specific  templates, locales, and initial data. Returns a unique flow identifier  and a 'vlink' — a URL to the hosted verification interface that can  be used for user redirection or embedded via iframe.\n","operationId":"createFlow","requestBody":{"$ref":"#/components/requestBodies/CreateFlowRequest"},"responses":{"201":{"$ref":"#/components/responses/FlowCreatedResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/flow/{flow_id}":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"security":[{"ApiKey":[]}],"tags":["Flow"],"summary":"Retrieve detailed information about a specific flow","description":"Get the current state and configuration of a flow by its unique identifier.  Returns comprehensive details including the flow's current status,  execution progress (current step), configuration template, and any  input data provided. Access is restricted to the flow's owner.\n","operationId":"getFlow","responses":{"200":{"$ref":"#/components/responses/FlowDetailsResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/flow/{flow_id}/result":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"security":[{"ApiKey":[]}],"tags":["Flow"],"summary":"Get flow result","description":"Retrieve the execution results of a completed or failed flow.  Returns a projected view of the results for all sessions  executed during the flow, associated with the person's identity.  Access is restricted to the flow's owner. Returns 404 if flow is not started  yet.\n","operationId":"getFlowResult","responses":{"200":{"$ref":"#/components/responses/FlowProjectionResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/journal/session/{session_id}":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"security":[{"ApiKey":[]}],"tags":["Servicelogs"],"summary":"Get session result","description":"Retrieve detailed technical logs and results for a specific service session  (e.g., liveness check, document recognition). This endpoint  returns the session context and results.\n","operationId":"getSessionResult","responses":{"200":{"$ref":"#/components/responses/SessionProjectionResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/liveness2/session":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"post":{"security":[{"ApiKey":[]}],"tags":["Liveness"],"summary":"Create new liveness session","description":"Create new liveness session. Pass the returned JSON object to the frontend  (web, android or ios libraries) so you can initialize and start the session.\n","operationId":"createNewLiveness2Session","requestBody":{"$ref":"#/components/requestBodies/Liveness2CreateSessionRequest"},"responses":{"201":{"$ref":"#/components/responses/Liveness2SessionCreatedResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/face":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"post":{"security":[{"ApiKey":[]}],"tags":["Face"],"summary":"Insert a face","description":"Enroll a face by providing `person_id` and a base64-encoded `image`. `collection` defaults to `default`. If `collection` is set to `custom`,  `custom_collection` parameter is required.\n\nThe service extracts and stores the face embedding for the authenticated consumer. Enrolling the same `person_id` in the same collection replaces its existing embedding.\n\nHTTP 201 contains a completed session projection with:\n  - service_name: veriface\n  - session_status: pass\n  - result.action: enroll\n  - result.service_status: enrolled\n","operationId":"insertFace","requestBody":{"$ref":"#/components/requestBodies/FaceInsertRequest"},"responses":{"201":{"$ref":"#/components/responses/FaceEnrolledResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/face:exists":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"security":[{"ApiKey":[]}],"tags":["Face"],"summary":"Check if face exists","description":"Look up a stored face by `person_id` in the provided collection, if not provided `default` collection is used. When it is `custom`, `custom_collection` is required.\n\nReturn HTTP 200 with the JSON string `\"OK\"` when a record exists.\n","operationId":"faceExists","parameters":[{"name":"person_id","in":"query","required":true,"description":"Person ID","schema":{"$ref":"#/components/schemas/PersonId"}},{"name":"collection","in":"query","required":false,"description":"Faces database collection name. Used to search an embedding by person_id.","schema":{"type":"string","enum":["blacklist","whitelist","graylist","watchlist","default","custom"],"default":"default"}},{"name":"custom_collection","in":"query","required":false,"description":"Custom collection name, required when 'collection' is set to 'custom'.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Face exists","content":{"application/json":{"schema":{"type":"string","example":"OK"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/faces:find":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"post":{"security":[{"ApiKey":[]}],"tags":["Face"],"summary":"Find a face","description":"Search for a face in collection in one of two ways:\n\n  - Pass `person_id` to look up that exact stored record.\n  - Pass a base64-encoded `image` to search for a similar face in the collection.\n\nWhen both `person_id` and `image` are supplied, the `person_id` lookup takes prority and the image is ignored.\n\nAt least one of `person_id` or `image` is required. `collection` defaults to `default`, `custom_collection` is required when `collection` is `custom`.\n\nHTTP 201 contains a completed session projection with `service_name: veriface` and `result.action: find`. A found record gives `session_status: pass` and `service_status: positive`, no match gives `fail` and `negative`. For image-only searches, the session's `person_id` is the consumer ID, not a matched person's ID.\n","operationId":"findFace","requestBody":{"$ref":"#/components/requestBodies/FaceSearchRequest"},"responses":{"201":{"$ref":"#/components/responses/FaceSearchResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/faces:match":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"post":{"security":[{"ApiKey":[]}],"tags":["Face"],"summary":"Face matching","description":"Compare one enrollment face with one verification face. This is a one-to-one comparison, not a collection-wide search or a liveness check.\n\nEnrollment source, in order of precedence:\n  - `enroll_image`: a base64-encoded image.\n  - `enroll_session_id`: a Verilive session with a stored `bestframe` image.\n  - The face stored for `person_id` in `enroll_collection` (default:\n     `default`). This fallback is used only when neither enrollment image\n     nor enrollment session is supplied.\n\n\nSupply `verif_image` or `verif_session_id` for the verification face. Both session ID inputs support only Verilive sessions with a stored `bestframe` image. If both are supplied, the image takes priority.\n\nSupply `person_id`, or omit it to get it from `verif_session_id`. An enrollment session alone does not supply the person ID. `flow_id` optionally associates the comparison with a flow; otherwise the service obtains an automatic flow ID. `enroll_custom_collection` is required whenever `enroll_collection` is `custom`.\n\nHTTP 201 contains a completed Veriface session with `result.action: verify` and an integer similarity `score` from 0 to 100. `match` maps to `session_status: pass`, and `mismatch` maps to `fail`. Both outcomes return HTTP 201.\n\nMissing required inputs or a missing enrollment database record produce HTTP 422. \n","operationId":"matchFaces","requestBody":{"$ref":"#/components/requestBodies/FaceMatchRequest"},"responses":{"201":{"$ref":"#/components/responses/FaceMatchResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/faces:stats":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"security":[{"ApiKey":[]}],"tags":["Face"],"summary":"Face stats","description":"Get face database statistics. For a given collection, returns the number of faces  present in the database. If no collection is specified, returns statistics for all  collections.\n","operationId":"getFaceStats","parameters":[{"name":"collection","in":"query","required":false,"description":"Built-in or custom collection name, omit to list all existing collections.","schema":{"type":"string"}}],"responses":{"200":{"description":"Face statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FacesStat"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/resources/file":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"security":[{"ApiKey":[]}],"tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/FilterFileLabelExact"},{"$ref":"#/components/parameters/FilterPersonIdExact"},{"$ref":"#/components/parameters/FilterSessionIdExact"},{"$ref":"#/components/parameters/FilterFlowIdExact"}],"summary":"Download files","description":"Download files generated by services during verification processes.  It always returns a file from the latest session if the request is ambiguous. Combine the file label with only one of the next IDs - session ID, flow ID or  person ID. Specifying multiple IDs in a query string may cause an error. Returns the file as a binary stream.\n","operationId":"getFiles","responses":{"200":{"$ref":"#/components/responses/SaasFile"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/resources/webhooks":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"get":{"security":[{"ApiKey":[]}],"tags":["Resources"],"parameters":[{"name":"service_name","in":"query","required":false,"description":"Return only the webhook registered for this service. If omitted, all active webhooks of the account are returned.\n","schema":{"$ref":"#/components/schemas/WebhookServiceName"}}],"summary":"List webhooks","description":"Get the list of active webhooks registered for the account.\n","operationId":"getWebhooks","responses":{"200":{"$ref":"#/components/responses/WebhooksResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/resources/webhook":{"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"post":{"security":[{"ApiKey":[]}],"tags":["Resources"],"summary":"Register a webhook","description":"Register a webhook URL for a service. Only one webhook can be registered per service: if a webhook for the service already exists (active or deleted), its target URL is replaced and the webhook becomes active. Use the `flow-end` service name to receive a notification when a flow ends, or a `custom_<name>` service name for custom notifications.\n","operationId":"createWebhook","requestBody":{"$ref":"#/components/requestBodies/WebhookCreateRequest"},"responses":{"201":{"description":"Webhook registered"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"ApiKey":[]}],"tags":["Resources"],"summary":"Delete a webhook","description":"Deactivate the webhook registered for a service. Notifications for the service are no longer sent. The webhook can be activated again by registering it with the POST method.\n","operationId":"deleteWebhook","requestBody":{"$ref":"#/components/requestBodies/WebhookDeleteRequest"},"responses":{"204":{"description":"Webhook deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mockery/result":{"post":{"security":[{"ApiKey":[],"ApiVersion":[]}],"tags":["Mocking services"],"summary":"Create a mock result","description":"Create a mocked service result for a specific person. Enables testing and development workflows by mocking service execution outcomes.\n","operationId":"createMockResult","requestBody":{"$ref":"#/components/requestBodies/MockResultRequest"},"responses":{"201":{"description":"Mock result created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mockery/result/{person_id}/{service_name}":{"get":{"security":[{"ApiKey":[],"ApiVersion":[]}],"tags":["Mocking services"],"summary":"Get a mock result","description":"Retrieve the mocked service result for a specific person and service.\n","operationId":"getMockResult","parameters":[{"name":"person_id","in":"path","required":true,"description":"Person ID","schema":{"$ref":"#/components/schemas/PersonId"}},{"name":"service_name","in":"path","required":true,"description":"Service name","schema":{"$ref":"#/components/schemas/ServiceName"}}],"responses":{"200":{"$ref":"#/components/responses/MockResultResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"security":[{"ApiKey":[],"ApiVersion":[]}],"tags":["Mocking services"],"summary":"Delete a mock result","description":"Remove the mocked service result for a specific person and service.\n","operationId":"deleteMockResult","parameters":[{"name":"person_id","in":"path","required":true,"description":"Person ID","schema":{"$ref":"#/components/schemas/PersonId"}},{"name":"service_name","in":"path","required":true,"description":"Service name","schema":{"$ref":"#/components/schemas/ServiceName"}}],"responses":{"204":{"description":"Mock result removed"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"responses":{"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"Forbidden":{"description":"Request is forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"Unprocessable":{"description":"Unprocessable request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"TooManyRequests":{"description":"Too many request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"UpstreamUnavailable":{"description":"Upstream unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"Conflict":{"description":"Conflict with the current state of the target resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasErrorResponse"}}}},"MockResultResponse":{"description":"Mock result details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockResult"}}}},"Liveness2SessionCreatedResponse":{"description":"An object with session id and other info representing a Liveness2 session, that need to be passed to the frontend.","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","format":"uuid","description":"A token to be used in the frontend to authenticate the user"},"session_id":{"type":"string","description":"The identifier of the newly created session"},"person_id":{"type":"string","description":"The identifier of the person associated with the session"},"flow_id":{"type":"string","description":"The identifier of the flow associated with the session. Is generated automatically by the system if not passed when creating the session."},"created_at":{"type":"string","format":"date-time"},"attempts_left":{"type":"integer","description":"The number of attempts left for the session"}}}}}},"SessionProjectionResponse":{"description":"Detailed session projection result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProjection"}}}},"FaceEnrolledResponse":{"description":"Face embedding enrolled successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProjection"},"examples":{"enrolled":{"$ref":"#/components/examples/FaceEnrolled"}}}}},"FaceSearchResponse":{"description":"Completed lookup, both positive and negative results return HTTP 201.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProjection"},"examples":{"found":{"$ref":"#/components/examples/FaceFound"},"notFound":{"$ref":"#/components/examples/FaceNotFound"}}}}},"FaceMatchResponse":{"description":"Completed comparison, both match and mismatch return HTTP 201.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProjection"},"examples":{"match":{"$ref":"#/components/examples/FaceMatched"},"mismatch":{"$ref":"#/components/examples/FaceMismatched"}}}}},"FlowDetailsResponse":{"description":"Flow details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flow"}}}},"FlowProjectionResponse":{"description":"Flow Projection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowProjection"}}}},"FlowCreatedResponse":{"description":"An object with flow id and link to the hosted frontend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowResponse"}}}},"SaasFile":{"description":"A file requested by identifier and/or labels","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"WebhooksResponse":{"description":"List of active webhooks","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}},"requestBodies":{"CreateFlowRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlow"}}}},"Liveness2CreateSessionRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Liveness2CreateSession"}}}},"FaceMatchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaceMatch"},"examples":{"livenessSessions":{"summary":"Compare bestframes from two existing liveness sessions.","value":{"person_id":"person-123","enroll_session_id":"enrollment-session-S","verif_session_id":"verification-session-S"}},"storedEnrollment":{"summary":"Compare a stored face with a liveness bestframe, derive person_id from that session.","value":{"enroll_collection":"default","verif_session_id":"verification-session-S"}}}}}},"FaceInsertRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaceInsert"}}}},"FaceSearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaceSearch"},"examples":{"personLookup":{"summary":"Look up an exact person ID in the default collection.","value":{"person_id":"person-123"}},"customCollection":{"summary":"Look up an exact person ID in a custom collection.","value":{"person_id":"person-123","collection":"custom","custom_collection":"my_collection"}}}}}},"MockResultRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockResultRequest"}}}},"WebhookCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"WebhookDeleteRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelete"}}}}},"examples":{"FaceEnrolled":{"summary":"Enrollment completed.","value":{"session_id":"face-enrolled-S","person_id":"person-123","consumer_id":"consumer-123","flow_id":"face-flow-F","api_version":"2.0.0","service_name":"veriface","session_status":"pass","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:01Z","session_states":[{"state_name":"created","created_at":"2026-10-02T10:00:00Z"},{"state_name":"processed","created_at":"2026-10-02T10:00:01Z"}],"result":{"service_name":"veriface","service_status":"enrolled","action":"enroll","score":null,"collection":"default","custom_collection":null,"error_code":null,"error_msg":null,"created_at":"2026-10-02T10:00:01Z","created_by":"system"}}},"FaceFound":{"summary":"Exact person lookup found a stored face.","value":{"session_id":"face-positive-S","person_id":"person-123","consumer_id":"consumer-123","flow_id":"face-flow-F","api_version":"2.0.0","service_name":"veriface","session_status":"pass","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:01Z","session_states":[{"state_name":"created","created_at":"2026-10-02T10:00:00Z"},{"state_name":"processed","created_at":"2026-10-02T10:00:01Z"}],"result":{"service_name":"veriface","service_status":"positive","action":"find","score":null,"collection":"default","custom_collection":null,"error_code":null,"error_msg":null,"created_at":"2026-10-02T10:00:01Z","created_by":"system"}}},"FaceNotFound":{"summary":"Exact person lookup found no stored face.","value":{"session_id":"face-negative-S","person_id":"person-123","consumer_id":"consumer-123","flow_id":"face-flow-F","api_version":"2.0.0","service_name":"veriface","session_status":"fail","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:01Z","session_states":[{"state_name":"created","created_at":"2026-10-02T10:00:00Z"},{"state_name":"processed","created_at":"2026-10-02T10:00:01Z"}],"result":{"service_name":"veriface","service_status":"negative","action":"find","score":null,"collection":"default","custom_collection":null,"error_code":null,"error_msg":null,"created_at":"2026-10-02T10:00:01Z","created_by":"system"}}},"FaceMatched":{"summary":"Comparison matched.","value":{"session_id":"face-match-S","person_id":"person-123","consumer_id":"consumer-123","flow_id":"face-flow-F","api_version":"2.0.0","service_name":"veriface","session_status":"pass","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:01Z","session_states":[{"state_name":"created","created_at":"2026-10-02T10:00:00Z"},{"state_name":"processed","created_at":"2026-10-02T10:00:01Z"}],"result":{"service_name":"veriface","service_status":"match","action":"verify","score":96,"collection":null,"custom_collection":null,"error_code":null,"error_msg":null,"created_at":"2026-10-02T10:00:01Z","created_by":"system"}}},"FaceMismatched":{"summary":"Comparison did not match.","value":{"session_id":"face-mismatch-S","person_id":"person-123","consumer_id":"consumer-123","flow_id":"face-flow-F","api_version":"2.0.0","service_name":"veriface","session_status":"fail","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:01Z","session_states":[{"state_name":"created","created_at":"2026-10-02T10:00:00Z"},{"state_name":"processed","created_at":"2026-10-02T10:00:01Z"}],"result":{"service_name":"veriface","service_status":"mismatch","action":"verify","score":23,"collection":null,"custom_collection":null,"error_code":null,"error_msg":null,"created_at":"2026-10-02T10:00:01Z","created_by":"system"}}}},"parameters":{"ApiKey":{"name":"api_key","in":"query","description":"Api key. A public part of an access key","required":true,"schema":{"type":"string"}},"ApiVersion":{"name":"X-Verigram-Api-Version","in":"header","description":"Required API version header.","required":true,"example":"2.0.0","schema":{"type":"string","default":"2.0.0"}},"FilterPersonIdExact":{"name":"person_id","in":"query","description":"Filter by person_id.","required":false,"schema":{"type":"string","example":"person_id=JackDorsey"}},"FilterSessionIdExact":{"name":"session_id","in":"query","description":"Filter by session_id.","required":false,"schema":{"type":"string","example":"session_id=123ABCDE-S"}},"FilterFlowIdExact":{"name":"flow_id","in":"query","description":"Filter by flow_id.","required":true,"schema":{"type":"string","example":"01KMWYGEEVW2TH4Q4SFFFFFFF5-F"}},"FilterFileLabelExact":{"name":"label","in":"query","description":"Filter by file label.","required":true,"schema":{"type":"string","example":"bestframe","enum":["bestframe","bf_zoom_in","bf_zoom_out","bf_turn_left","bf_turn_right","liveness_video","liveness_alt_video","liveness_frames","liveness_card","doc_face_picture","doc_signature_picture","doc_original_front_img","doc_original_back_img","doc_original_img","face_enroll_img","face_verif_img","egov_doc_pdf","kisc_pii","kisc_raw_content","kisc_raw_headers","signed_doc","signed_docs","certificate","cert_status","esign_original_doc","client_card","signed_doc_ticket","doc_builder_template","doc_builder_data","doc_builder_pdf","doc_builder_pdfs"]}}},"schemas":{"SaasErrorResponse":{"type":"object","properties":{"error_code":{"type":"string","description":"Internal error code. Do not confuse it with HTTP status code.","example":"NOT_FOUND, UNKNOWN_DOC_TYPE, UNAUTHORIZED, INVALID_PAYLOAD, DUPLICATE_KEY"},"error_msg":{"type":"string","example":"Person ID is required"}}},"CreateFlow":{"type":"object","properties":{"person_id":{"$ref":"#/components/schemas/PersonId"},"callback_url":{"type":"string","format":"uri","description":"Frontend callback URL the user will be redirected to after the flow  is completed.\n"},"locale":{"type":"string","enum":["kk","ru","en"],"default":"en","description":"Locale. Default is English"},"input_data":{"$ref":"#/components/schemas/FlowInputData"},"template":{"$ref":"#/components/schemas/FlowTemplate"},"template_id":{"type":"string","description":"Template ID"}},"required":["person_id"]},"CreateFlowResponse":{"type":"object","properties":{"flow_id":{"type":"string","description":"Identifier of the created flow"},"vlink":{"type":"string","description":"An HTTP URL that can be used for user redirection or embedded within your frontend application via iframe or webview.\n"}}},"FlowInputData":{"type":"object","description":"Input data necessary for the steps of the pipeline","properties":{"iin":{"type":"string","description":"IIN of a person"},"phone_number":{"type":"string","description":"Phone number of a person"},"full_name":{"type":"string","description":"Full name of a person"},"card_number":{"type":"string","description":"Credit card number"},"bin_field":{"type":"string","description":"BIN of an organization"},"org_name":{"type":"string","description":"Organization name"}}},"FlowTemplate":{"type":"object","description":"Flow template definition","properties":{"pipeline":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/VerilivePipelineStep"},{"$ref":"#/components/schemas/PipelineStep"}]},"description":"A list of steps to be executed in the flow"},"ui":{"$ref":"#/components/schemas/FlowConfigUi"},"status_page":{"type":"boolean","description":"Whether to show the final status page"}},"required":["pipeline"]},"FlowConfigUi":{"type":"object","description":"Configuration for the UI of the flow","properties":{"theme":{"$ref":"#/components/schemas/FlowTheme"},"logo_url":{"type":"string","format":"uri","description":"URL of the custom logo","default":"https://s3.eu-central-1.amazonaws.com/saas-statics.verigram.ai/logos/logo_vg_color.svg"},"favicon_url":{"type":"string","format":"uri","description":"URL of the custom favicon","default":"https://docs.services.verigram.cloud/2.0/assets/favicon.png"},"translation":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"description":"Custom translations for the UI. Format is {locale: {key: value}}\n"},"css":{"type":"string","description":"Custom CSS for the UI"}}},"FlowTheme":{"type":"string","description":"UI theme name","enum":["default","bts"],"default":"default"},"PipelineStep":{"type":"object","description":"A single step in the flow pipeline","properties":{"service_name":{"$ref":"#/components/schemas/ServiceName"},"allow_failure":{"type":"boolean","description":"Whether the flow can continue if this step fails","default":false},"timeout":{"type":"integer","description":"Step timeout in seconds","minimum":10,"maximum":172800,"default":300},"max_retries":{"type":"integer","description":"Maximum number of retries for the step","minimum":1,"maximum":10,"default":5}},"required":["service_name"]},"VerilivePipelineStep":{"description":"A `verilive` step in the flow pipeline.\n\nWhich settings apply depends on the Liveness SDK version used for the check:\n\n- **Below 2.1:** `native`, `show_start_page` and all `config` settings\n  except `camera_facing`.\n- **2.1 and later (except 5.x):** `show_start_page`, `show_retry_page`,\n  `config.camera_facing` and `config.record_video`.\n- **5.x:** none of the settings below.\n","allOf":[{"$ref":"#/components/schemas/PipelineStep"},{"type":"object","properties":{"service_name":{"type":"string","enum":["verilive"]},"native":{"type":"boolean","nullable":true,"description":"Whether the step runs in the native app (iOS/Android) instead of the web view"},"config":{"$ref":"#/components/schemas/VeriliveInitConfig"},"show_start_page":{"type":"boolean","nullable":true,"description":"Whether to show the liveness start page before the check. If omitted, `null` or `true`, the start page is shown on the first attempt; retries skip it. If `false`, the check starts without the start page.\n"},"show_retry_page":{"type":"boolean","nullable":true,"description":"Whether to show the liveness result page after the check. If omitted, `null` or `true`, the result page is shown. If `false`, a successful check finishes without the result page; the failure page with the retry option is still shown.\n"}}}]},"VeriliveInitConfig":{"type":"object","nullable":true,"description":"Configuration of the liveness check","properties":{"record_video":{"type":"boolean","nullable":true,"description":"Whether to record a video of the liveness check"},"video_bitrate":{"type":"integer","nullable":true,"description":"Bitrate of the recorded video in bits per second"},"camera_facing":{"type":"string","nullable":true,"enum":["front","rear"],"description":"Camera to use. If omitted or `null`, the front camera is used. Supported by the Liveness SDK 2.4.10 and later only.\n"},"rotated":{"type":"boolean","nullable":true,"description":"Whether the camera image is rotated"},"lang":{"type":"string","nullable":true,"description":"Language of the liveness check UI"},"video_width":{"$ref":"#/components/schemas/VeriliveVideoSize"},"video_height":{"$ref":"#/components/schemas/VeriliveVideoSize"},"render":{"$ref":"#/components/schemas/VeriliveInitRenderConfig"}}},"VeriliveVideoSize":{"type":"object","nullable":true,"description":"Camera resolution by screen orientation","properties":{"landscape":{"type":"integer","nullable":true,"description":"Camera resolution in landscape orientation"},"portrait":{"type":"integer","nullable":true,"description":"Camera resolution in portrait orientation"}}},"VeriliveInitRenderConfig":{"type":"object","nullable":true,"description":"Appearance of the liveness check screen","properties":{"oval_type":{"type":"string","nullable":true,"description":"Type of the face oval, e.g. `contour`"},"oval_ring_color":{"$ref":"#/components/schemas/VeriliveRenderColor"},"outer_overlay_transparency":{"$ref":"#/components/schemas/VeriliveRenderTransparency"},"overlay_transparency":{"$ref":"#/components/schemas/VeriliveRenderTransparency"},"outer_overlay_color":{"$ref":"#/components/schemas/VeriliveRenderColor"},"overlay_color":{"$ref":"#/components/schemas/VeriliveRenderColor"},"hint_text_color":{"$ref":"#/components/schemas/VeriliveRenderColor"},"video_view_scale_up":{"type":"boolean","nullable":true,"description":"Whether to scale up the camera view"},"skip_finish_screen":{"type":"boolean","nullable":true,"description":"Whether to skip the finish screen"},"loading_screen_color":{"$ref":"#/components/schemas/VeriliveRenderColor"}}},"VeriliveRenderColor":{"type":"object","nullable":true,"description":"Colors by liveness check state, e.g. `#2AD66F`","properties":{"default":{"type":"string","nullable":true,"description":"Default color"},"actionSuccess":{"type":"string","nullable":true,"description":"Color after a successful action"},"actionFailure":{"type":"string","nullable":true,"description":"Color after a failed action"},"sessionSuccess":{"type":"string","nullable":true,"description":"Color after a successful check"},"sessionFailure":{"type":"string","nullable":true,"description":"Color after a failed check"}}},"VeriliveRenderTransparency":{"type":"object","nullable":true,"description":"Transparency by liveness check state","properties":{"default":{"type":"number","nullable":true,"description":"Default transparency, e.g. `0.45`"}}},"PersonId":{"type":"string","description":"Identifier of a person associated with the session. Alphanumeric string.\n","minLength":6,"maxLength":48,"pattern":"^[a-zA-Z0-9_@.+-]*$"},"StateName":{"type":"string","enum":["created","processing","processed","reviewed"]},"SessionState":{"type":"object","required":["state_name","created_at"],"properties":{"state_name":{"$ref":"#/components/schemas/StateName"},"created_at":{"type":"string","format":"date-time"}}},"ServiceName":{"type":"string","enum":["verilive","verilive-one-shot","verilive-infrared","veriface","veridoc","kisc","redoc","egov-doc","aml-cft","flow-form","consent","veriphone","esign","kyc-list","otp","notification","device-filter","doc-preview","doc-builder","file-storage","client-card","erd","interrupter","language-selector","amlcft-service"]},"ExecutionStatus":{"type":"string","enum":["pass","fail","unknown"],"description":"The main status of a flow or a service. Helps to make a binary decision whether  the flow/service was successful or not. If \"pass\" - the flow/service was  successful, unsuccessful otherwise. \n"},"SessionProjection":{"description":"Object representing a session result in the more compact way for a consumer.\n","type":"object","properties":{"session_id":{"type":"string","description":"Unique identifier for the session."},"person_id":{"$ref":"#/components/schemas/PersonId"},"consumer_id":{"type":"string","description":"Identifier of the consumer who owns the session."},"flow_id":{"type":"string","nullable":true,"description":"Identifier of the flow associated with the session."},"vlink_id":{"type":"string","nullable":true,"description":"Identifier of the vlink associated with the session."},"api_version":{"type":"string","description":"The version of the API used to create and process this session."},"service_name":{"$ref":"#/components/schemas/ServiceName"},"session_status":{"$ref":"#/components/schemas/ExecutionStatus"},"test_session":{"type":"boolean","nullable":true,"description":"Whether the session was created for test purposes."},"step_id":{"type":"string","nullable":true},"process":{"type":"string","nullable":true},"user_ip":{"type":"string","nullable":true},"vendor":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the session was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of the last update to the session's state."},"session_states":{"type":"array","items":{"$ref":"#/components/schemas/SessionState"},"description":"History of execution states reached by this session."},"result":{"oneOf":[{"$ref":"#/components/schemas/ServiceResult"},{"type":"object","nullable":true,"enum":[null]}]}}},"ServiceResult":{"description":"Service-specific result selected by service_name.","oneOf":[{"$ref":"#/components/schemas/VeriliveResult"},{"$ref":"#/components/schemas/VerifaceResult"}],"discriminator":{"propertyName":"service_name","mapping":{"verilive":"#/components/schemas/VeriliveResult","veriface":"#/components/schemas/VerifaceResult"}}},"LivenessPipeline":{"description":"A list of actions to be performed by the liveness verification process.\n","example":[["zoom-in"],["zoom-out"],["turn-left","turn-right"]],"type":"array","items":{"type":"array","items":{"type":"string","enum":["zoom-in","zoom-out","turn-left","turn-right","turn-straight","smile","blink","tilt-up","tilt-down","shake","tongue-out","open-mouth"]}}},"Liveness2CreateSession":{"description":"Object representing a request body of creating a liveness session.","type":"object","properties":{"person_id":{"$ref":"#/components/schemas/PersonId"},"duration":{"type":"integer","minimum":120,"maximum":600,"description":"Duration of an access token generated for the session (in seconds)"},"flow_id":{"type":"string","description":"Flow ID to be used for the session"},"pipeline":{"$ref":"#/components/schemas/LivenessPipeline"},"platform":{"type":"string","enum":["web","android","ios"],"description":"A platform of a device where the session is going to be executed."},"max_retries":{"type":"integer","description":"Maximum number of retries for a session.","default":3,"minimum":0,"maximum":100}},"required":["person_id"]},"FaceImage":{"type":"string","format":"byte","minLength":1,"description":"Base64 encoded image\n"},"FaceMatch":{"description":"Object representing a request body for face matching.","type":"object","properties":{"person_id":{"type":"string","description":"Person ID"},"flow_id":{"type":"string","description":"Flow ID"},"enroll_collection":{"type":"string","enum":["blacklist","whitelist","graylist","watchlist","default","custom"],"default":"default","description":"Collection name. Default is 'default'."},"enroll_custom_collection":{"type":"string","description":"Custom collection name, use when 'enroll_collection' is set to 'custom'"},"enroll_image":{"$ref":"#/components/schemas/FaceImage"},"enroll_session_id":{"type":"string","description":"Session ID from which to get the enrollment image"},"verif_image":{"$ref":"#/components/schemas/FaceImage"},"verif_session_id":{"type":"string","description":"Session ID from which to get the verification image"}}},"FaceInsert":{"description":"Object representing a request body for face insertion.","type":"object","properties":{"person_id":{"type":"string","description":"Person ID"},"collection":{"type":"string","enum":["blacklist","whitelist","graylist","watchlist","default","custom"],"default":"default","description":"Collection name"},"custom_collection":{"type":"string","description":"Custom collection name, use when 'collection' is set to 'custom'"},"image":{"$ref":"#/components/schemas/FaceImage"}},"required":["person_id","image"]},"FaceSearch":{"description":"Object representing a request body for face search.","type":"object","properties":{"collection":{"type":"string","enum":["blacklist","whitelist","graylist","watchlist","default","custom"],"default":"default","description":"Collection name. Default is 'default'."},"custom_collection":{"type":"string","description":"Custom collection name, use when 'collection' is set to 'custom'"},"person_id":{"$ref":"#/components/schemas/PersonId"},"image":{"$ref":"#/components/schemas/FaceImage"},"session_id":{"type":"string","description":"Session ID to get the search image from"}}},"FacesStat":{"description":"Object representing face database statistics for a collection.","type":"object","properties":{"collection":{"type":"string","enum":["blacklist","whitelist","graylist","watchlist","default","custom"],"default":"default","description":"Collection name"},"amount":{"type":"integer","description":"Number of faces in the collection"}}},"LivenessError":{"type":"string","enum":["timeout","model_prediction","no_face","closed_eyes","face_multiplicity_frame","face_multiplicity_session","face_in_blacklist","face_in_graylist","face_has_another_account","device_in_blacklist","high_velocity","virtual_camera_risk","desktop_session","origin_country_rejected","motion_inconsistency"]},"VeriliveResult":{"description":"Object representing a result of a Verilive (liveness detection) service session.\n","type":"object","required":["service_name"],"properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"error_code":{"type":"string","nullable":true},"error_msg":{"type":"string","nullable":true},"service_name":{"type":"string","enum":["verilive"]},"service_status":{"type":"string","enum":["real","attack","unknown"]},"error_codes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LivenessError"}},"warnings":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LivenessError"}},"start_time":{"type":"string","nullable":true,"format":"date-time"},"end_time":{"type":"string","nullable":true,"format":"date-time"}}},"VerifaceResult":{"description":"Object representing a result of a Veriface (face recognition) service session.\n","type":"object","required":["service_name"],"properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"error_msg":{"type":"string","nullable":true},"service_name":{"type":"string","enum":["veriface"]},"service_status":{"type":"string","enum":["match","mismatch","enrolled","positive","negative","error","unknown"]},"score":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"action":{"$ref":"#/components/schemas/VerifaceAction"},"collection":{"type":"string","nullable":true,"enum":["blacklist","whitelist","graylist","watchlist","default","custom",null]},"custom_collection":{"type":"string","nullable":true},"error_code":{"$ref":"#/components/schemas/VerifaceError"}}},"VerifaceAction":{"type":"string","nullable":true,"enum":["enroll","find","verify","find_and_allow","find_and_deny",null]},"VerifaceError":{"type":"string","nullable":true,"enum":["no_face","invalid_file_format","model_error","invalid_input_sid","invalid_collection","vector_db_error","internal_server_error","max_file_size_exceeded",null]},"FlowServiceStatus":{"description":"Provides a summary of the execution status and results for a specific  service within a verification flow.\n","type":"object","properties":{"service_name":{"$ref":"#/components/schemas/ServiceName"},"session_id":{"type":"string","description":"Unique identifier for the service session."},"step_id":{"type":"string","description":"Identifier for the flow step associated with this service."},"session_status":{"$ref":"#/components/schemas/ExecutionStatus"},"session_state":{"$ref":"#/components/schemas/StateName"},"session_states":{"type":"array","items":{"$ref":"#/components/schemas/SessionState"},"description":"History of execution states reached by this session."},"frontend_session_status":{"type":"string","enum":["approved","denied","suspicious","reviewing","expired","failure","active","blacklisted","whitelisted"],"description":"Simplified status intended for display in the frontend application."},"session_result":{"$ref":"#/components/schemas/ServiceResult"},"sessions_count":{"type":"integer","description":"Number of sessions for this service within the flow."},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the service was first initialized within the flow."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of the last status update for this service session."}}},"Flow":{"type":"object","description":"Comprehensive representation of a flow's current state and configuration.","properties":{"flow_id":{"type":"string","description":"Unique identifier of the flow."},"consumer_id":{"type":"string","description":"Identifier of the consumer who owns the flow."},"vlink":{"type":"string","description":"A hosted URL where the user can access the flow's user interface. Useful for direct redirection or embedding in iframes/webviews.\n"},"api_version":{"type":"string","description":"The version of the API used to create and process this flow.","example":"2.0.0"},"locale":{"type":"string","enum":["kk","ru","en"],"description":"Language code used for the flow's user interface."},"person_id":{"$ref":"#/components/schemas/PersonId"},"template":{"$ref":"#/components/schemas/FlowTemplate"},"test_flow":{"type":"boolean","description":"Indicates whether this is a test flow created with a sandbox API key."},"current_step_id":{"type":"string","description":"Identifier of the step currently being executed or waiting to be started."},"callback_url":{"type":"string","format":"uri","description":"URL where the user will be redirected upon completion of the flow."},"input_data":{"$ref":"#/components/schemas/FlowInputData"},"input_meta":{"$ref":"#/components/schemas/FlowInputMeta"},"template_id":{"type":"string","description":"Identifier of the template used for this flow configuration."},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the flow was created."},"ttl":{"type":"integer","minimum":60,"maximum":31536000,"description":"Time-to-live for the flow in seconds."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of the last update to the flow's state."},"polled_at":{"type":"string","format":"date-time","description":"Timestamp when the flow's status was last polled by a client."},"started_at":{"type":"string","format":"date-time","description":"Timestamp when the flow execution actually started."},"current_step_started_at":{"type":"string","format":"date-time","description":"Timestamp when the current step execution began."},"ended_at":{"type":"string","format":"date-time","description":"Timestamp when the flow reached a final state (completed, failed, etc.)."},"flow_status":{"$ref":"#/components/schemas/ExecutionStatus"},"end_cause":{"$ref":"#/components/schemas/FlowEndCause"}},"required":["flow_id","consumer_id","vlink","person_id","template","flow_status"]},"FlowInputMeta":{"type":"object","description":"Metadata regarding the flow's initial environment.","properties":{"initial_device_type":{"type":"string","enum":["desktop","mobile"],"description":"Detected device type at the start of the flow."}}},"FlowEndCause":{"type":"string","description":"The reason why the flow ended. Returns \"completed\" when execution finishes  without errors, \"failed\" when a server error or unhandled exception occurs,  \"timeout\" when a specific step exceeds its allocated duration,  or \"disconnected\" when the flow terminates due to a lost network connection  or user intervention — a status applied automatically once the default  five-minute inactivity threshold is reached, provided at least one service session was successfully initialized.\n","enum":["completed","failed","timeout","disconnected"]},"FlowProjection":{"description":"A summarized result of a verification flow, including the status and  results of all service sessions executed within the flow. This projection  is optimized for display in a consumer's dashboard or management interface.\n","type":"object","properties":{"person_id":{"$ref":"#/components/schemas/PersonId"},"flow_id":{"type":"string","description":"Unique identifier for the flow."},"person_name":{"type":"string","description":"The full name of the person being verified. This field is populated  if a document recognition service was part of the flow and successfully  extracted the name.\n"},"iin":{"type":"string","description":"Individual Identification Number (IIN) of the person, if extracted."},"check_type":{"type":"string","enum":["auto","edited"],"description":"Indicates whether the verification result was determined automatically  or manually reviewed/edited by an operator.\n"},"country_code":{"type":"string","description":"Three-letter ISO 3166-1 alpha-3 country code (e.g., \"KAZ\")."},"end_cause":{"$ref":"#/components/schemas/FlowEndCause"},"flow_status":{"$ref":"#/components/schemas/ExecutionStatus"},"sessions_count":{"type":"integer","description":"The total number of service sessions (e.g., liveness checks, document  recognition) executed during the flow.\n"},"services_count":{"type":"integer","description":"The total number of unique services that were executed during the flow.\n"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the flow was first initialized."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of the last update to any session within the flow."},"ended_at":{"type":"string","format":"date-time","description":"Timestamp when the flow reached its final state."},"service_statuses":{"type":"array","items":{"$ref":"#/components/schemas/FlowServiceStatus"},"description":"Detailed status and result summary for each service executed in the flow."}}},"MockResultRequest":{"type":"object","description":"Object representing a request to create a mocked service result.","properties":{"person_id":{"$ref":"#/components/schemas/PersonId"},"result":{"$ref":"#/components/schemas/ServiceResult"},"files":{"type":"object","description":"Base64-encoded files associated with the mocked service result, mapped by file label.","additionalProperties":{"type":"string","format":"byte","description":"Base64 encoded file content"}}},"required":["person_id","result"]},"MockResult":{"type":"object","description":"Object representing a mocked service result.","properties":{"consumer_id":{"type":"string","description":"Identifier of the consumer who owns the mock result."},"person_id":{"$ref":"#/components/schemas/PersonId"},"future_session_id":{"type":"string","description":"Identifier of the future session associated with the mock."},"service_name":{"$ref":"#/components/schemas/ServiceName"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the mock result was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of the last update to the mock result."},"deleted_at":{"type":"string","format":"date-time","description":"Timestamp when the mock result was deleted."},"result":{"$ref":"#/components/schemas/ServiceResult"}},"required":["consumer_id","person_id","service_name","result"]},"WebhookServiceName":{"description":"Service the webhook is registered for. Either a service name, `flow-end` to be notified when a flow ends, or a custom name in the `custom_<name>` format.\n","anyOf":[{"$ref":"#/components/schemas/ServiceName"},{"type":"string","enum":["flow-end"]},{"type":"string","pattern":"^custom_[0-9A-Za-z]{1,64}$"}],"example":"flow-end"},"WebhookCreate":{"type":"object","required":["target_url","service_name"],"properties":{"target_url":{"type":"string","format":"uri","description":"URL the notifications are sent to","example":"https://example.com/webhooks/verigram"},"service_name":{"$ref":"#/components/schemas/WebhookServiceName"}}},"WebhookDelete":{"type":"object","required":["service_name"],"properties":{"service_name":{"$ref":"#/components/schemas/WebhookServiceName"}}},"Webhook":{"type":"object","properties":{"target_url":{"type":"string","format":"uri","description":"URL the notifications are sent to","example":"https://example.com/webhooks/verigram"},"service_name":{"$ref":"#/components/schemas/WebhookServiceName"},"active":{"type":"boolean","description":"Whether the webhook is active"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-Verigram-Api-Key"}}}}