Guest API 400 on typing indicator payload for tracing instrumentation

We’re wiring up an OpenTelemetry instrumented gateway to simulate guest behavior for end-to-end latency tracing. The goal is to capture the exact network hop time between a client sending a typing indicator and the Genesys Cloud backend acknowledging it via the EventStream.

I’m using the Guest API to programmatically trigger these events so we can correlate the trace span with the conversation ID. The message posting works fine, but the typing indicator endpoint keeps rejecting the payload.

Here’s the Python snippet using requests:

import requests
import json

token = "<valid_access_token>"
headers = {
 "Authorization": f"Bearer {token}",
 "Content-Type": "application/json"
}

# This works
# requests.post(f"{base_url}/api/v2/conversations/messaging/{conv_id}/messages", ...)

# This fails
payload = {
 "type": "typing",
 "guestId": "guest-12345"
}

r = requests.post(
 f"{base_url}/api/v2/conversations/messaging/{conv_id}/typing",
 headers=headers,
 data=json.dumps(payload)
)

print(r.status_code) # Returns 400
print(r.text)

The error response is minimal:

{
 "message": "Invalid request body",
 "code": "bad.request"
}

The documentation for the Guest API mentions typing indicators but doesn’t explicitly show the required JSON schema for the POST body. I’ve tried omitting guestId, adding a timestamp field, and changing type to typing-indicator. Nothing sticks.

Is there a specific wrapper object required? Or is this endpoint actually not meant for programmatic triggers in the way I’m using it for tracing?

The typing indicator endpoint is strict about the payload structure. It expects state to be explicitly set to typing. If you omit it or send an empty object, the API throws a 400.

{
 "state": "typing"
}

Check your request body. It’s likely missing that key.