Sessions
Create a verification session, and list the sessions in your project. Both need an API key with sessions access.
Create a session
POST /api/v1/sessions, scope sessions write. Send a JSON body:
| Field | Type | Required | Rules |
|---|---|---|---|
workflowId | string | yes | A UUID of a published workflow. |
vendorData | string | no | 1 to 256 characters. Your own reference for the user. |
callback | string | no | A valid URL. Where the user is sent after the flow. |
metadata | object | no | Any JSON object. |
language | string | no | Exactly two characters, a language code. |
Response: 201 Created
{
"sessionId": "<session-id>",
"url": "https://verify.mudbase.dev/v/<token>",
"status": "Not Started"
}url is the hosted link. It is valid for 30 minutes. The provider address of the flow is never returned: the link is always a Verify address.
Status codes
400: the body is not JSON (Invalid JSON body) or a field breaks a rule (Validation failed, with adetailsobject).401or403: the key is missing, invalid, expired or lacks the scope.404: the workflow is not found or not published.422: the verification service rejected the request for this workflow or these fields.429: too many requests to the verification service, or to this API. Wait, then retry.500: an unexpected error on Verify's side.502: the verification service failed. The body carries arequestId, and the same value is in theX-Request-Idheader. Quote it when you contact support.503: verification is not set up for this project yet.
If the verification service created a session but no link could be issued for it, the call returns 502 with reason: "hosted link refused". A refused attempt is not listed, and you can retry the call. Verify cannot cancel the provider session it created; the provider may expire it on its own. Each retry creates another one.
List sessions
GET /api/v1/sessions, scope sessions read. Returns the most recent sessions in your project, newest first.
Query parameter: limit, the number of sessions to return. The default is 50 and the maximum is 200.
{
"data": [
{
"sessionId": "<session-id>",
"vendorData": "user-1842",
"workflowId": "<workflow-uuid>",
"status": "Approved",
"kind": "user"
}
],
"count": 1
}The list shows the status Verify last stored. For the current result of one session, read its decision. Sessions whose link could not be issued are not listed.
Status codes: 401, 403 and 429 as above, and 500.