Mark Messages as Read
PUT {{URL}}/v1/messages/message-id
You can use the
messages
endpoint to change the status of incoming messages to read.
Before You Start
You must set
pass_through
to
false
in the
application settings
.
When
pass_through
is set to
true
, messages are removed from the local database after they are delivered to or read by the recipient. But, when it is set to
false
, incoming messages are saved in local database for 7 days, after which they are deleted if
db_garbagecollector_enable
is set to
true
.
We recommend marking incoming messages as read within 7 days of receipt.
When you set the flag for first time, you must restart the Coreapp to reflect this change.
Step 1: Make
PUT
Request to
/messages
The
message_id
used in this API call is the
id
provided in the inbound notification.
PUT /v1/messages/message-id
{
"status": "read"
}
Request Parameter
Name | Description |
---|---|
status
|
Required
.
Updating
status
to
read
is applicable only for incoming messages.
|
Step 2: Check the API Response
A successful response returns
null
or
{}
.
Request Body
{"status"=>"read"}
HEADERS
| Key | Datatype | Required | Description |
| Content-Type
| string | | |
RESPONSES
status: OK
{"meta":{"api_status":"stable","version":"v2.41.2"}}