logo
enes

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 WABA
    • GET /v1/flows/{{waba_id}}/{{flow_id}}/details: Get Flow details

List all Flows by WABA

Request

List all Flows by WABA request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}
MethodGET

Headers

List all Flows by WABA headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

List all Flows by WABA parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired

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:

NameDescriptionType
dataList of Flows in the WABA.List of objects
pagingPagination info. Present when Meta returns more Flows than the default page size.Object
{
"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

NameDescriptionType
idFlow ID.String
nameFlow name.String
statusFlow status.String
categoriesFlow categories.Array
validation_errorsFlow errors.List of objects
errorCodeError 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
errorMessageHuman-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)).

NameDescriptionType
cursors.beforeOpaque cursor that points to the first item of the current page.String
cursors.afterOpaque cursor that points to the last item of the current page.String
nextFull URL you can call to fetch the next page. Absent when there are no more pages.String
previousFull 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:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}/{{flow_id}}/details
MethodGET

Headers

Get Flow details headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Get Flow details parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
flow_idFlow ID returned by Create Flow.StringRequired

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:

NameDescriptionType
idFlow ID.String
nameFlow name.String
statusFlow status (DRAFT, PUBLISHED, DEPRECATED, BLOCKED, THROTTLED).String
categoriesFlow categories.Array
validation_errorsFlow errors.List of objects
endpoint_uriURL of the WA Flow Endpoint.String
{
"id": "<Flow-ID>",
"name": "<Flow-Name>",
"status": "DRAFT",
"categories": [ "LEAD_GENERATION" ],
"validation_errors": [],
"endpoint_uri": "https://example.com"
}

Previous
Create and update Flows
Next
Publish, deprecate and delete Flows