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)
accountstringFilter by WhatsApp account name
statusstringFilter by status (DRAFT, PUBLISHED, DEPRECATED)
searchstringSearch by flow name (case-insensitive)
{
"status": "success",
"data": {
"flows": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"whatsapp_account": "default_account",
"meta_flow_id": "123456789012345",
"name": "Order Form",
"status": "PUBLISHED",
"category": "CUSTOMER_SUPPORT",
"json_version": "6.0",
"flow_json": {},
"screens": [
{
"id": "WELCOME",
"title": "Welcome",
"layout": {
"type": "SingleColumnLayout",
"children": [
{
"type": "TextHeading",
"text": "Welcome to our store!"
}
]
}
}
],
"preview_url": "https://play.google.com/...",
"has_local_changes": false,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"total": 1,
"page": 1,
"limit": 20
}
}

Retrieve a single flow with its full definition.

Terminal window
GET /api/flows/{id}
{
"status": "success",
"data": {
"flow": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"whatsapp_account": "default_account",
"meta_flow_id": "123456789012345",
"name": "Order Form",
"status": "PUBLISHED",
"category": "CUSTOMER_SUPPORT",
"json_version": "6.0",
"flow_json": {},
"screens": [
{
"id": "WELCOME",
"title": "Welcome",
"layout": {
"type": "SingleColumnLayout",
"children": [
{
"type": "TextHeading",
"text": "Welcome to our store!"
}
]
}
}
],
"preview_url": "https://play.google.com/...",
"has_local_changes": false,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}
}

Create a new WhatsApp Flow locally in DRAFT status.

Terminal window
POST /api/flows
FieldTypeRequiredDescription
whatsapp_accountstringYesWhatsApp account name
namestringYesFlow name
categorystringNoFlow category (e.g. CUSTOMER_SUPPORT, UTILITY)
json_versionstringNoMeta JSON format version (default: 6.0)
flow_jsonobjectNoOptional raw flow JSON mapping
screensarrayNoArray of screen objects conforming to the Meta layout
{
"whatsapp_account": "default_account",
"name": "Customer Survey",
"category": "CUSTOMER_SUPPORT",
"json_version": "6.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"}
]
},
{
"type": "Footer",
"label": "Submit",
"on-click-action": {
"name": "complete",
"payload": {}
}
}
]
}
}
]
}
{
"status": "success",
"data": {
"flow": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"whatsapp_account": "default_account",
"meta_flow_id": "",
"name": "Customer Survey",
"status": "DRAFT",
"category": "CUSTOMER_SUPPORT",
"json_version": "6.0",
"screens": [],
"preview_url": "",
"has_local_changes": false,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}
}

Update a flow’s local definition.

Terminal window
PUT /api/flows/{id}

Same structure as Create Flow (excluding whatsapp_account). Only fields provided will be updated.

Delete a flow (soft delete).

Terminal window
DELETE /api/flows/{id}
{
"status": "success",
"data": {
"message": "Flow deleted successfully"
}
}

Push the flow definition and layout schema to Meta’s WhatsApp Business API. If the flow doesn’t exist on Meta, it will be created first. The status remains DRAFT on Meta.

Terminal window
POST /api/flows/{id}/save-to-meta
{
"status": "success",
"data": {
"flow": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"meta_flow_id": "123456789012345",
"status": "DRAFT",
"has_local_changes": false
},
"message": "Flow saved to Meta successfully"
}
}

Publish the flow to make it live and active for sending to users.

Terminal window
POST /api/flows/{id}/publish
{
"status": "success",
"data": {
"flow": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "PUBLISHED"
},
"message": "Flow published successfully"
}
}

Deprecate a published flow on Meta and locally. Deprecated flows cannot be edited or sent anymore.

Terminal window
POST /api/flows/{id}/deprecate
{
"status": "success",
"data": {
"flow": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "DEPRECATED"
},
"message": "Flow deprecated successfully"
}
}

Create a copy of an existing flow as a new DRAFT. This is useful for editing published flows (since published flows cannot be directly edited, you can duplicate, make changes, and publish the copy).

Terminal window
POST /api/flows/{id}/duplicate
{
"status": "success",
"data": {
"flow": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"name": "Customer Survey (Copy)",
"status": "DRAFT"
},
"message": "Flow duplicated successfully. You can now edit and publish the new flow."
}
}

Sync WhatsApp Flows from Meta’s API for a specific WhatsApp account.

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