We are building an orchestration layer that needs to programmatically eject a specific user from an active conference call when certain compliance flags are triggered. The current approach involves using the Genesys Cloud Conversations API to manage participant states.
The initial thought was to use the DELETE /api/v2/conversations/conferences/{conferenceId}/participants/{participantId} endpoint. We’ve successfully retrieved the conference ID and the target participant ID from the active conversation object. However, when executing the request, we receive a 405 Method Not Allowed response. The documentation for the Conversations API is somewhat sparse on explicit removal actions for conferences, often pointing towards the general conversation update methods.
We attempted to use the POST /api/v2/conversations/conferences/{conferenceId}/participants endpoint with a REMOVE action in the body, but that also resulted in a 400 Bad Request because the payload structure did not match the expected ParticipantActionRequest. The JSON we tried was:
{
"actions": [
{
"participantId": "abc-123-def",
"action": "REMOVE"
}
]
}
The error message returned was: Invalid action type 'REMOVE' for participant action. The valid actions listed in the schema seem to be ADD, REMOVE_FROM_QUEUE, and TRANSFER. This is confusing because removing a participant is a distinct action from removing them from a queue.
Here is our current environment setup:
- Region: EU (api.eu.genesys.cloud)
- API Version: v2
- Auth: OAuth Bearer Token with
admin:conversation:writescope - Client: Python
genesyscloudSDK v2.0
We have verified that the token has the correct permissions by successfully updating other conversation attributes. The issue appears to be specific to the participant removal logic within a conference context. Is there a specific endpoint or payload structure that correctly handles this? We need to avoid a full conversation disconnect and only target the flagged user.
Any insights on the correct API path or payload for this specific operation would be appreciated. We are stuck on the participant action enumeration.