Messages
Messages are individual communications within a chat thread.
Messages can include text, media attachments, rich link previews, special effects (like confetti or fireworks), and reactions. All messages are associated with a specific chat and sent from a phone number you own.
Messages support delivery status tracking, read receipts, and editing capabilities.
Rich Link Previews
Send a URL as a link part to deliver it with a rich preview card showing the
pageโs title, description, and image (when available). A link part must be the
only part in the message โ it cannot be combined with text or media parts.
To send a URL without a preview card, include it in a text part instead.
Limitations:
- A
linkpart cannot be combined with other parts in the same message. - Maximum URL length: 2,048 characters.
Get all messages in a thread
client.messages.listMessagesThread(stringmessageID, MessageListMessagesThreadParams { cursor, limit, order } query?, RequestOptionsoptions?): ListMessagesPagination<Message { id, chat_id, created_at, 14 more } >
GET/v3/messages/{messageId}/thread
Get a message by ID
client.messages.retrieve(stringmessageID, RequestOptionsoptions?): Message { id, chat_id, created_at, 14 more }
GET/v3/messages/{messageId}
Delete a message from system
client.messages.delete(stringmessageID, RequestOptionsoptions?): void
DELETE/v3/messages/{messageId}
Add or remove a reaction to a message
client.messages.addReaction(stringmessageID, MessageAddReactionParams { operation, type, custom_emoji, part_index } body, RequestOptionsoptions?): MessageAddReactionResponse { message, status, trace_id }
POST/v3/messages/{messageId}/reactions
Edit the content of a message part
client.messages.update(stringmessageID, MessageUpdateParams { text, part_index } body, RequestOptionsoptions?): Message { id, chat_id, created_at, 14 more }
PATCH/v3/messages/{messageId}