Skip to content
V2 (Legacy) API ReferenceGet started

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.

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 link part 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(ctx, messageID, query) (*ListMessagesPagination[Message], error)
GET/v3/messages/{messageId}/thread
Get a message by ID
client.Messages.Get(ctx, messageID) (*Message, error)
GET/v3/messages/{messageId}
Delete a message from system
client.Messages.Delete(ctx, messageID) error
DELETE/v3/messages/{messageId}
Add or remove a reaction to a message
client.Messages.AddReaction(ctx, messageID, body) (*MessageAddReactionResponse, error)
POST/v3/messages/{messageId}/reactions
Edit the content of a message part
client.Messages.Update(ctx, messageID, body) (*Message, error)
PATCH/v3/messages/{messageId}
ModelsExpand Collapse
type Message struct{…}
ID string

Unique identifier for the message

formatuuid
ChatID string

ID of the chat this message belongs to

formatuuid
CreatedAt Time

When the message was created

formatdate-time
IsDelivered bool

Whether the message has been delivered

IsFromMe bool

Whether this message was sent by the authenticated user

IsRead bool

Whether the message has been read

UpdatedAt Time

When the message was last updated

formatdate-time
DeliveredAt TimeOptional

When the message was delivered

formatdate-time
Effect MessageEffectOptional

iMessage effect applied to a message (screen or bubble effect)

Name stringOptional

Name of the effect. Common values:

  • Screen effects: confetti, fireworks, lasers, sparkles, celebration, hearts, love, balloons, happy_birthday, echo, spotlight
  • Bubble effects: slam, loud, gentle, invisible
Type MessageEffectTypeOptional

Type of effect

One of the following:
const MessageEffectTypeScreen MessageEffectType = "screen"
const MessageEffectTypeBubble MessageEffectType = "bubble"
DeprecatedFrom stringOptional

DEPRECATED: Use from_handle instead. Phone number of the message sender.

FromHandle ChatHandleOptional

The sender of this message as a full handle object

ID string

Unique identifier for this handle

formatuuid
Handle string

Phone number (E.164) or email address of the participant

JoinedAt Time

When this participant joined the chat

formatdate-time
Service ServiceType

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"
IsMe boolOptional

Whether this handle belongs to the sender (your phone number)

LeftAt TimeOptional

When they left (if applicable)

formatdate-time
Status ChatHandleStatusOptional

Participant status

One of the following:
const ChatHandleStatusActive ChatHandleStatus = "active"
const ChatHandleStatusLeft ChatHandleStatus = "left"
const ChatHandleStatusRemoved ChatHandleStatus = "removed"
Parts []MessagePartUnionOptional

Message parts in order (text, media, and link)

One of the following:
type TextPartResponse struct{…}

A text message part

Reactions []Reaction

Reactions on this message part

Handle ChatHandle
ID string

Unique identifier for this handle

formatuuid
Handle string

Phone number (E.164) or email address of the participant

JoinedAt Time

When this participant joined the chat

formatdate-time
Service ServiceType

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"
IsMe boolOptional

Whether this handle belongs to the sender (your phone number)

LeftAt TimeOptional

When they left (if applicable)

formatdate-time
Status ChatHandleStatusOptional

Participant status

One of the following:
const ChatHandleStatusActive ChatHandleStatus = "active"
const ChatHandleStatusLeft ChatHandleStatus = "left"
const ChatHandleStatusRemoved ChatHandleStatus = "removed"
IsMe bool

Whether this reaction is from the current user

Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh, emphasize, question. Custom emoji reactions have type “custom” with the actual emoji in the custom_emoji field. Sticker reactions have type “sticker” with sticker attachment details in the sticker field.

One of the following:
const ReactionTypeLove ReactionType = "love"
const ReactionTypeLike ReactionType = "like"
const ReactionTypeDislike ReactionType = "dislike"
const ReactionTypeLaugh ReactionType = "laugh"
const ReactionTypeEmphasize ReactionType = "emphasize"
const ReactionTypeQuestion ReactionType = "question"
const ReactionTypeCustom ReactionType = "custom"
const ReactionTypeSticker ReactionType = "sticker"
CustomEmoji stringOptional

Custom emoji if type is “custom”, null otherwise

Sticker ReactionStickerOptional

Sticker attachment details when reaction_type is “sticker”. Null for non-sticker reactions.

FileName stringOptional

Filename of the sticker

Height int64Optional

Sticker image height in pixels

MimeType stringOptional

MIME type of the sticker image

URL stringOptional

Presigned URL for downloading the sticker image (expires in 1 hour).

formaturi
Width int64Optional

Sticker image width in pixels

Type TextPartResponseType

Indicates this is a text message part

Value string

The text content

TextDecorations []TextDecorationOptional

Text decorations applied to character ranges in the value

Range []int64

Character range [start, end) in the value string where the decoration applies. start is inclusive, end is exclusive. Characters are measured as UTF-16 code units. Most characters count as 1; some emoji count as 2.

Animation TextDecorationAnimationOptional

Animated text effect to apply. Mutually exclusive with style.

One of the following:
const TextDecorationAnimationBig TextDecorationAnimation = "big"
const TextDecorationAnimationSmall TextDecorationAnimation = "small"
const TextDecorationAnimationShake TextDecorationAnimation = "shake"
const TextDecorationAnimationNod TextDecorationAnimation = "nod"
const TextDecorationAnimationExplode TextDecorationAnimation = "explode"
const TextDecorationAnimationRipple TextDecorationAnimation = "ripple"
const TextDecorationAnimationBloom TextDecorationAnimation = "bloom"
const TextDecorationAnimationJitter TextDecorationAnimation = "jitter"
Style TextDecorationStyleOptional

Text style to apply. Mutually exclusive with animation.

One of the following:
const TextDecorationStyleBold TextDecorationStyle = "bold"
const TextDecorationStyleItalic TextDecorationStyle = "italic"
const TextDecorationStyleStrikethrough TextDecorationStyle = "strikethrough"
const TextDecorationStyleUnderline TextDecorationStyle = "underline"
type MediaPartResponse struct{…}

A media attachment part

ID string

Unique attachment identifier

formatuuid
Filename string

Original filename

MimeType string

MIME type of the file

Reactions []Reaction

Reactions on this message part

Handle ChatHandle
ID string

Unique identifier for this handle

formatuuid
Handle string

Phone number (E.164) or email address of the participant

JoinedAt Time

When this participant joined the chat

formatdate-time
Service ServiceType

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"
IsMe boolOptional

Whether this handle belongs to the sender (your phone number)

LeftAt TimeOptional

When they left (if applicable)

formatdate-time
Status ChatHandleStatusOptional

Participant status

One of the following:
const ChatHandleStatusActive ChatHandleStatus = "active"
const ChatHandleStatusLeft ChatHandleStatus = "left"
const ChatHandleStatusRemoved ChatHandleStatus = "removed"
IsMe bool

Whether this reaction is from the current user

Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh, emphasize, question. Custom emoji reactions have type “custom” with the actual emoji in the custom_emoji field. Sticker reactions have type “sticker” with sticker attachment details in the sticker field.

One of the following:
const ReactionTypeLove ReactionType = "love"
const ReactionTypeLike ReactionType = "like"
const ReactionTypeDislike ReactionType = "dislike"
const ReactionTypeLaugh ReactionType = "laugh"
const ReactionTypeEmphasize ReactionType = "emphasize"
const ReactionTypeQuestion ReactionType = "question"
const ReactionTypeCustom ReactionType = "custom"
const ReactionTypeSticker ReactionType = "sticker"
CustomEmoji stringOptional

Custom emoji if type is “custom”, null otherwise

Sticker ReactionStickerOptional

Sticker attachment details when reaction_type is “sticker”. Null for non-sticker reactions.

FileName stringOptional

Filename of the sticker

Height int64Optional

Sticker image height in pixels

MimeType stringOptional

MIME type of the sticker image

URL stringOptional

Presigned URL for downloading the sticker image (expires in 1 hour).

formaturi
Width int64Optional

Sticker image width in pixels

SizeBytes int64

File size in bytes

Type MediaPartResponseType

Indicates this is a media attachment part

URL string

Presigned URL for downloading the attachment (expires in 1 hour).

formaturi
Handle ChatHandle
ID string

Unique identifier for this handle

formatuuid
Handle string

Phone number (E.164) or email address of the participant

JoinedAt Time

When this participant joined the chat

formatdate-time
Service ServiceType

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"
IsMe boolOptional

Whether this handle belongs to the sender (your phone number)

LeftAt TimeOptional

When they left (if applicable)

formatdate-time
Status ChatHandleStatusOptional

Participant status

One of the following:
const ChatHandleStatusActive ChatHandleStatus = "active"
const ChatHandleStatusLeft ChatHandleStatus = "left"
const ChatHandleStatusRemoved ChatHandleStatus = "removed"
IsMe bool

Whether this reaction is from the current user

Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh, emphasize, question. Custom emoji reactions have type “custom” with the actual emoji in the custom_emoji field. Sticker reactions have type “sticker” with sticker attachment details in the sticker field.

One of the following:
const ReactionTypeLove ReactionType = "love"
const ReactionTypeLike ReactionType = "like"
const ReactionTypeDislike ReactionType = "dislike"
const ReactionTypeLaugh ReactionType = "laugh"
const ReactionTypeEmphasize ReactionType = "emphasize"
const ReactionTypeQuestion ReactionType = "question"
const ReactionTypeCustom ReactionType = "custom"
const ReactionTypeSticker ReactionType = "sticker"
CustomEmoji stringOptional

Custom emoji if type is “custom”, null otherwise

Sticker ReactionStickerOptional

Sticker attachment details when reaction_type is “sticker”. Null for non-sticker reactions.

FileName stringOptional

Filename of the sticker

Height int64Optional

Sticker image height in pixels

MimeType stringOptional

MIME type of the sticker image

URL stringOptional

Presigned URL for downloading the sticker image (expires in 1 hour).

formaturi
Width int64Optional

Sticker image width in pixels

PreferredService ServiceTypeOptional

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"
ReadAt TimeOptional

When the message was read

formatdate-time
ReplyTo ReplyToOptional

Indicates this message is a threaded reply to another message

MessageID string

The ID of the message to reply to

formatuuid
PartIndex int64Optional

The specific message part to reply to (0-based index). Defaults to 0 (first part) if not provided. Use this when replying to a specific part of a multipart message.

formatint32
minimum0
SentAt TimeOptional

When the message was sent

formatdate-time
Service ServiceTypeOptional

Messaging service type

One of the following:
const ServiceTypeiMessage ServiceType = "iMessage"
const ServiceTypeSMS ServiceType = "SMS"
const ServiceTypeRCS ServiceType = "RCS"
type MessageEffect struct{…}

iMessage effect applied to a message (screen or bubble effect)

Name stringOptional

Name of the effect. Common values:

  • Screen effects: confetti, fireworks, lasers, sparkles, celebration, hearts, love, balloons, happy_birthday, echo, spotlight
  • Bubble effects: slam, loud, gentle, invisible
Type MessageEffectTypeOptional

Type of effect

One of the following:
const MessageEffectTypeScreen MessageEffectType = "screen"
const MessageEffectTypeBubble MessageEffectType = "bubble"
type ReplyTo struct{…}

Indicates this message is a threaded reply to another message

MessageID string

The ID of the message to reply to

formatuuid
PartIndex int64Optional

The specific message part to reply to (0-based index). Defaults to 0 (first part) if not provided. Use this when replying to a specific part of a multipart message.

formatint32
minimum0