logo
enes

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.id value 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

URLhttps://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging/status
MethodPOST
Typeapplication/json

Headers

NameDescriptionTypeRequirements
Content-Typeapplication/jsonStringRequired
AuthorizationMessaging token in the format Bearer {token} (with one space). See Generate authentication token.StringRequired
Acceptapplication/jsonStringOptional

Body

Fields for Mark as read:

NameDescriptionTypeRequirements
fromBusiness phone number (including country code) that sends the request.StringRequired.
messageIdID of the message to mark as read. Earlier messages are also marked as read.String
  • Required.
  • The message must have been received within the last 30 days.
typingIndicatorWhether 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
  • Optional.
  • Default: false.

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:

NameDescriptionType
successIndicates that the request was processed successfully.Boolean
codeResponse code if an error occurs. For more details, see Error codesNumber
detailDescription of the response code received.String

Success response example

{
"success": true
}

Error response example

{
"code": 3010,
"detail": "Invalid From Phone number"
}
Previous
Group messages
Next
File download