Mark Messages as Read
Mark all messages in a session as read. Works for both stores and admins.
Endpoint
Authentication
Required: Admin or Store authentication token
Request Body
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
session_id |
integer | Yes | ID of the session to mark messages as read |
Response
Success (200 OK)
Error Responses
Missing Session ID (400)
Session Not Found (404)
Forbidden (403)
or
Unauthorized (401)
Example Request
curl -X POST "https://api.luxmart.site/v1/chat/message/read/" \
-H "Authorization: Token your_token" \
-H "Content-Type: application/json" \
-d '{
"session_id": 1
}'
Notes
- For Stores: Can only mark messages as read in their own sessions
- For Admins: Can only mark messages as read in sessions assigned to them
- Marks all messages in the session as read (updates message status)
- Sends WebSocket event to notify the other party that messages were read
- Message read status is used to show read receipts in the chat interface