Chatbot

WhatsApp Chatbot Flow API

Unlike other unofficial, session-based WhatsApp APIs, Wasaas lets you create, edit and publish the actual chatbot flow logic — not just connect to one — through a REST API. Flows, their triggers and their steps are all manageable programmatically, the same records the dashboard's Chatbot Flows screen edits.

This is not the inbound webhook page

If you're looking for how an incoming WhatsApp message triggers a reply, see the WhatsApp Chatbot API page — that covers POST /api/v1/incoming, the runtime side. This page covers the build-time side: creating and editing the flows that endpoint runs.

Not to be confused with Meta's "WhatsApp Flows"

Meta's WhatsApp Business Platform has its own, separate feature also called WhatsApp Flows — structured, multi-screen in-chat forms (dropdowns, date pickers, multi-step forms) built with Meta's Flow JSON format and sent through the official Cloud API. Wasaas's Chatbot Flow API is not that product and does not implement Meta's Flow JSON. A Wasaas "flow" is a keyword trigger paired with an ordered sequence of reply messages — closer to a scripted auto-reply sequence than a structured form. If you specifically need Meta-style in-chat forms, that is a capability of Meta's official platform, not of Wasaas.

What you can do with this API

  • Create a flow with a name, a trigger keyword, and an owning WhatsApp session
  • List every flow on your account, or filter by session
  • Read, update or delete a single flow — including its active/scheduled state
  • Add steps to a flow, each one a message in the sequence
  • List a flow's steps in order

Every endpoint here uses the same Authorization: Bearer wsa_… API key as the rest of the REST API, and every record is scoped to your account — a flow created with your key is never visible to another customer.

Create a flow

http
POST https://wasaas.org/api/v1/chatbot/flows
FieldTypeRequiredNotes
namestringYesUp to 100 characters.
account_idnumberYesThe WhatsApp session this flow runs on. Must belong to your account.
triggerstringYesMatched against the whole inbound message — see the Chatbot API page for exact matching rules.
descriptionstringNoInternal note, not shown to contacts.
fallback_messagestringNoSent only when the trigger matches but the flow has no steps.
is_activebooleanNoDefaults to true.
schedule_start / schedule_endstring (ISO datetime)NoOptional window outside which the flow is skipped.
bash
curl -X POST https://wasaas.org/api/v1/chatbot/flows \
  -H "Authorization: Bearer wsa_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pricing enquiry",
    "account_id": 12,
    "trigger": "price"
  }'

Returns the created flow, including its (initially empty) steps array, with status 201.

List and read flows

http
GET https://wasaas.org/api/v1/chatbot/flows
GET https://wasaas.org/api/v1/chatbot/flows?account_id=12
GET https://wasaas.org/api/v1/chatbot/flows/{id}

The list endpoint returns every flow on your account, each with its steps, its owning session (account), and a conversation count. Add account_id to scope it to one WhatsApp session. The single-flow endpoint returns 404 if the flow does not exist or belongs to another account.

Update or delete a flow

http
PUT https://wasaas.org/api/v1/chatbot/flows/{id}
DELETE https://wasaas.org/api/v1/chatbot/flows/{id}

PUT accepts any subset of the create fields — send only what changes. is_active: false is how you pause a flow without deleting it. DELETE removes the flow and its steps permanently; there is no undo.

Manage a flow's steps

http
GET  https://wasaas.org/api/v1/chatbot/flows/{id}/steps
POST https://wasaas.org/api/v1/chatbot/flows/{id}/steps
FieldTypeRequiredNotes
messagestringYesThe text sent for this step.
ordernumberNoPosition in the sequence. Omit it to append the step after the current last one.
bash
curl -X POST https://wasaas.org/api/v1/chatbot/flows/42/steps \
  -H "Authorization: Bearer wsa_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "message": "Our Starter plan is $29/mo for 5,000 messages." }'

Steps are returned in order and run in that order once a conversation reaches this flow — the same mechanics documented on the Chatbot API page.

What Wasaas does not provide here

This API manages flow content — triggers, steps, scheduling. It does not add conditional branching, variables, or logic beyond the linear step sequence the dashboard already supports; a step cannot read a database or call another system. For dynamic replies — an order lookup, a personalised answer — receive the inbound message yourself and reply through the send API, as described on the Chatbot API page's "when you need real logic" section.

Where to go next

WhatsApp Chatbot Flow API — Build Flows Programmatically | Wasaas