Guest API typing indicator returning 400

Need some help troubleshooting the typing indicator payload for the guest messaging API.

Problem
We’ve been pushing this to /api/v2/webmessaging/guest/conversations/{id}/messages but keep hitting a 400.

Code
{ "type": "typingIndicator", "direction": "guest_to_agent" }

Error
Response complains about missing text. i’m not sure if we need to wrap it differently. checked the Genesys Docs already. what am i missing here

The problem here is text isn’t optional for that endpoint. Send "text": "" and set type to text instead of typingIndicator. GC doesn’t support raw typing events over the guest REST API.

The documentation actually says the guest endpoint rejects pure typing events, so you’ll need to send a dummy text message instead.

{ "type": "text", "text": "" }

works for most clients, though it might trigger a notification. containment drops if users get pinged for every keystroke anyway.

If I remember correctly, the guest REST endpoint is pretty strict about payload structure. i’ve run into this exact issue when building webhook ingestion middleware in Rails. the typingIndicator type is effectively a no-op for the guest API.

you’re better off sending a text message with an empty string. it’s a bit hacky, but it works. here’s how i handle it in my Faraday client wrapper:

def send_typing_indicator(conversation_id)
 payload = {
 type: 'text',
 text: ''
 }

 conn.post("/api/v2/webmessaging/guest/conversations/#{conversation_id}/messages", payload)
end

just make sure your Authorization header is valid. also, be careful with rate limits if you’re firing this on every keystroke. i usually debounce it on the frontend before hitting the API. otherwise, you’ll get throttled or trigger unnecessary notifications.

it’s not ideal, but it’s the only way to get the UI to show “typing…” without breaking the contract.

are you using the standard webchat widget or a custom react implementation? i’ve seen this 400 error pop up when the client sends the typing event before the session token is fully bound.

if it’s a custom build, the guest API is indeed strict. sending an empty text message works, but it clutters the transcript. a cleaner approach for admin_ui integrations is to use the typing status update via the websocket if available, rather than REST.

for the REST fallback, ensure your JSON includes the text field as an empty string and change the type. here is the exact payload that stops the 400:

{
 "type": "text",
 "text": "",
 "from": {
 "id": "guest-id-here"
 }
}

you’ll need to make sure your service account has the webmessaging:conversation:write scope. also, check if your queue settings are filtering empty messages. sometimes the routing engine drops them before they hit the agent, which defeats the purpose. i usually add a single space " " if the system rejects pure empty strings.