{
"id": "flow-1",
"success": true
}{
"success": false,
"validationErrors": [
{
"error": "INVALID_PROPERTY_VALUE",
"errorType": "FLOW_JSON_ERROR",
"message": "Invalid value found for property 'type'.",
"lineStart": 10,
"lineEnd": 10,
"columnStart": 21,
"columnEnd": 34,
"pointers": [
{
"lineStart": 10,
"lineEnd": 10,
"columnStart": 21,
"columnEnd": 34,
"path": "screens[0].layout.children[0].type"
}
]
}
]
}Create a flow
Creates a new WhatsApp Flow. New Flows are by default created in DRAFT state. You can create a new published Flow in single request by specifying flowJson and publish parameters.
{
"id": "flow-1",
"success": true
}{
"success": false,
"validationErrors": [
{
"error": "INVALID_PROPERTY_VALUE",
"errorType": "FLOW_JSON_ERROR",
"message": "Invalid value found for property 'type'.",
"lineStart": 10,
"lineEnd": 10,
"columnStart": 21,
"columnEnd": 34,
"pointers": [
{
"lineStart": 10,
"lineEnd": 10,
"columnStart": 21,
"columnEnd": 34,
"path": "screens[0].layout.children[0].type"
}
]
}
]
}Authorizations
Body
WhatsApp Business Account ID.
"whatsapp-business-account-id"
Flow name.
"My first flow"
Flow categories.
Category of the WhatsApp Flow.
SIGN_UP: For sign-up processes.SIGN_IN: For sign-in processes.APPOINTMENT_BOOKING: For booking appointments.LEAD_GENERATION: For lead generation.CONTACT_US: For contact forms.CUSTOMER_SUPPORT: For customer support.SURVEY: For surveys.OTHER: For other purposes.
SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY, OTHER JSON string of the Flow structure.
"{\"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\":{}}]}"
If true, the Flow will be created in PUBLISHED state.
ID of source Flow to clone. You must have permission to access the specified Flow.
"flow-id-to-clone"
The endpoint URI for the Flow.
"https://example.com/flow-endpoint"

