Flows API
Send a published WhatsApp Flow and read its submissions. 4 ops: list_flows, send_flow, list_flow_submissions, update_flow_mapping.
Send a published WhatsApp Flow and read its submissions.
list_flows
readList Flows · POST /api/v1/list_flows · scope flows:read or GET …?input=
The WhatsApp Flows (interactive forms built in Meta's Flow Builder) on the organization's accounts, refreshed from Meta: id, name, status (only published Flows can be sent to customers), categories and the field mapping that copies answers onto contacts. The sandbox has a sample feedback Flow to try. Send one with send_flow.
curl -X POST https://getwabi.dev/api/v1/list_flows \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi list_flows{
"type": "object",
"properties": {
"account_id": {
"description": "Only this account's Flows.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"refresh": {
"default": true,
"description": "Read Meta's current list first.",
"type": "boolean"
}
}
}send_flow
writeSend a Flow · POST /api/v1/send_flow · scope flows:write
Sends a published WhatsApp Flow to a customer as an interactive message: a body text and a button (cta) that opens the form. Inside the customer's 24-hour window only (outside it, send a template with a Flow button). The reply is stored as a submission (list_flow_submissions), mapped onto the contact with the Flow's field mapping, and emits flow.submitted. mode draft sends an unpublished Flow to test it. Returns the message.
curl -X POST https://getwabi.dev/api/v1/send_flow \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"phone_number_id":"phone_number_id","to":"15550100001","flow_id":"flow_id","body":"It would save us a trip to Meta Business Manager.","cta":"cta"}'npx @meterapp/wabi send_flow --json '{"phone_number_id":"phone_number_id","to":"15550100001","flow_id":"flow_id","body":"It would save us a trip to Meta Business Manager.","cta":"cta"}'{
"type": "object",
"properties": {
"phone_number_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "The number to send from (its id, or Meta's phone_number_id)."
},
"to": {
"type": "string",
"minLength": 6,
"maxLength": 32
},
"flow_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "The Flow's id from list_flows, or Meta's Flow id."
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"description": "The message text above the button."
},
"cta": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "The button label, e.g. Book now."
},
"header": {
"type": "string",
"maxLength": 60
},
"footer": {
"type": "string",
"maxLength": 60
},
"screen": {
"description": "The first screen to open (navigate action); default the Flow's first screen.",
"type": "string",
"maxLength": 100
},
"data": {
"description": "Initial data for that screen.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"mode": {
"default": "published",
"type": "string",
"enum": [
"published",
"draft"
]
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"phone_number_id",
"to",
"flow_id",
"body",
"cta"
]
}List Flow submissions · POST /api/v1/list_flow_submissions · scope flows:read or GET …?input=
Answers customers submitted through Flows, newest first: the Flow, the contact, the conversation, the raw response and whether it was mapped onto the contact.
curl -X POST https://getwabi.dev/api/v1/list_flow_submissions \ -H "Authorization: Bearer wabi_…"npx @meterapp/wabi list_flow_submissions{
"type": "object",
"properties": {
"flow_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"contact_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Contact id."
},
"limit": {
"default": 50,
"description": "Page size, at most 200.",
"type": "integer",
"minimum": 1,
"maximum": 200
},
"offset": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
}update_flow_mapping
writeMap Flow answers to contact fields · POST /api/v1/update_flow_mapping · scope flows:write
Sets which Flow answers are copied onto the contact when a submission arrives: { "<Flow field name>": "name" | "email" | "locale" | "timezone" | "external_id" | "attributes.<key>" }. Applies to submissions from now on. Returns the Flow.
curl -X POST https://getwabi.dev/api/v1/update_flow_mapping \ -H "Authorization: Bearer wabi_…" \ -H "Content-Type: application/json" \ -d '{"flow_id":"flow_id","field_mapping":{}}'npx @meterapp/wabi update_flow_mapping --json '{"flow_id":"flow_id","field_mapping":{}}'{
"type": "object",
"properties": {
"flow_id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"field_mapping": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"pattern": "^(name|email|locale|timezone|external_id|attributes\\.[A-Za-z0-9_]{1,64})$"
}
}
},
"required": [
"flow_id",
"field_mapping"
]
}