Flows
Endpoints for managing WhatsApp Flows
Retrieve the WhatsApp Flows
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Comma-separated list of fields to include (e.g. id,name,status,categories)
Maximum number of Flows to return per page
Cursor for the next page of results
Cursor for the previous page of results
Flows retrieved successfully
Response payload containing the WhatsApp Flows of the WABA
Unauthorized
Forbidden
Internal server error
GET /flows HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"categories": [
"text"
],
"id": "1234567890123456",
"name": "lead_qualification",
"status": "PUBLISHED",
"validation_errors": [
{
"error": "INVALID_PROPERTY",
"error_type": "FLOW_JSON_ERROR",
"message": "The property \"foo\" is not supported",
"pointer_path": "screens[0].layout"
}
]
}
],
"paging": {
"cursors": {
"after": "text",
"before": "text"
},
"next": "text",
"previous": "text"
}
}Create a WhatsApp Flow on the WhatsApp Business Account. The Flow is created as a draft unless publish is true. Send its screens either inline via flow_json or afterwards via POST /flows/{flow_id}/assets. clone_flow_id must reference a Flow owned by this WABA.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow creation payload
Flow categories, at least one of LEAD_GENERATION, SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, SURVEY, CONTACT_US, CUSTOMER_SUPPORT, OTHER
ID of an existing Flow to clone
1234567890123456Endpoint URI for Flows with a data exchange endpoint
The Flow JSON as a string. Optional: it can also be uploaded via POST /flows/{flow_id}/assets
Flow name, unique within the WABA
lead_qualificationPublish the Flow immediately instead of creating a draft. Requires flow_json
falseFlow created successfully
Response payload for a created WhatsApp Flow
ID of the created Flow
1234567890123456Whether the Flow was created
trueBad request
Unauthorized
Forbidden
Internal server error
POST /flows HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 143
{
"categories": [
"text"
],
"clone_flow_id": "1234567890123456",
"endpoint_uri": "text",
"flow_json": "text",
"name": "lead_qualification",
"publish": false
}{
"id": "1234567890123456",
"success": true,
"validation_errors": [
{
"error": "INVALID_PROPERTY",
"error_type": "FLOW_JSON_ERROR",
"message": "The property \"foo\" is not supported",
"pointer_path": "screens[0].layout"
}
]
}Retrieve a single Flow's details. Request the preview field (optionally with .invalidate(false)) to get a shareable preview link.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Comma-separated list of fields to include (e.g. id,name,status,preview)
Flow retrieved successfully
Response payload for a single WhatsApp Flow's details
Flow categories, e.g. LEAD_GENERATION, SIGN_UP, APPOINTMENT_BOOKING, OTHER
The Data API version specified in the uploaded Flow JSON, only for Flows with an Endpoint
3.0The URL of the WA Flow Endpoint
Flow ID
1234567890123456The Flow JSON version specified in the uploaded asset
7.3Flow name
lead_qualificationDRAFT, PUBLISHED, DEPRECATED, BLOCKED or THROTTLED
PUBLISHEDPossible values: Bad request
Unauthorized
Forbidden
Flow not found
Internal server error
GET /flows/{flow_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"application": {
"id": "1234567890123456"
},
"categories": [
"text"
],
"data_api_version": "3.0",
"endpoint_uri": "text",
"id": "1234567890123456",
"json_version": "7.3",
"name": "lead_qualification",
"preview": {
"expires_at": "2023-05-21T11:18:09+0000",
"preview_url": "https://business.facebook.com/wa/manage/flows/550/preview/?token=b9d6"
},
"status": "PUBLISHED",
"validation_errors": [
{
"error": "INVALID_PROPERTY",
"error_type": "FLOW_JSON_ERROR",
"message": "The property \"foo\" is not supported",
"pointer_path": "screens[0].layout"
}
],
"whatsapp_business_account": {
"id": "1234567890123456"
}
}Update a draft Flow's name, categories or endpoint URI.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Flow update payload
A list of Flow categories. Missing value keeps the existing categories
Endpoint URI for Flows with a data exchange endpoint
Flow name
lead_qualificationFlow updated successfully
Response payload for an updated WhatsApp Flow
Whether the Flow was updated
trueBad request
Unauthorized
Forbidden
Internal server error
POST /flows/{flow_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 73
{
"categories": [
"text"
],
"endpoint_uri": "text",
"name": "lead_qualification"
}{
"success": true
}Delete a draft Flow. A Flow can only be deleted while it is in DRAFT status.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Flow deleted successfully
Response payload for a deleted WhatsApp Flow
Whether the Flow was deleted
trueBad request - Flow is not in DRAFT status
Unauthorized
Forbidden
Flow not found
Internal server error
DELETE /flows/{flow_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"success": true
}Retrieve all assets attached to a Flow, including its Flow JSON.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Flow assets retrieved successfully
Response payload containing the assets attached to a WhatsApp Flow
Unauthorized
Forbidden
Flow not found
Internal server error
GET /flows/{flow_id}/assets HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"asset_type": "FLOW_JSON",
"download_url": "text",
"name": "flow.json"
}
],
"paging": {
"cursors": {
"after": "text",
"before": "text"
},
"next": "text",
"previous": "text"
}
}Upload the Flow JSON of a draft Flow, replacing its current screens. Returns the validation errors Meta found; a Flow can only be published once they are resolved.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Flow JSON uploaded successfully
Response payload for an uploaded Flow JSON
Whether the upload was accepted
trueBad request
Unauthorized
Forbidden
Request body too large
Internal server error
POST /flows/{flow_id}/assets HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 6
"'text'"{
"success": true,
"validation_errors": [
{
"error": "INVALID_PROPERTY",
"error_type": "FLOW_JSON_ERROR",
"message": "The property \"foo\" is not supported",
"pointer_path": "screens[0].layout"
}
]
}Mark a published Flow as deprecated. Deprecated Flows can no longer be sent or opened, and cannot be restored.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Flow deprecated successfully
Response payload for a deprecated WhatsApp Flow
Whether the Flow was deprecated
trueBad request - Flow is not published
Unauthorized
Forbidden
Internal server error
POST /flows/{flow_id}/deprecate HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"success": true
}Get a shareable, no-login web preview link for a Flow. Meta has no dedicated preview edge: this builds a fields=preview.invalidate(...) request on the flow node. Pass invalidate=true to invalidate the previous link and generate a new one.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Invalidate the previous preview link and generate a new one
falsePreview link retrieved successfully
Response payload containing a Flow's web preview link
Flow ID
1234567890123456Bad request
Unauthorized
Forbidden
Flow not found
Internal server error
GET /flows/{flow_id}/preview HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "1234567890123456",
"preview": {
"expires_at": "2023-05-21T11:18:09+0000",
"preview_url": "https://business.facebook.com/wa/manage/flows/550/preview/?token=b9d6"
}
}Publish a draft Flow so it can be sent to end users. A published Flow can no longer be edited.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Flow ID
Flow published successfully
Response payload for a published WhatsApp Flow
Whether the Flow was published
trueBad request - Flow has unresolved validation errors
Unauthorized
Forbidden
Internal server error
POST /flows/{flow_id}/publish HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"success": true
}Last updated
Was this helpful?