Skip to main content
POST
/
calls
/
{call_control_id}
/
actions
/
switch_supervisor_role
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.calls.actions.switchSupervisorRole('call_control_id', { role: 'barge' });

console.log(response.data);
{
  "data": {
    "result": "ok"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

call_control_id
string
required

Unique identifier and token for controlling the call

Body

application/json

Switch supervisor role request

role
enum<string>
required

The supervisor role to switch to. 'barge' allows speaking to both parties, 'whisper' allows speaking to caller only, 'monitor' allows listening only.

Available options:
barge,
whisper,
monitor
Example:

"barge"

Response

Successful response upon making a call control command.

data
Call Control Command Result · object
Example:
{ "result": "ok" }