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",
}'
query MyMessages {
message {
id
body
created_at
date
deliveredReceipt
from
fromMe
is_public
messageNumber
sentReceipt
time
timestamp
to
user_id
username
}
}
const messages = await stateset.messages.retrieve({
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
});
messages = stateset.messages.retrieve({
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
})
messages, err := stateset.Messages.Retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
)
messages = Stateset::Messages.retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
)
Message messages = Stateset.Messages.retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
Message messages = Stateset.Messages.Retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
$messages = Stateset\Messages::retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
GET /v1/messages HTTP/1.1
Host: api.stateset.com
Content-Type: application/json
{
"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"
}
}
}
Get Messages
This endpoint gets a message.
GET
/
v1
/
messages
/
:id
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",
}'
query MyMessages {
message {
id
body
created_at
date
deliveredReceipt
from
fromMe
is_public
messageNumber
sentReceipt
time
timestamp
to
user_id
username
}
}
const messages = await stateset.messages.retrieve({
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
});
messages = stateset.messages.retrieve({
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
})
messages, err := stateset.Messages.Retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
)
messages = Stateset::Messages.retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
)
Message messages = Stateset.Messages.retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
Message messages = Stateset.Messages.Retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
$messages = Stateset\Messages::retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
GET /v1/messages HTTP/1.1
Host: api.stateset.com
Content-Type: application/json
{
"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"
}
}
}
Body
string
This is the id of the message.
Response
string
This is the id of the message.
string
This is the body of the message.
datetime
This is the date and time when the message was created.
date
This is the date when the message was sent.
boolean
This indicates if the message has been delivered.
string
This is the sender of the message.
boolean
This indicates if the message was sent by the user.
boolean
This indicates if the message is public or private.
integer
This is the unique number assigned to the message.
boolean
This indicates if the message has been sent.
time
This is the time when the message was sent.
datetime
This is the timestamp of the message.
string
This is the recipient of the message.
string
This is the unique identifier for the user associated with the message.
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",
}'
query MyMessages {
message {
id
body
created_at
date
deliveredReceipt
from
fromMe
is_public
messageNumber
sentReceipt
time
timestamp
to
user_id
username
}
}
const messages = await stateset.messages.retrieve({
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
});
messages = stateset.messages.retrieve({
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
})
messages, err := stateset.Messages.Retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
)
messages = Stateset::Messages.retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
)
Message messages = Stateset.Messages.retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
Message messages = Stateset.Messages.Retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
$messages = Stateset\Messages::retrieve(
'rt_1NXWPnCo6bFb1KQto6C8OWvE'
);
GET /v1/messages HTTP/1.1
Host: api.stateset.com
Content-Type: application/json
{
"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 |
โI