Mark Inbound Messages as Read
This API marks inbound messages as read.
You can mark a single message by its ID, or mark every message received before a given date.
Endpoint
POST https://api.cellcast.com/api/v1/apiClient/inboundRead
Parameters for Mark Inbound Messages as Read
Headers Parameters
| Parameters | Description |
|---|---|
| Authorization | Please add provided Bearer token - linked to your Cellcast account. Check here |
| Content-Type | application/json |
Body Parameters
Send one of the following parameters. If you send both, only messageId is used.
| Parameters | Type | Description |
|---|---|---|
| messageId | string | The ID of a single inbound message to mark as read. Use the message_id value returned by Get List Responses. |
| dateBefore | string | A date in ISO 8601 format, e.g. 2024-08-20T00:00:00Z. Marks every inbound message received before this date as read. Messages received at exactly this time are not included. |
Code Samples
POST https://api.cellcast.com/api/v1/apiClient/inboundRead
bash
curl --location 'https://api.cellcast.com/api/v1/apiClient/inboundRead' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API_KEY}}' \
--data '{
"messageId": "6822bc4ed000000000000000"
}'bash
curl --location 'https://api.cellcast.com/api/v1/apiClient/inboundRead' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API_KEY}}' \
--data '{
"dateBefore": "2024-08-20T00:00:00Z"
}'Replace with the actual API key that you own.
Responses
200 Success
json
{
"app_type": "web",
"app_version": "1.0",
"maintainence": 0,
"new_version": 0,
"force_update": 0,
"invalid_token": 0,
"refresh_token": "",
"show_message": 0,
"is_enc": false,
"status": true,
"message": "Inbound messages have been marked as read.",
"message_type": "toast",
"data": [],
"error": {}
}Note
The API returns this success response even if no message matches the messageId you sent, or if no messages were received before dateBefore. To confirm a message was marked as read, call Get List Responses and check that it no longer appears.
400 Bad Request
Returned when neither messageId nor dateBefore is sent.
json
{
"app_type": "web",
"app_version": "1.0",
"maintainence": 0,
"new_version": 0,
"force_update": 0,
"invalid_token": 0,
"refresh_token": "",
"show_message": 0,
"is_enc": false,
"status": true,
"message": "Bad Request!",
"message_type": "toast",
"data": [],
"error": {}
}401 Unauthorized
json
{
"code": 401,
"message": "Token expired",
"stack": "APIError: Token expired ...."
}