Flows
Forms that open inside the chat
Build WhatsApp Flows for bookings, sign-ups and surveys. Send them from any number and get the answers as typed events.
- Screens in one Flow
- 50
- Components per Flow
- 1,000
- Flow JSON per draft
- 2 MB
- Prefilled data per send
- 16 KiB
Build
Catch the broken route before a customer does.
One draft serves Cloud API and Linked Devices projects. Validation, a local preview and JSON round trips come with it.
Send and receive
From any number, back as data.
Publish once on a Cloud API number, then send the Flow from every number in the project. Answers arrive typed.
In your code
Flows from your own code.
Save drafts, send Flows and read answers from the SDK, the CLI or plain HTTP.
import { Client } from "@polymorfa/sdk";
const platform = new Client({
credential: { type: "organizationApiKey", value: apiKey },
});
const flows = platform.project("PROJECT_ID").flows;
const { data: draft } = await flows.create({
name: "Booking",
definition: bookingFlowJson,
});API surface
The Flows API.
Reads need sessions:read and changes need sessions:manage. The TypeScript SDK wraps every route below.
Drafts
- GET
/List the project's Flowsplatform/ flows - POST
/Create a draftplatform/ flows - PATCH
/Update a draftplatform/ flows/ {flowId} - DELETE
/Delete a draftplatform/ flows/ {flowId}
Publishing
- POST
/Upload to a Cloud API numberplatform/ flows/ {flowId}/ upload - POST
/Publish the uploaded Flowplatform/ flows/ {flowId}/ publish - POST
/Retire a published Flowplatform/ flows/ {flowId}/ deprecate - PUT
/Set the data endpointplatform/ flows/ {flowId}/ endpoint - POST
/Rotate the encryption keyplatform/ flow-encryption-keys/ rotate
Sending and events
- POST
/Send with content.flowmessaging/ {session}/ messages/ send - Event
message.receivedA completed Flow, as native_flow_response
Start with a free number
Your first real number is free. Add more numbers on Pay-As-You-Go.