- CXone Version: 2023.4.2
- SDK: Custom Python HTTP client
- Endpoint:
/api/v2/webmessaging/messages - HTTP Status: 202 Accepted
I am integrating typing indicators and read receipts into our custom web widget. The standard message send works. The status updates fail silently.
Code Snippet:
payload = {
"type": "readReceipt",
"messageId": "msg-12345",
"timestamp": int(time.time() * 1000)
}
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
response = requests.post(f"{base_url}/api/v2/webmessaging/messages", json=payload, headers=headers)
The API returns 202 Accepted. No error body. However, the agent console shows no “Read” status. The typing indicator also disappears immediately after send.
I have verified:
- The
messageIdis valid. - The
conversationIdis included in the URL query params. - The OAuth token has
webmessaging:writescope.
Is there a specific header required for event-driven updates? Or is the type field case-sensitive? The docs are vague on this endpoint’s payload structure for non-text events.
Please provide the exact JSON structure for read receipts.