Create a session and read the decision
Start a verification from your backend, send your user to the link it returns, then read the result.
1. Create a key
In the console, create an API key for your project with write access to sessions and read access to decisions. See Authentication and API keys. Keep the key on your server and export it as an environment variable. The examples below read it from MUDBASE_API_KEY.
2. Create the session
Call POST /api/v1/sessions with the ID of a published workflow. vendorData is optional and is your own reference for the user.
curl -X POST https://verify.mudbase.dev/api/v1/sessions \
-H "Authorization: Bearer $MUDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflowId": "<workflow-uuid>", "vendorData": "user-1842"}'A successful call returns 201 Created with the session ID, the link and the first status:
{
"sessionId": "<session-id>",
"url": "https://verify.mudbase.dev/v/<token>",
"status": "Not Started"
}Store the sessionId with your own record of the user. The url is valid for 30 minutes. After that, create a new session.
3. Send your user to the link
Redirect or link your user to url. The hosted flow runs on the verification service's own domain, not on verify.mudbase.dev. A session whose link could not be issued is answered with 502 and reason: "hosted link refused", and it is not listed. Create the session again.
4. Read the decision
When you need the result, call GET /api/v1/sessions/<session-id> with a key that has read access to decisions:
curl https://verify.mudbase.dev/api/v1/sessions/<session-id> \
-H "Authorization: Bearer $MUDBASE_API_KEY"The response has the sessionId, the status, your vendorData and workflowId, and the results of each check that ran: idVerifications, livenessChecks, faceMatches and amlScreenings. Each call updates the status Verify stores. See Decisions for the fields.
To learn about a change without asking, use webhooks. The list of statuses is in Concepts.