Read and typing indicators
Last update: 6 hours ago by Irais Aguirre
The read and typing indicators service marks received messages as read and shows the "typing…" indicator in a conversation.
Integration summary
- Endpoint:
POST https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging/status- Token: messaging token, in the
Authorization: Bearer {{wa-msg-api-token}}header (how to generate it)- Response: see the Response section on this page
The read and typing indicators service lets you:
- Mark a received message as read, using the
message.idvalue received in the webhook (see Receiving notifications). Earlier messages are also marked as read. - Show the "typing..." indicator in the conversation, so the user knows their message is being handled.
Mark as read
Request
| URL | https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging/status |
| Method | POST |
| Type | application/json |
Headers
| Name | Description | Type | Requirements |
|---|---|---|---|
| Content-Type | application/json | String | Required |
| Authorization | Messaging token in the format Bearer {token} (with one space). See Generate authentication token. | String | Required |
| Accept | application/json | String | Optional |
Body
Fields for Mark as read:
| Name | Description | Type | Requirements |
|---|---|---|---|
| from | Business phone number (including country code) that sends the request. | String | Required. |
| messageId | ID of the message to mark as read. Earlier messages are also marked as read. | String |
|
| typingIndicator | Whether to show the "typing..." indicator. The indicator is shown for 25 seconds after the request is sent, and you can use it as many times as you need. Any value other than true/false is rejected with code 1009 "Parameter value is not valid". | String |
|
Example
Complete Mark as read example (HTTP request and JSON body):
Mark as read with typing indicator
curl -X POST 'https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging/status' \-H 'Accept: application/json' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'Content-Type: application/json' \-d '{"from": "5215500000001","messageId": "wamid.HBgTTVguM…TVEODhERDAwMDYxMTdEQ0MA","typingIndicator": true}'
Body:
{"from": "5215500000001","messageId": "wamid.HBgTTVguM…TVEODhERDAwMDYxMTdEQ0MA","typingIndicator": true}
Response
Mark as read response:
| Name | Description | Type |
|---|---|---|
| success | Indicates that the request was processed successfully. | Boolean |
| code | Response code if an error occurs. For more details, see Error codes | Number |
| detail | Description of the response code received. | String |
Success response example
{"success": true}
Error response example
{"code": 3010,"detail": "Invalid From Phone number"}
