Interactive Flows
Multi-screen, WhatsApp Flow-style forms for registration, waiting lists, and data collection.
Concepts
| Object | Description |
|---|---|
| Bot | Container (runtime_mode=local or partner service) |
| Flow | Named multi-step journey (code, card image, CTA) |
| Step | Screen: form, input, select, end, and others |
| Invitation | Hub message with content_type=flow that opens the form |
Invite a user to a flow
POST /api/v1/bots/{bot_code}/flows/{flow_code}/invite
{
"phone": "+228XXXXXXXX",
"body": "Rejoignez la liste d’attente SEED."
}
Creates a standalone flow card in the partner hub, not a support conversation.
Example
curl -X POST "$API/bots/portail/flows/waitlist/invite" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"+228XXXXXXXX"}'
End-user session (client apps)
Client apps use the user JWT, not the partner key:
| Endpoint | Purpose |
|---|---|
POST /me/flows/start | Start or resume the session |
POST /me/bots/sessions/{ref}/input | Submit the step (form_submit, text, or OTP) |
GET /me/flows | List available flows |
Form submission payload
{
"type": "form_submit",
"values": {
"full_name": "Ama Koffi",
"phone": "+22890000000",
"email": "[email protected]"
}
}
Validation
The server validates field types (email, E.164 phone, number, date, select, and others).
See Field Validation.
Completion
On success, the same flow card changes to status=completed and displays a read-only summary of the answers. Intermediate-step chat messages are not posted.
Local flow definition
Configure it in Partner Hub (MorisBox → Bots) or through seed / provisioning data:
- Bot -
runtime_mode=local - Flow - card fields (
code, image, CTA) - Steps -
fields_jsonfor multi-field forms