Query Flows
Last update: 6 hours ago by Irais Aguirre
List the Flows in a WABA and get the details of a single Flow.
Integration summary
- Base URL:
https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services- Token: admin token, in the
Authorization: Bearer {{admin-token}}header (how to generate it)- Endpoints on this page:
GET /v1/flows/{{waba_id}}: List all Flows by WABAGET /v1/flows/{{waba_id}}/{{flow_id}}/details: Get Flow details
List all Flows by WABA
Request
List all Flows by WABA request:
| URL | https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}} |
| Method | GET |
Headers
List all Flows by WABA headers:
| Name | Description | Type | Requirements |
|---|---|---|---|
| Authorization | Admin token. See Generate authentication token. | String | Required |
Parameters
List all Flows by WABA parameters:
| Name | Description | Type | Requirements |
|---|---|---|---|
| waba_id | WhatsApp Business Account ID. | String | Required |
Example
Complete List all Flows by WABA example:
curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}' \--header 'Authorization: Bearer {{admin-token}}'
Response
List all Flows by WABA response:
{"data": [{"id": "flow-1","name": "flow 1","status": "DRAFT","categories": [ "CONTACT_US" ],"validation_errors": []},{"id": "flow-2","name": "flow 2","status": "PUBLISHED","categories": [ "SURVEY" ],"validation_errors": []}],"paging": {"cursors": {"before": "QVFIU…before","after": "QVFIU…after"},"next": "https://graph.facebook.com/v22.0/{{waba_id}}/flows?after=QVFIU…after","previous": "https://graph.facebook.com/v22.0/{{waba_id}}/flows?before=QVFIU…before"}}
Data object
| Name | Description | Type |
|---|---|---|
| id | Flow ID. | String |
| name | Flow name. | String |
| status | Flow status. | String |
| categories | Flow categories. | Array |
| validation_errors | Flow errors. | List of objects |
| errorCode | Error code from Meta for this specific row. Only present when fetching the data for this Flow failed; the rest of the list still returns normally. Wire key is camelCase (errorCode). | Integer |
| errorMessage | Human-readable error description paired with errorCode. Only present when fetching the data for this Flow failed. Wire key is camelCase (errorMessage). | String |
Paging object
Mirrors Meta's Graph API cursor-based pagination. All fields are optional and are only included when present in Meta's response (@JsonInclude(NON_NULL)).
| Name | Description | Type |
|---|---|---|
| cursors.before | Opaque cursor that points to the first item of the current page. | String |
| cursors.after | Opaque cursor that points to the last item of the current page. | String |
| next | Full URL you can call to fetch the next page. Absent when there are no more pages. | String |
| previous | Full URL you can call to fetch the previous page. Absent when you are on the first page. | String |
Get Flow details
Request
Get Flow details request:
| URL | https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}/{{flow_id}}/details |
| Method | GET |
Headers
Get Flow details headers:
| Name | Description | Type | Requirements |
|---|---|---|---|
| Authorization | Admin token. See Generate authentication token. | String | Required |
Parameters
Get Flow details parameters:
| Name | Description | Type | Requirements |
|---|---|---|---|
| waba_id | WhatsApp Business Account ID. | String | Required |
| flow_id | Flow ID returned by Create Flow. | String | Required |
Example
Complete Get Flow details example:
curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}/{{flow_id}}/details' \--header 'Authorization: Bearer {{admin-token}}'
Response
Get Flow details response:
| Name | Description | Type |
|---|---|---|
| id | Flow ID. | String |
| name | Flow name. | String |
| status | Flow status (DRAFT, PUBLISHED, DEPRECATED, BLOCKED, THROTTLED). | String |
| categories | Flow categories. | Array |
| validation_errors | Flow errors. | List of objects |
| endpoint_uri | URL of the WA Flow Endpoint. | String |
{"id": "<Flow-ID>","name": "<Flow-Name>","status": "DRAFT","categories": [ "LEAD_GENERATION" ],"validation_errors": [],"endpoint_uri": "https://example.com"}
