https://api.heymarket.com and require your API key in the Authorization header.
Prerequisites
Before you can send a message, you need two IDs from your Heymarket account:inbox_id— the inbox you want to send fromcreator_id— the user ID that appears as the sender
GET /v1/inboxes to retrieve these values.
Steps
Get your inbox ID
Call Example response:Note the
GET /v1/inboxes to list all inboxes in your account. Each inbox object includes its ID, name, and associated phone numbers.id value for the inbox you want to send from, and the id of the user who should appear as the sender (retrieve user IDs from GET /v1/users).Send an individual SMS
Post to
POST /v1/message/send with your inbox_id, creator_id, the recipient’s phone_number, and the message text.Send with a template
Replace
text with template_id to use a saved message template. The template content is applied server-side, including any merge tokens.Send with media (MMS)
Add a
media_url field to send an image or other media file. The recipient’s carrier must support MMS.Toll-free numbers do not support group MMS.
Request body
| Field | Type | Description |
|---|---|---|
inbox_id | integer | Required. The inbox to send from. |
creator_id | integer | Required. The user ID that appears as the sender. |
phone_number | string | Recipient phone number in E.164 format without the leading plus sign (e.g., 15105553344). |
targets | array of strings | List of phone numbers for group MMS. |
chat_id | integer | Existing conversation ID. Use this to send into an open conversation instead of creating a new one. |
list_id | integer | Contact list ID for broadcasting to a list. |
text | string | The message body text. |
media_url | string | Publicly accessible URL of a media file to send as MMS. |
template_id | integer | ID of a saved template to use instead of text. |
local_id | string | Client-side unique identifier. Required when sending to a list. |
private | boolean | When true, creates a private internal comment visible only to your team. |
author | string | Name displayed above the chat bubble in the conversation view. |
survey_id | integer | ID of a survey to send to the recipient. |
Code examples
Response fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique ID of the sent message. |
date | string | ISO 8601 timestamp of when the message was sent. |
gallery_url | string | URL to view the conversation in the Heymarket web app. |