POST /participants/{id}/disconnect returns 409 Conflict on conference call

We are building a Terraform module to automate the cleanup of stale conference call participants in Genesys Cloud. The logic is straightforward: iterate through active conferences, identify participants matching specific criteria, and remove them. However, the API call to disconnect a participant is failing with a 409 Conflict status code.

The endpoint used is POST /api/v2/conversations/voice/participants/{participantId}/disconnect. Here is the JSON payload sent in the request body:

{
 "reason": "agent_cleared",
 "play_tone": false
}

The error response from Genesys Cloud is as follows:

{
 "errors": [
 {
 "code": "conflict",
 "message": "Participant cannot be disconnected because the call is in a terminal state or the participant has already left."
 }
 ]
}

We have verified the participant ID against the current conference state via GET /conversations/voice/conferences/{conferenceId}. The participant status shows as active in the snapshot we retrieved immediately prior to the disconnect attempt. The delay between the GET and the POST is less than 200 milliseconds. We suspect this might be a race condition or an issue with the conference lock state, but we are unsure how to handle the conflict programmatically within our Terraform provider wrapper.

Is there a specific header required for this operation, or should we implement a retry mechanism with exponential backoff? We have tried setting the If-Match header to the conference ETag, but that resulted in a 412 Precondition Failed instead. The goal is to ensure the participant is removed without throwing an error in the state management logic.