How do I correctly patch participant attributes on an active voice interaction without triggering a 400 error?
We’re trying to push our OpenTelemetry trace_id into the Genesys Cloud participant attributes mid-call. The goal is to correlate the downstream Data Action calls with the initial conversation start event. I’m using the Python requests library to hit the PATCH /api/v2/conversations/interactions/{id} endpoint.
Here’s the payload structure I’m sending:
{
"participants": [
{
"id": "<participant_uuid>",
"attributes": {
"trace_id": "0af7651916cd43dd8448eb211c80319c",
"span_id": "b7ad6b7169203331"
}
}
]
}
The request returns a 400 Bad Request with the message: Invalid request body: participants[0].attributes is not allowed. I’ve checked the Swagger docs and the schema seems to allow arbitrary key-value pairs in the attributes object. I’m using the standard bearer token auth generated via Client Credentials.
I’ve tried wrapping the attributes in a custom object like "custom": {"trace_id": "..."} but that just gets ignored silently. The interaction ID is valid, and I can fetch the current participant state with a GET request without issues. Is there a specific naming convention or prefix required for custom attributes during a PATCH operation? Or is this endpoint strictly read-only for custom attributes once the interaction is active?
Running this from Manila, so timezone shouldn’t be an issue. Just need to get this trace context flowing.