{
"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"
}
]
}
]
}WhatsApp Flows
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.
POST
https://api.ycloud.com/v2
/
whatsapp
/
flows
{
"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"
}
]
}
]
}Body
application/json
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.
Available options:
SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY, OTHER JSON string of the Flow structure.
Example:
"{\"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\":{}}]}"

