Overview
The Text resource provides methods to send SMS/MMS messages, manage reactions, retrieve conversation history, and reply to incoming messages via webhooks.Sending Messages
Send a text message to a phone number.Parameters
The recipient’s phone number in E.164 format
The text message content to send
The sender’s phone number. If not provided, a number will be automatically selected
Array of attachment URLs (images, videos, etc.). Maximum 3 attachments
Enable fast-track delivery for time-sensitive messages
Returns
Replying to Messages
Reply to an incoming text message webhook. This method automatically extractsto and from fields from the webhook event.
Parameters
The incoming webhook event object containing
data.to and data.fromSend parameters excluding
to and from (automatically populated from event)Adding Reactions
Add a reaction to a text message.Parameters
Whether to add or remove the reaction
Reaction parameters
The ID of the message to react to
The recipient’s phone number
The sender’s phone number
The message content (alternative to message_id)
The reaction type. One of:
love, thumbsup, thumbsdown, haha, emphasized, questionedRemoving Reactions
Remove a reaction from a text message.Retrieving Message History
Get conversation history between two phone numbers.Parameters
The recipient’s phone number
The sender’s phone number
Maximum number of messages to retrieve (default: 20)
Getting a Single Message
Retrieve a specific message by its ID.Parameters
The message ID to retrieve
Error Handling
All methods validate input parameters using Zod schemas and throw validation errors for invalid input.

