Why does the PATCH endpoint for participant attributes keeps rejecting the payload with a 400 Bad Request? we’ve got a ServiceNow script that triggers on incident status changes, meant to push a custom attribute back into the active voice conversation. The webhook payload gives us the right conversationId and participantId, and the client_credentials token exchange is working fine.
Environment:
- Genesys Cloud org: us-east-1
- ServiceNow: Washington DC release
- Auth method: client_credentials with custom scope
- API version: /api/v2/
Firing this from the SN script include using GlideRestMessage:
PATCH https://api.mypurecloud.com/api/v2/conversations/voice/participants/{participantId}
Body:
{
“attributes”: {
“custom”: {
“snow.incident.priority”: “2”
}
}
}
getting back a 400 with “The request body could not be parsed as JSON.” weird, right? the content-type header is set to application/json. tried flattening the object to just a string value, same result. swagger docs mention a map structure for participant attributes, but the schema for custom data isn’t really clear. maybe it needs a specific wrapper?
token rotation handled itself just fine. script runs, hits the endpoint, fails. looked at the conversation events log and the participant state is definitely active. not sure if the patch body shape changed recently or if the custom attribute namespace needs to be registered first