Skip to main content
POST
/
{business_account_id}
/
flows
Create flow
curl --request POST \
  --url https://api.kapso.ai/meta/whatsapp/{business_account_id}/flows \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "appointment_booking",
  "categories": [
    "APPOINTMENT_BOOKING"
  ]
}'
{
  "id": "<string>",
  "success": true,
  "validation_errors": [
    {
      "error": "<string>",
      "error_type": "<string>",
      "message": "<string>",
      "line_start": 123,
      "line_end": 123,
      "column_start": 123,
      "column_end": 123
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Project API key for authentication. This is the recommended authentication method.

Get your API key from the Kapso dashboard under Project Settings > API Keys.

Path Parameters

business_account_id
string
required

WhatsApp Business Account ID

Body

application/json
name
string
required

Flow name

categories
enum<string>[]
required

Flow categories

clone_flow_id
string

ID of flow to clone

endpoint_uri
string<uri>

Endpoint URI for the flow

flow_json
string

Flow's JSON encoded as string. If provided with publish=true, creates and publishes flow in one request.

publish
boolean

Indicates whether Flow should also get published. Only works if flow_json is provided with valid Flow JSON.

Response

Flow created successfully

id
string

Flow ID

success
boolean
validation_errors
object[]