For the complete documentation index, see llms.txt. This page is also available as Markdown.
Messaging
Sending messages
In order to send a message you must have an active channel and perform an HTTP request to the following endpoint with a valid access key
When you send a message, a contact is automatically created with a contactId matching the receiver's identifier if one doesn't already exist. For instance, sending an email generates a contact with an email identifier, while sending an SMS creates one with a phone number identifier.
Send a message
post
Send a message to a channel
Authorizations
HTTPRequired
Uses the Authorization header: 'AccessKey ' followed by your access key token
Path parameters
workspaceIdstring · uuidRequired
The unique identifier of the workspace.
channelIdstring · uuidRequired
The ID for a channel
Body
and
anyOptional
object · ChannelMessageCreateWithTemplateOptional
or
object · ChannelMessageCreateWithBodyOptional
Responses
202
Message was accepted for processing
application/json
400
An error
application/json
404
An error
application/json
409
The request conflicts with the current state of the resource.
application/json
413
The request body exceeded the 200 KB size limit.
application/json
422
The request contains invalid parameters or body fields.
When sending outbound messages as well as setting the receiver information you must set the message body field in all cases except for sending a message template when you must only set the templatefield.
Multiple recipient messages are only possible through the Email platform. For other platforms, a message with multiple reciever entries will be rejected.
Body
Template
Uploading media
When sending messages that contain media links these must be publicly accessible. Otherwise you can upload media by creating requesting a pre-signed media URL. Firstly make a POST request to the following endpoint with the content type of the media you will be uploading set in the request body.
There are two methods for generating a presigned URL: one is channel-independent, allowing it to be used across any channel, while the other restricts usage to a specified channel ID.
Create a presigned media upload
post
Authorizations
HTTPRequired
Uses the Authorization header: 'AccessKey ' followed by your access key token
Path parameters
workspaceIdstring · uuidRequired
The unique identifier of the workspace.
Body
contentTypestring · min: 1Required
Responses
200
OK
application/json
mediaUrlstring · uriRequired
uploadUrlstring · uriRequired
uploadMethodstringRequired
uploadFormDataobjectRequired
404
An error
application/json
422
The request contains invalid parameters or body fields.
From the response you will get the following details:
mediaUrl: This will be the URL you set in any message bodies where you send the uploaded media
uploadUrl: This is the URL you will need to make a request to to upload your media file
uploadMethod: This is the HTTP method to make an upload i.e. POST
uploadFormData: Set this as the fields in form-data of your POST request along with an additional field called file. This should include your file data. An example using CURL
No need to specify any AccessKey on the below call as all the required data is provided in the form data.
Example
Once you have uploaded the file using the mediaUrl, this should be used as the URL when sending messages with media.
Retrieving messages
Retrieve a list of messages of a channel
List messages by channel ID
get
It retrieves a list of messages from a given channel ID
Authorizations
HTTPRequired
Uses the Authorization header: 'AccessKey ' followed by your access key token
Path parameters
workspaceIdstring · uuidRequired
The unique identifier of the workspace.
channelIdstring · uuidRequired
The ID for a channel
Query parameters
limitinteger · min: 1 · max: 1000Optional
Limits the number of results to return.
Default: 25
pageTokenstringOptional
The cursor that keeps track of the current position in the results.
reversebooleanOptional
Reverses the order in which the results are returned.
The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.
404
An error
application/json
422
The request contains invalid parameters or body fields.
application/json
get
/workspaces/{workspaceId}/channels/messages
Retrieve a single message
Get message by message ID
get
Get a channel message
Authorizations
HTTPRequired
Uses the Authorization header: 'AccessKey ' followed by your access key token
Path parameters
workspaceIdstring · uuidRequired
The unique identifier of the workspace.
messageIdstring · uuidRequired
The ID for a message
channelIdstring · uuidRequired
The ID for a channel
Responses
200
OK
application/json
bodyone ofOptional
or
or
or
or
or
or
or
or
or
or
bodyIdstring · uuidOptional
channelIdstring · uuidRequired
chargeableUnitsinteger · uint32Optional
createdAtstring · date-timeRequired
detailsstringOptional
This field is used to store additional information related to the message status.
directionstring · enumOptionalPossible values:
idstring · uuidRequired
ignorePersistedEventhooksbooleanOptional
lastStatusAtstring · date-timeRequired
platformIdstringOptional
platformReferenceIdstringOptional
reasonstringOptional
referencestringOptional
A reference to the message. This can be used to identify the message in the channel.
scheduledForstring · date-timeOptional
Scheduled message send time (RFC3339). Messages scheduled within 10 minutes may be sent immediately; messages scheduled more than 35 days out will be rejected.
sendAtstring · date-timeOptional
statusstring · enumRequiredPossible values:
tagIdsstring · uuid[]Optional
tagsstring[]Optional
Tags to associate with the message. Tags are converted to lower case and automatically created if they don't exist. Up to 10 tags per message.