Flow API Documentation
Overview
The Flow API allows you to retrieve a list of available flows in your account. Flows are used as part of survey creation and management—specifically, the key of a flow is used as the flowKey parameter in survey APIs.
Endpoint
Get All Flows
- Method: GET
- Path:
/v2/flow/getAll - Headers:
X-API-Key(required)
- Query Parameters:
resultSize(optional, int): Number of flows to return per pagepageToken(optional, string): Token for pagination, can benull
Request Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| X-API-Key | header | string | Yes | Your API key |
| resultSize | query | int | No | Number of flows to return |
| pageToken | query | string | No | Pagination token, can be null |
Example Response
{
"error": "",
"flows": [
{
"key": "FLOW_KEY",
"name": "FLOW_NAME",
"trigger": "WHATSAPP",
"status": 0
}
]
}
Field Reference
| Field | Type | Description |
|---|---|---|
| error | string | Error message if any, empty string if successful |
| flows | array | List of flow objects |
| key | string | Unique identifier for the flow (used as flowKey in surveys) |
| name | string | Name of the flow |
| trigger | string | Trigger type for the flow (e.g., WHATSAPP) |
| status | int | Status code (e.g., 0 = active, other values may indicate disabled) |
Usage in Surveys
When creating or updating a survey, you must provide a flowKey. This should be set to the key value of the desired flow from the /v2/flow/getAll response.
Example usage in survey creation:
{
"name": "Customer Feedback Survey",
"clients": [ ... ],
"TempMsgID": "TEMPLATE_ID",
"flowKey": "FLOW_KEY"
}