Skip to main content
POST
Create a WhatsApp Flow
Creates a WhatsApp Flow on the channel’s WhatsApp Business Account and uploads the Flow JSON as its asset. The Flow starts in draftpublish it before sending it to real recipients.

Endpoint

Required scope

flows:write

Body

Example request

curl

Response

201 Created

meta_flow_id is what you pass as flow_id when sending a message of type flow through POST /v1/messages.

400 Bad Request

The channel is not WhatsApp, has no Meta credentials, or the Flow JSON was rejected by Meta.

409 Conflict

A Flow with that name already exists on the channel.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Body

application/json
name
string
required
Maximum string length: 100
Example:

"reserva-mesa"

flow_data
object
required

Flow JSON as defined by Meta (version, screens, routing_model). Uploaded as the Flow asset on create.

Example:
channel_id
string

Keebai channel id. Optional when the tenant has exactly one active channel of the given type; required to disambiguate otherwise.

Example:

"665f1a2b3c4d5e6f70819234"

phone_number_id
string

WhatsApp-only alias for channel_id: the Meta phone_number_id of the sending number. Ignored on other channels.

Example:

"100000000000001"

description
string
Maximum string length: 500
categories
enum<string>[]
Available options:
OTHER,
SIGN_UP,
SIGN_IN,
APPOINTMENT_BOOKING,
LEAD_GENERATION,
CONTACT_US,
CUSTOMER_SUPPORT,
SURVEY
metadata
object

Free-form metadata stored alongside the Flow in Keebai.

Response

201 - application/json
id
string
required

Keebai flow id.

channel_id
string
required

Keebai channel this Flow belongs to.

name
string
required
categories
enum<string>[]
required
Available options:
OTHER,
SIGN_UP,
SIGN_IN,
APPOINTMENT_BOOKING,
LEAD_GENERATION,
CONTACT_US,
CUSTOMER_SUPPORT,
SURVEY
status
enum<string>
required
Available options:
draft,
published,
archived
description
string | null
meta_flow_id
string | null

Meta Flow id. Use it as flow_id when sending a message of type flow. Null until Meta accepts the Flow.

flow_data
object

Flow JSON currently stored in Keebai.

metadata
object
created_at
string<date-time> | null
updated_at
string<date-time> | null