Conversations represent message threads between your agent’s phone number and an external participant. Each conversation tracks the full message history, supports custom metadata for storing session state, and is sorted by most recent activity.
The channel field on each message tells you how it was delivered. Your code works the same across channels — the differences are in what features are available.
Standard text messaging over the cellular network. Works with any phone number.
channel: "mms")Apple’s messaging protocol. Delivered over the internet to Apple devices, with automatic SMS fallback for non-Apple recipients.
channel is "imessage" for messages delivered via iMessageList all conversations for this project, sorted by most recent activity.
Get a conversation with its recent messages.
Update conversation metadata (state). Use this to store custom context for AI agents, such as customer information, business context, or session state.
The metadata is included in webhook payloads as conversationState, enabling your AI backend to maintain context across messages.
Get paginated messages for a conversation. Use before/after for cursor-based pagination through large message histories.
When someone sends an image, video, or file, the message includes a mediaUrl pointing to the hosted media. The body may be empty if only media was sent.
Image carousels (multiple images sent at once) arrive as separate messages, each with its own mediaUrl.
Media works on both iMessage and MMS (SMS with images). When an image arrives via SMS, the channel is "mms".
iMessage supports tapback reactions — the emoji responses users can add to individual messages (heart, thumbs up, etc.). Reactions are only available on iMessage channels.
Reacting to an image in a carousel works the same way — use the message ID of the specific image.
Reactions are an iMessage feature. Attempting to react to a message on an SMS number will return a 400 error.
When someone reacts to a message your agent sent, an agent.reaction webhook event is fired. See Webhooks for the payload format.
Show a typing bubble in an iMessage conversation. This signals to the recipient that your agent is composing a response.
The request body is empty. The indicator auto-expires after a few seconds, so there’s no “stop typing” call needed. Send it right before your agent starts generating a response.
Typing indicators are best-effort on iMessage only. The provider may silently drop the indicator if the chat hasn’t had recent activity, the recipient isn’t on iMessage, or it’s a group chat.