Skip to content
Esc
↑↓navigate↵open⌘Jpreview
Book a demo

Create message

Sends a text (or email) to a contact, creating the contact if the phone number is new. Profile fields you include update the contact.

POST/v1/messages
Request body
requiredapplication/json
bodystringrequired
The message text. Supports merge tags such as `{firstName}`.
customerobjectrequired
The recipient. `phoneNumber` is required (`phone_number` and `phone` are accepted aliases). Optional `firstName`, `lastName`, and `email` update the contact.
Show properties
phoneNumberstring
firstNamestring
lastNamestring
emailstring
protocolstring
Defaults to `sms`.
Allowed:smsemail
subjectstring
Email subject, when `protocol` is `email`.
max length 200
scheduleDatestring<date-time>
Send later instead of immediately.
threadobject
Show properties
statusstring
Status to set on the contact's thread after sending.
Allowed:readunreadarchivedprospect
Responses
200Successful response
messageMessage
Show properties
idstring
orgstring
gymstring
threadstring
customerstring
userstring
The team member who sent the message, for messages sent from the inbox.
flowstring
The flow that sent the message, if any.
listMessagestring
The blast that sent the message, if any.
bodystring
subjectstring
Email subject, for email messages.
directionstring
Allowed:incomingoutgoing
statusstring
Allowed:queuedscheduledsendingsentfailed
protocolstring
`http` is used for form submissions.
Allowed:smsemailhttpvoip
segmentsinteger
Billable SMS segments.
mediaobject[]
Show properties
Array of object
contentTypestring
urlstring
linksobject[]
Tracked short links in the message body.
Show properties
Array of object
pathstring
urlstring
scheduleDatestring<date-time>
createdAtstring<date-time>
updatedAtstring<date-time>
threadThread
Show properties
idstring
orgstring
gymstring
customerstring
The contact this conversation is with.
userstring
The team member the thread is assigned to, if any.
statusstring
Allowed:readunreadarchivedprospect
tagsstring[]
lastMessageobject
A summary of the most recent message.
Show properties
bodystring
datestring<date-time>
directionstring
Allowed:incomingoutgoing
protocolstring
Allowed:smsemailhttpvoip
mediaCountinteger
createdAtstring<date-time>
updatedAtstring<date-time>
204Customer opted out
Request
curl -X POST "https://api.sendhelios.com/v1/messages" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "string",
  "customer": {
    "phoneNumber": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string"
  },
  "protocol": "sms",
  "subject": "string",
  "scheduleDate": "2024-01-01T00:00:00Z",
  "thread": {
    "status": "read"
  }
}'
Response
{
  "message": {
    "id": "string",
    "org": "string",
    "gym": "string",
    "thread": "string",
    "customer": "string",
    "user": "string",
    "flow": "string",
    "listMessage": "string",
    "body": "string",
    "subject": "string",
    "direction": "incoming",
    "status": "queued",
    "protocol": "sms",
    "segments": 0,
    "media": [
      {
        "contentType": "string",
        "url": "string"
      }
    ],
    "links": [
      {
        "path": "string",
        "url": "string"
      }
    ],
    "scheduleDate": "2024-01-01T00:00:00Z",
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  },
  "thread": {
    "id": "string",
    "org": "string",
    "gym": "string",
    "customer": "string",
    "user": "string",
    "status": "read",
    "tags": [
      "string"
    ],
    "lastMessage": {
      "body": "string",
      "date": "2024-01-01T00:00:00Z",
      "direction": "incoming",
      "protocol": "sms",
      "mediaCount": 0
    },
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  }
}