Interactive Flows

Multi-screen, WhatsApp Flow-style forms for registration, waiting lists, and data collection.

Concepts

ObjectDescription
BotContainer (runtime_mode=local or partner service)
FlowNamed multi-step journey (code, card image, CTA)
StepScreen: form, input, select, end, and others
InvitationHub 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:

EndpointPurpose
POST /me/flows/startStart or resume the session
POST /me/bots/sessions/{ref}/inputSubmit the step (form_submit, text, or OTP)
GET /me/flowsList 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_json for multi-field forms