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
Send a message to a channel
The ID of the workspace
The ID for a channel
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 template
field.
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.
The ID of the workspace
The ID for a channel
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.
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
It retrieves a list of messages from a given channel ID
The ID of the workspace
The ID for a channel
Limits the number of results to return
10
Pagination token that keeps of track of the current position in the list
Order in which to retrieve the results
false
Filter based on platform name
^[A-Za-z0-9-]+$
Start date for the query
End date for the query
sender identifier for the message
recipient identifier for the message
Filter based on tag
Full text search on email subject
The ID for a batch
Retrieve list of messages of a workspace
Retrieve a single message
Get a channel message
The ID of the workspace
The ID for a message
The ID for a channel
Retrieve all message interactions on a message
List message interactions
The ID of the workspace
The ID for a message
The ID for a channel
Retrieving media
Retrieve pre-signed media uploads
For media that you have uploaded to be sent in a channels message you can retrieve this as follows
Retrieve media from incoming messages
For media sent to your channel you can download this media from the following endpoint
Last updated
Was this helpful?