Skip to main content
POST
/
v1
/
message
/
send
Send SMS and MMS messages
curl --request POST \
  --url https://api.heymarket.com/v1/message/send \
  --header 'Content-Type: application/json' \
  --data '
{
  "inbox_id": 123,
  "creator_id": 123,
  "phone_number": "<string>",
  "targets": [
    "<string>"
  ],
  "chat_id": 123,
  "list_id": 123,
  "text": "<string>",
  "media_url": "<string>",
  "template_id": 123,
  "local_id": "<string>",
  "activity_id": "<string>",
  "private": true,
  "author": "<string>",
  "survey_id": 123
}
'
{
  "id": 123,
  "date": "<string>",
  "gallery_url": "<string>"
}
Use this endpoint to send an outbound SMS or MMS message from one of your inboxes. You can send to an individual phone number, reply in an existing conversation, broadcast to a list, or post a private internal comment visible only to your team.

Request body

inbox_id
integer
required
The ID of the inbox to send the message from.
creator_id
integer
required
The user ID of the sender. This is the member ID returned by GET /v1/inboxes.
phone_number
string
The recipient’s phone number in E.164 format without the leading plus sign (e.g., 14155551234). Use this for individual messages. Provide either phone_number or chat_id, not both.
targets
string[]
An array of phone numbers for sending a group MMS. Each number should be in E.164 format without the leading plus sign.
Toll-free numbers do not support group MMS via targets.
chat_id
integer
The ID of an existing conversation to send the message into. Provide either chat_id or phone_number, not both.
list_id
integer
The ID of a contact list to broadcast the message to. When using list_id, you must also provide local_id.
text
string
The text body of the message.
media_url
string
A publicly accessible URL of the media file to attach. Including this field sends the message as MMS.
template_id
integer
The ID of a saved template to use as the message body.
local_id
string
A client-generated unique ID used for idempotency. Required when sending to a list via list_id.
activity_id
string
The broadcast activity ID, used to group messages from the same broadcast campaign.
private
boolean
When true, the message is created as a private internal comment visible only to team members. It is not sent to the customer.
author
string
A label displayed above the chat bubble to identify the sender.
survey_id
integer
The ID of a survey to send to the recipient.

Response

id
integer
The unique ID of the created message.
date
string
The ISO 8601 timestamp of when the message was sent.
The URL of the attached media, if the message included a media_url.

Examples

curl --request POST \
  --url https://api.heymarket.com/v1/message/send \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "inbox_id": 101,
    "creator_id": 55,
    "phone_number": "14155551234",
    "text": "Hi! Your appointment is confirmed for tomorrow at 10am."
  }'
creator_id is the member ID returned by GET /v1/inboxes, not the general user ID. Retrieve your inbox members list to find the correct value.
local_id is required when sending a broadcast to a list via list_id. Use a unique value per send attempt to ensure idempotency.