Skip to main content
Channels let your agent hold conversations over WhatsApp and SMS. You initiate the thread with an opening message; from then on, the user’s replies flow to the agent and the agent’s replies flow back on the same channel — no polling or webhooks needed on your side.

Start a channel thread

Send the opening message on a channel and bind the recipient’s phone number to a conversation thread. Pass sender_id to send from a number you connected in the AUI playground; omit it to use the platform default sender.
cURL

POST /messaging/v1/channels/{channel}/threads

string
required
whatsapp or sms.

Request body

string
required
Recipient phone number in E.164 format (e.g. +14155551234). This is who receives the opener — not the number you send from.
string
MongoDB ObjectId of a sender you already connected in the AUI playground (SMS or WhatsApp). The opener is sent from that connected number. Omit it to use the platform default sender. This is not the recipient phone number.
string
Continue an existing thread instead of starting a new one. Omitted, a new thread is created and its id returned.
string
Your identifier for the user on a new thread. Defaults to the phone number’s digits.
string
Opening message body for SMS. WhatsApp ignores it — the opener uses your approved WhatsApp template.
string
WhatsApp only: the agent name substituted into the template’s first variable.

Response

string
The conversation thread the opener landed on — new or continued.
string
The provider’s message id for the sent opener, for delivery tracking.
string
The connected number the opener was sent from. Present when you passed sender_id; omitted when the platform default sender was used.

How the conversation continues

Once the thread exists:
  1. The recipient replies on WhatsApp/SMS.
  2. The reply is routed to your agent on the bound thread.
  3. The agent’s answer is delivered back on the same channel.
The thread is a regular conversation thread — read its transcript with GET /messaging/v1/threads/{threadId}/messages and inspect its reasoning with traces.
WhatsApp requires the opening message of a business-initiated conversation to use a pre-approved template; text applies to SMS only. Connect a phone number in the AUI playground, then pass that sender’s ObjectId as sender_id to start the conversation from that number.