Skip to content

Get a message

GET
/contact/{identifier}/message/{messageId}
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.

identifier
required
string

Identifier of the contact that can either be a phone number, email or contact ID. Examples: id:123 , email:abdc@gmail.com , phone:+60121233112

messageId
required
integer

1662965880

Media typeapplication/json
object
messageId
required

Unique ID of the message

integer
channelMessageId
string | integer
contactId
required

ID of the contact to which the message was sent.

integer
channelId
required
integer
traffic
required

Defines if the message was received or sent

string
Allowed values: outgoing incoming
message
One of:
Text
object
type
required
string
Allowed values: text
text
required
string
messageTag

Required if the channel is facebook or instagram and the message is being sent outsde the standard 24 hour messaging window. Reference

string
Allowed values: ACCOUNT_UPDATE POST_PURCHASE_UPDATE CONFIRMED_EVENT_UPDATE
status
Any of:
MessageStatus

The delivery statuses of the message

Array<object>
object
value
required
string
Allowed values: pending sent delivered read failed
timestamp
required

Unix timestamp in seconds

integer
message

Reason of the failure.

string
sender
One of:
SenderUser
object
source
string
userId
string
teamId
string
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
}
}
Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 400,
"message": "Validation error."
}
Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 401,
"message": "UN_AUTHORIZED"
}
Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 429,
"message": "Too Many Requests"
}
Retry-After
number
Example
1

Number of seconds until you can retry the request

X-RateLimit-Limit
number
Example
10

Number of request allowed for this end point

X-RateLimit-Remaining
number
Example
5

Number of request remaining for this end point

Media typeapplication/json
object
code
integer
message
string
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."
}
Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 500,
"message": "Unexpected error occurred"
}