Getting a 404 when trying to drop a specific agent from a conference call via the API. The conversation is active, the participant ID looks correct, but the endpoint claims it doesn’t exist.
We’re using this to trigger cleanup spans in our OpenTelemetry pipeline. The flow is:
- Get conversation details via
GET /api/v2/conversations/calls. - Extract the participant ID for the agent we want to remove.
- Call the disconnect endpoint.
Here’s the participant object from the GET response:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Agent Smith",
"state": "connected",
"direction": "inbound"
}
And the PATCH request:
PATCH /api/v2/conversations/calls/conv-123/participants/a1b2c3d4-e5f6-7890-abcd-ef1234567890/communications/comm-456
Authorization: Bearer <token>
Content-Type: application/json
{
"state": "disconnected"
}
Response:
{
"code": "notFound",
"message": "Communication comm-456 not found in participant a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": 404
}
I’ve verified the token has conversation:write scope. The participant is definitely in the call. I see this issue sometimes when the state changes rapidly between the GET and PATCH. Is there a race condition here? Or do I need to use a different endpoint for conference bridges specifically?
Our OTel context injection fails if the disconnect call throws, so we need a reliable way to handle this.