trying to get typing indicators and read receipts working via the Guest API. the docs say to POST to /api/v2/webmessaging/guests/{guestId}/interactions/{interactionId}/messages, but the payload structure for these meta-events isn’t super clear.
here’s what i’m sending for a typing event:
{
"content": "",
"type": "typing",
"metadata": {
"source": "guest"
}
}
the request returns a 200 OK. the message object comes back with an id and timestamp. but on the agent desktop, nothing happens. no typing bubble. no notification. if i send a normal text message right after, the agent sees the text, but the typing indicator from before is gone.
i’ve checked the interaction logs. the message is recorded as type: "typing". so the platform is receiving it. why isn’t the UI reacting? is there a specific status field i need to set? or maybe a rate limit on these meta-messages? we’re hitting the endpoint every 500ms while the user is typing. feels like we’re spamming it, but the API isn’t complaining.
also, for read receipts, i’m trying to POST a read type message. same issue. 200 OK, but the agent doesn’t see the “read” checkmarks update.
await fetch(`${BASE_URL}/guests/${guestId}/interactions/${interactionId}/messages`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'read',
content: '',
metadata: { source: 'guest' }
})
});
is this supported via the REST API? or do i need to use the WebSocket connection for these real-time UI updates? the docs are vague on whether the REST API triggers the same UI events as the native widget.