Create Flow
Creating a Flow:
New Flows are created in DRAFT status by default.
- UAT BASE-URL- https://apiuat.aclwhatsapp.com/access-api/v1/wa
- Production BASE-URL- https://api.aclwhatsapp.com/access-api/v1/wa
Request Type: POST
Sample Request:
curl -X POST '{BASE-URL}/{WABA-ID}/flows' \
--header 'Authorization: Bearer {ACCESS-TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"name": "Test flow Backend 2",
"categories": [ "OTHER" ],
"flow_json" : "{\"version\":\"5.0\",\"screens\":[{\"id\":\"WELCOME_SCREEN\",\"layout\":{\"type\":\"SingleColumnLayout\",\"children\":[{\"type\":\"TextHeading\",\"text\":\"Hello World\"},{\"type\":\"Footer\",\"label\":\"Complete\",\"on-click-action\":{\"name\":\"complete\",\"payload\":{}}}]},\"title\":\"Welcome\",\"terminal\":true,\"success\":true,\"data\":{}}]}",
"publish" : false
}'
Parameter | Description | JSON Type | Required |
---|---|---|---|
name | Flow name | string | Yes |
categories | A list of Flow categories. Multiple values are possible, but at least one is required. Choose the values which represent your business use case. The list of values are below: - SIGN_UP - SIGN_IN - APPOINTMENT_BOOKING - LEAD_GENERATION - CONTACT_US - CUSTOMER_SUPPORT - OTHER | array | Yes |
flow_json | Flow's JSON encoded as string. | string | No |
publish | Indicates whether the Flow should also be get published. This Only works if the flow_json is also provided with valid Flow JSON. | boolean | No |
Sample Response
{
"id": "<Flow-ID>",
"success": true,
"validation_errors": []
}