I’m trying to update a participant attribute mid-conversation using the Genesys Cloud REST API. Specifically, I want to set a custom attribute called priority_level to high for the customer side of a web chat session. I have the conversationId and the participantId from the initial connection event.
I’m sending a PATCH request to /api/v2/conversations/web/chat/participants/{participantId} with the following JSON body:
{
"attributes": {
"priority_level": "high"
}
}
The request returns a 400 Bad Request. The error message says Invalid attribute type. I’ve checked the documentation and it seems like you can update attributes this way, but maybe I’m missing a specific format or the attribute needs to be pre-defined somewhere in the routing configuration? I’m using a service account with conversation:webchat:write scope.
I’ve also tried including the id and name fields in the payload, but that didn’t change anything. Is there a specific way the attributes object needs to be structured? Or do I need to use a different endpoint entirely for mid-conversation updates?