Get Next Step
The Get Next Step endpoint allows integrators to programmatically determine the current progress of a verification flow and identify the next action required from the user.
Endpoint Details
- Method:
GET - Path:
/sdk/flow/{flow_id}/vr/next-step - Authentication: API Key (
x-api-keyheader)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sandbox | boolean | Yes | Whether to query the sandbox environment. |
email | string | No | The email address of the user undergoing verification. |
credentialType | string | No | Use EXTERNAL_ID or WALLET when querying by credential. |
externalId | string | No | Required when credentialType=EXTERNAL_ID. |
address | string | No | Wallet address. Required when credentialType=WALLET. |
chain | string | No | Wallet chain. Required when credentialType=WALLET (for example ETHEREUM, SOLANA_TESTNET). |
locale | string | No | Optional response locale. |
Provide at least one identity field: email, credentialType=EXTERNAL_ID with externalId, or credentialType=WALLET with address and chain.
Response
The endpoint returns a GetNextStepResponse object.
{
"nextStep": {
"id": "step_123",
"name": "Document Verification",
"type": "DV",
"order": 1,
"config": { ... }
},
"isCompleted": false,
"executedActions": ["action_abc"]
}
Field Descriptions
- nextStep: A
FlowStepobject containing the details of the next step. Returnsnullif all steps are completed. - isCompleted: A boolean indicating if the entire verification flow is finished.
- executedActions: An array of workflow actions that have already been executed for this user.
How It Works
The system evaluates the current state of the verification flow for the provided email or credential:
- If the user has not started, it returns the first step in the flow.
- If the user has completed steps, it identifies the next incomplete step based on the flow configuration.
- If all steps are finished,
isCompletedis set totrueandnextStepisnull.
Use Cases
This endpoint is primarily used for custom UI implementations where the integrator wants to manage the user experience programmatically rather than using the Zyphe hosted UI. It provides the necessary metadata to render the appropriate component for each step (e.g., DV, Form, POA, SPID).
Example
curl -X GET "https://api.zyphe.com/sdk/flow/flow_123/vr/next-step?sandbox=true&email=user@example.com" \
-H "x-api-key: your_api_key_here"
Query by external ID:
curl -X GET "https://api.zyphe.com/sdk/flow/flow_123/vr/next-step?sandbox=true&credentialType=EXTERNAL_ID&externalId=user_123" \
-H "x-api-key: your_api_key_here"
Query by wallet:
curl -X GET "https://api.zyphe.com/sdk/flow/flow_123/vr/next-step?sandbox=true&credentialType=WALLET&address=0x123...&chain=ETHEREUM" \
-H "x-api-key: your_api_key_here"