Skip to content

WhatsApp Flows

WhatsApp Flows provide native UI components for building interactive experiences within WhatsApp. Use the Flows API to create, publish, and manage your flows.

Retrieve all flows.

Terminal window
GET /api/flows
ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20)
statusstringFilter by status (DRAFT, PUBLISHED, DEPRECATED)
account_idstringFilter by WhatsApp account
{
"status": "success",
"data": {
"items": [
{
"id": "uuid",
"meta_flow_id": "123456789",
"name": "Order Form",
"status": "PUBLISHED",
"account_id": "uuid",
"created_at": "2024-01-01T00:00:00Z"
}
],
"total": 10,
"page": 1,
"limit": 20
}
}

Retrieve a single flow with its JSON definition.

Terminal window
GET /api/flows/{id}
{
"status": "success",
"data": {
"id": "uuid",
"meta_flow_id": "123456789",
"name": "Order Form",
"status": "PUBLISHED",
"json_definition": {
"version": "3.0",
"screens": [
{
"id": "WELCOME",
"title": "Welcome",
"layout": {...}
}
]
},
"created_at": "2024-01-01T00:00:00Z"
}
}

Create a new WhatsApp Flow.

Terminal window
POST /api/flows
{
"account_id": "uuid",
"name": "Customer Survey",
"categories": ["CUSTOMER_SUPPORT"],
"json_definition": {
"version": "3.0",
"screens": [
{
"id": "SURVEY",
"title": "Quick Survey",
"layout": {
"type": "SingleColumnLayout",
"children": [
{
"type": "TextHeading",
"text": "How was your experience?"
},
{
"type": "RadioButtonsGroup",
"name": "rating",
"label": "Rating",
"data-source": [
{"id": "5", "title": "Excellent"},
{"id": "4", "title": "Good"},
{"id": "3", "title": "Average"},
{"id": "2", "title": "Poor"},
{"id": "1", "title": "Very Poor"}
]
},
{
"type": "Footer",
"label": "Submit",
"on-click-action": {
"name": "complete",
"payload": {}
}
}
]
}
}
]
}
}
{
"status": "success",
"data": {
"id": "uuid",
"name": "Customer Survey",
"status": "DRAFT",
"created_at": "2024-01-01T00:00:00Z"
}
}

Update a flow’s definition.

Terminal window
PUT /api/flows/{id}
{
"name": "Updated Survey",
"json_definition": {...}
}

Delete a flow.

Terminal window
DELETE /api/flows/{id}

Push the flow definition to Meta’s WhatsApp Business API.

Terminal window
POST /api/flows/{id}/save-to-meta
{
"status": "success",
"data": {
"meta_flow_id": "123456789",
"validation_errors": []
}
}

Publish a draft flow to make it available for use.

Terminal window
POST /api/flows/{id}/publish
{
"status": "success",
"data": {
"id": "uuid",
"status": "PUBLISHED"
}
}

Deprecate a published flow.

Terminal window
POST /api/flows/{id}/deprecate
{
"status": "success",
"data": {
"id": "uuid",
"status": "DEPRECATED"
}
}

Sync flows from Meta.

Terminal window
POST /api/flows/sync
{
"account_id": "uuid"
}
{
"status": "success",
"data": {
"synced": 5,
"new": 1,
"updated": 2
}
}
StatusDescription
DRAFTFlow is being designed, not yet available
PUBLISHEDFlow is live and can be sent to users
DEPRECATEDFlow has been retired