The Message object
The following attributes are returned when you fetch a message from the API.| Attribute | Description |
|---|---|
id | Unique identifier for the message |
text | Message text content |
media | Media URL, present on MMS messages |
phone | Phone number associated with the message |
type | Message type |
status | Delivery status of the message |
date | Timestamp when the message was sent or received |
user | ID of the user who sent the message |
conversation | The associated conversation object |
broadcast_id | Broadcast ID if this message was part of a broadcast |
flagged | Whether the message has been flagged for review |
Message types
Individual SMS/MMS
Send a message to a single phone number. Include amedia_url to send an MMS with an image or other media attachment.
Group MMS
Send a single MMS to multiple recipients at once by specifying an array of phone numbers in thetargets field. All recipients receive the same message in a group thread.
Broadcast
Send a message to a contact list by specifying alist_id. Each recipient receives the message individually and can reply privately — their replies do not go to the group. Broadcasts are well suited for announcements and campaigns.
Private comment (memo)
Add an internal note to a conversation that is only visible to your team — the customer never sees it. Setprivate: true when creating the message.
Scheduled message
Create a message to be sent at a future time:Templates and merge tokens
Templates let you reuse message content and personalize it for each recipient. You can include the following merge tokens in any template or message body:| Token | Replaced with |
|---|---|
{{first_name}} | Contact’s first name |
{{last_name}} | Contact’s last name |
{{custom_field_name}} | Value of the matching custom field |
Media
To send an image or other media file, include a publicly accessible URL in themedia_url field of your request. Heymarket fetches the file and delivers it as an MMS attachment.