Get a message
const url = 'https://api.aelyst.ai/v1/contact/example/message/1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.aelyst.ai/v1/contact/example/message/1 \ --header 'Authorization: Bearer <token>'Retrieves a message based on the message ID. You can get the message ID that was returned upon sending through Send a message endpoint.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Identifier of the contact that can either be a phone number, email or contact ID. Examples: id:123 , email:abdc@gmail.com , phone:+60121233112
1662965880
Responses
Section titled “Responses”object
Unique ID of the message
ID of the contact to which the message was sent.
Defines if the message was received or sent
object
Required if the channel is facebook or instagram and the message is being sent outsde the standard 24 hour messaging window. Reference
object
object
Attachments must be hosted on a publicly accessible platform and provided as a URL in the API request. Direct links to files that are not hosted properly may result in delivery issues, even if the API response is successful. Use reputable hosting services like Amazon S3, Google Cloud Storage, or Dropbox. Ensure the URL is publicly accessible and formatted correctly in the payload.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Refer to the channel documentation for the payload.
object
The delivery statuses of the message
object
Unix timestamp in seconds
Reason of the failure.
object
object
object
object
object
object
Example
{ "messageId": 1262965213, "channelMessageId": 123, "contactId": 123, "channelId": 123, "traffic": "outgoing", "message": { "type": "text", "text": "Message text", "messageTag": "ACCOUNT_UPDATE" }, "status": [ { "value": "pending", "timestamp": 1662965213, "message": "Failed reason" } ], "sender": { "source": "user", "userId": 123456789, "teamId": 123456789 }}object
Example
{ "code": 400, "message": "Validation error."}object
Example
{ "code": 401, "message": "UN_AUTHORIZED"}object
Example
{ "code": 429, "message": "Too Many Requests"}Headers
Section titled “Headers”Example
1Number of seconds until you can retry the request
Example
10Number of request allowed for this end point
Example
5Number of request remaining for this end point
object
Example
{ "code": 449, "message": "Your request cannot be processed at the moment as it is currently in queue. Please try again in a few minutes."}object
Example
{ "code": 500, "message": "Unexpected error occurred"}