Read Chat Messages
Endpoint
GET {base_url}/api/v1/whatsapp/read_chat_messages
Authentication
This API requires authentication using the auth:api middleware. The request must include a Bearer Token for authorization.
Description
This API is used to mark all unread messages in a specific WhatsApp chat as read. It also updates the message acknowledgment status (ack) to "read" for messages received from the contact.
Request
- Query Parameters:
- `whatsapp_chat_id` (required, string): The ID of the WhatsApp chat for which the messages are to be retrieved.
Response
The response is in JSON format and follows the schema below:
{
"message": "ok"
}
Error Handling
If the chat ID is invalid or the request fails, the API may return an error message.
Possible Errors
- 404 Not Found: The provided whatsapp_chat_id does not exist.
- 401 Unauthorized: Missing or invalid authentication token.
- 500 Internal Server Error: Unexpected server error.