We’re trying to push dynamic customer data into a live voice call from an external node service. The goal is to update the participant attributes so downstream Architect flows can read them. We’ve got the conversation ID and participant ID from the conversation:voice:participant:created webhook event.
We’re using the JavaScript SDK to hit the endpoint:
PATCH /api/v2/conversations/voice/participants/{participantId}
The request body looks like this:
{
"attributes": {
"loyaltyTier": "gold",
"lastPurchaseDate": "2023-10-27"
}
}
We get a 200 OK response, which is promising. But when we check the participant object in the admin console or via a subsequent GET request, the attributes aren’t there. The webhook logs show the initial created event with empty attributes, but we never see a updated event for the participant.
We’ve tried adding "type": "participant" to the root, but that just returns a 400 Bad Request saying the type is invalid for a voice participant. The docs are vague on whether attributes are mutable on a live leg or if they’re locked after the call starts. Has anyone successfully patched these mid-call? Is there a specific schema requirement we’re missing?