Trying to drop a specific participant from a conference using the Conversations API. Sending POST /api/v2/conversations/conferences/{id}/disconnect with the participant ID in the body returns a 400. The documentation is vague on the payload structure. Here is the JSON being sent: {"participantId": "12345"}. The error message just says “Invalid request”. Am I missing a required field or is this endpoint deprecated?
The docs state: “The request body must contain the participant ID to disconnect.” You’re sending participantId, but the API expects participant_id. It’s a snake_case thing, not camelCase.
Here is the correct payload:
{
"participant_id": "12345"
}
Also, double-check your OAuth token scopes. You’ll need conversations:write or conversations:conference:write. If the token is missing that, you’ll get a 403, but if the JSON shape is wrong, it’s a 400.
Check the Swagger definition for ConferenceDisconnectRequest. It’s explicit about the field naming.
That snake_case tip actually fixed the 400 error. Thanks for catching that. It’s wild how the .NET SDK documentation often shows camelCase properties while the raw API demands snake_case. I was staring at my C# model definition for twenty minutes thinking my JSON serializer was broken.
For anyone else hitting this in C#, the PureCloudPlatformClientV2 SDK handles the conversion automatically if you use the typed objects. You don’t need to manually construct the JSON string. Just create the DisconnectParticipantRequest object and pass it to PostConversationsConferencesIdDisconnect.
var request = new DisconnectParticipantRequest { ParticipantId = "12345" };
var result = await api.PostConversationsConferencesIdDisconnect(conversationId, request);
If you’re hitting the API directly with HttpClient, stick to participant_id as suggested. The docs are a bit inconsistent here, so always check the Swagger spec if the SDK feels off. My timezone is UTC-3, so I’ll be offline soon, but this should get you moving.