Trying to programmatically drop a specific participant from a conference bridge using the Conversations API. We’ve got a Terraform setup that provisions the infrastructure, but the runtime control is handled via direct REST calls from a Node service.
I’m sending a PATCH to /api/v2/conversations/calls/{conversationId} with the following body:
{
"participants": [
{
"participantId": "abc-123",
"action": "disconnect"
}
]
}
The call returns a 409 Conflict with the message “Participant is not in the conversation.” This is weird because I just queried the conversation details and that participantId is definitely listed there with status connected.
I’ve double-checked the token has conversation:call:write scopes. Is there a race condition where the state changes between the GET and the PATCH? Or am I missing a required field in the disconnect action payload? The docs are pretty sparse on conference sub-actions.
Here’s the curl equivalent that fails:
curl -X PATCH "https://api.mypurecloud.com/api/v2/conversations/calls/xyz-456" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"participants": [{"participantId": "abc-123", "action": "disconnect"}]}'
Any ideas on why the ID isn’t recognized?