Conversations API: Removing a specific participant from a conference call

I’m trying to programmatically disconnect a specific participant from an active conference call using the Genesys Cloud Conversations API. The goal is to let an agent kick a participant without ending the entire conference.

I’ve been looking at the DELETE /api/v2/conversations/conferences/{conferenceId}/participants/{participantId} endpoint. My code looks something like this:

await client.conversationsApi.deleteConferenceParticipant(conferenceId, participantId);

The issue is that participantId usually refers to the internal ID generated by Genesys, not the user ID or external ID I have in my app. I’m currently fetching the participant list via GET /api/v2/conversations/conferences/{conferenceId}/participants to map the external ID to the internal id field, but this feels like a race condition waiting to happen. If the list updates between my GET and DELETE, I might drop the wrong person or hit a 404.

Is there a way to pass an external ID directly in the DELETE call? Or is there a more reliable pattern for this? I’ve seen some mentions of using the routingId but that seems tied to the initial invitation, not the active session.

Also, the docs are light on error handling for this specific endpoint. What happens if the participant has already left? I’m seeing inconsistent 404s vs 409s in my logs.