Endpoint #
PUT /wp-json/rtcl/v1/my/chat/check
Description #
Marks a specific message as read in a conversation.
Authentication & Permission #
This endpoint is protected and requires:
- REST API enabled (
allow_rest_api) - Valid API Key
- Valid JWT/Bearer authentication
Required Headers #
| Header | Value |
|---|---|
| Authorization | Bearer YOUR_JWT_TOKEN |
| X-API-KEY | YOUR_API_KEY |
| Content-Type | application/json |
Request Parameters #
| Parameter | Type | Required | Description |
|---|---|---|---|
| con_id | integer | ✅ Yes | Conversation ID |
| message_id | integer | ✅ Yes | Message ID |
cURL Example (Mark as Read) #
curl -X PUT "https://demo-site.com/wp-json/rtcl/v1/my/chat/message" \
-H "Authorization: Bearer DEMO_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"con_id": 101,
"message_id": 9001
}'
Demo Success Response #
1
1means the message was successfully marked as read.
Error Response #
No Permission ( 403 ) #
{
"code": "FORBIDDEN",
"message": "You are not permitted to access this conversation.",
"data": {
"status": 403
}
}
Not Logged In (403) #
{
"code": "FORBIDDEN",
"message": "You are not logged in.",
"data": {
"status": 403,
"temp_id": ""
}
}
REST API Disabled (403) #
{
"code": "DENIED_REST_API",
"message": "Denied api call"
}
Missing / Invalid Authentication (401) #
{
"status": "error",
"error": "INVALID_API_KEY",
"code": "401",
"error_message": "Invalid API key or authorization token."
}
Missing Authorization Header #
{
"status": "error",
"error": "MISSING_AUTHORIZATION_HEADER",
"code": "401",
"error_message": "Authorization header not received. Either authorization header was not sent or it was removed by your server due to security reasons."
}
Invalid Authorization Token Type #
{
"status": "error",
"error": "INVALID_AUTHORIZATION_HEADER_TOKEN_TYPE",
"code": "401",
"error_message": "Authorization header must be type of Bearer Token."
}
Invalid JWT Format (Segment Fault) #
{
"status": "error",
"error": "SEGMENT_FAULT",
"code": "401",
"error_message": "Incorrect JWT Format."
}
Invalid JWT Signature #
{
"status": "error",
"error": "INVALID_TOKEN",
"code": "401",
"error_message": "JWT signature verification failed."
}