Messages
Get Messages
This endpoint gets a message.
GET
/v1/messages/:id
Bearer*
Body
id
string
This is the id of the message.
Response
id
string
This is the id of the message.
body
string
This is the body of the message.
created_at
datetime
This is the date and time when the message was created.
date
date
This is the date when the message was sent.
deliveredReceipt
boolean
This indicates if the message has been delivered.
from
string
This is the sender of the message.
fromMe
boolean
This indicates if the message was sent by the user.
is_public
boolean
This indicates if the message is public or private.
messageNumber
integer
This is the unique number assigned to the message.
sentReceipt
boolean
This indicates if the message has been sent.
time
time
This is the time when the message was sent.
timestamp
datetime
This is the timestamp of the message.
to
string
This is the recipient of the message.
user_id
string
This is the unique identifier for the user associated with the message.
username
string
This is the username of the user associated with the message.
curl --location --request GET 'https://api.stateset.com/v1/messages/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
}'
{
"data": {
"message": {
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"body": "Hello World",
"created_at": "2021-01-01T00:00:00.000000Z",
"date": "2021-01-01",
"deliveredReceipt": true,
"from": "user1",
"fromMe": true,
"is_public": true,
"messageNumber": 1,
"sentReceipt": true,
"time": "00:00:00",
"timestamp": "2021-01-01T00:00:00.000000Z",
"to": "user2",
"user_id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"username": "user1"
}
}
}
Messages
Field | Type | Description |
---|---|---|
id | String | Unique identifier for the message |
body | String | The content or text of the message |
created_at | DateTime | The date and time when the message was created |
date | Date | The date when the message was sent |
deliveredReceipt | Boolean | Indicates if the message has been delivered |
from | String | Sender of the message |
fromMe | Boolean | Indicates if the message was sent by the user |
is_public | Boolean | Indicates if the message is public or private |
messageNumber | Integer | Unique number assigned to the message |
sentReceipt | Boolean | Indicates if the message has been sent |
time | Time | The time when the message was sent |
timestamp | DateTime | The timestamp of the message |
to | String | Recipient of the message |
user_id | String | Unique identifier for the user associated with the message |
username | String | Username of the user associated with the message |
curl --location --request GET 'https://api.stateset.com/v1/messages/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
}'
{
"data": {
"message": {
"id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"body": "Hello World",
"created_at": "2021-01-01T00:00:00.000000Z",
"date": "2021-01-01",
"deliveredReceipt": true,
"from": "user1",
"fromMe": true,
"is_public": true,
"messageNumber": 1,
"sentReceipt": true,
"time": "00:00:00",
"timestamp": "2021-01-01T00:00:00.000000Z",
"to": "user2",
"user_id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
"username": "user1"
}
}
}