Skip to main content

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: /flow/{flow_id}/vr/next-step
  • Authentication: API Key (x-api-key header)

Query Parameters

ParameterTypeRequiredDescription
emailstringYesThe email address of the user undergoing verification.
sandboxbooleanNoWhether to query the sandbox environment. Defaults to false.

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 FlowStep object containing the details of the next step. Returns null if 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:

  • 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, isCompleted is set to true and nextStep is null.

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/flow/flow_123/vr/next-step?email=user@example.com" \
-H "x-api-key: your_api_key_here"