Hey everyone.
I’m trying to write a script that drops a specific participant from an active conference call using the Genesys Cloud Conversations API. The goal is to keep the rest of the call going while kicking out one user who’s causing issues or has finished their part.
I’ve been reading the docs and it seems like I need to use the PATCH endpoint for conferences. I’m sending a JSON body with the actions array containing a remove action for the specific participant ID.
Here is the cURL command I’m testing with:
curl -X PATCH "https://api.us.genesyscloud.com/api/v2/conversations/conferences/1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6" \
-H "Authorization: Bearer <my_token>" \
-H "Content-Type: application/json" \
-d '{
"actions": [
{
"id": "participant-xyz-123",
"action": "remove"
}
]
}'
The problem is I keep getting a 400 Bad Request error back. The response body just says:
{
"errors": [
"Invalid request body"
]
}
I’ve double checked the participant ID. It’s definitely part of that conference. I can see it in the GET response for the same conference ID. I’ve also tried changing the casing of remove to Remove or REMOVE but that didn’t help either.
Is there a specific format I’m missing? Or maybe I need to include more details in the action object? The docs are pretty sparse on exact JSON examples for this specific action.
Any pointers would be appreciated. I’m stuck on this one.