Trying to programmatically disconnect a specific participant from a conference call using the Conversations API. I’ve got the OAuth token sorted, and I can list the participants fine via GET /api/v2/conversations/{conversationId}/participants.
The issue is when I try to remove one. The docs say to use PATCH with a disconnect action, but I’m hitting a 400 every time. I’ve tried a few variations of the payload, but nothing sticks.
Here’s the current request:
PATCH /api/v2/conversations/{conversationId}/participants
Content-Type: application/json
Authorization: Bearer {token}
{
"participants": [
{
"id": "participant-id-123",
"action": "disconnect"
}
]
}
The response is just:
{
"code": "bad.request",
"message": "Request body is invalid",
"status": "Bad Request"
}
No details on what’s invalid. I’ve checked the participant ID against the GET response, and it matches exactly. I’ve also tried including the routingData or mediaType fields, thinking maybe it’s required for the PATCH, but that just makes it worse.
Is the action field supposed to be inside an actions array instead? Or is there a specific structure for the participant object when disconnecting? The SDK examples are sparse on this one.