TrustWixDocs
API reference

Flows

GET
/v1/flows

Your saved flows. Cursor-paginated, newest first. limit accepts 1 to 100 and defaults to 20. To walk further, set starting_after to the id of the last record on the page you just read. has_more tells you another page exists and next_cursor is the value to pass back; on the last page has_more is false and next_cursor is null. An unknown cursor is ignored and you get the first page. Requires the settings:read permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Query Parameters

limit?integer

How many records to return. 1 to 100, defaults to 20.

Range1 <= value <= 100
Default20
starting_after?string

A flow id; returns the page after it.

Match^flw_

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/flows"
{  "object": "list",  "data": [    {      "id": "string",      "object": "flow",      "name": "string",      "steps": [        {          "type": "liveness",          "required": true,          "threshold": 0,          "config": {}        }      ],      "is_default": true,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "has_more": true,  "next_cursor": "string"}
POST
/v1/flows

Save an ordered composition of checks so verifications can reference it by id instead of repeating an inline checks array. Requires the settings:write permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/flows" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "steps": [      {        "type": "liveness"      }    ]  }'
{  "id": "string",  "object": "flow",  "name": "string",  "steps": [    {      "type": "liveness",      "required": true,      "threshold": 0,      "config": {}    }  ],  "is_default": true,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/v1/flows/{id}

Requires the settings:read permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Path Parameters

id*string

The flow id.

Match^flw_

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/flows/string"
{  "id": "string",  "object": "flow",  "name": "string",  "steps": [    {      "type": "liveness",      "required": true,      "threshold": 0,      "config": {}    }  ],  "is_default": true,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/v1/flows/{id}

Update the name, the steps or the default marker. Send at least one field. steps is replaced wholesale, not merged. Sessions already created keep the steps that were snapshotted when they were created. Requires the settings:write permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Path Parameters

id*string

The flow id.

Match^flw_

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Send at least one field. steps replaces the stored array wholesale.

Properties1 <= properties

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/flows/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "object": "flow",  "name": "string",  "steps": [    {      "type": "liveness",      "required": true,      "threshold": 0,      "config": {}    }  ],  "is_default": true,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE
/v1/flows/{id}

Permanently removes the flow. Verifications that already referenced it are unaffected. Requires the settings:write permission on the calling key.

Authorization

secretKey
AuthorizationBearer <token>

Secret API key, e.g. kyc_live_... (server-side) or kyc_test_... (sandbox).

In: header

Path Parameters

id*string

The flow id.

Match^flw_

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/flows/string"
{  "id": "string",  "object": "flow",  "deleted": true}