Update participant state

    Perform actions on the participants in a multiparty call to mute, unmute, hold, and unhold.

    API Endpoint

    POSThttps://api.plivo.com/v1/Account/{Auth Id}/MultiPartyCall/name_{mpc_name}/Participant/{all | member_id}/

    Arguments

      
    mute booleanAllowed values: true, false
    hold booleanAllowed values: true, false
    coach_mode booleanAllowed values: true, false
    If coach_mode is false for a supervisor, then a beep:1 will be played on the multiparty call and the supervisor will become audible to all participants, including the customer.

    If coach_mode is updated from false to true for a supervisor, then a beep:1 will be played on the multiparty call and the supervisor will become audible only to agents.

    Updating coach_mode is permitted only when invoking the API on a specific participant’s member ID. Triggering the API on all participants returns a 400 Bad Request error response.

    Returns

    Returns an acknowledgement that the participant’s (member_id) state has been updated in the specific ongoing multiparty call.

    Response

    Success response if all three parameters are passed:

    {
      "api_id": "03042285-45d9-11eb-9014-0242ac110003",
      "coach_mode": "MPC: test_mpc_1 coach_mode enable/disable succeeded",
      "hold": "MPC: test_mpc_1 hold/unhold member(s) succeeded",
      "mute": "MPC: test_mpc_1 mute/unmute member(s) succeeded"
    }
    

    Example Request

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    
    import plivo
    
    client = plivo.RestClient(auth_id="your_auth_id", auth_token="your_auth_token")
    
    response = client.multi_party_calls.update_participant(
                participant_id = member_id,
                uuid = mpc_uuid,
                coach_mode = True,
                mute = True,
                hold = True
            )
    print(response) 
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    
    var plivo = require('plivo');
    
    (function main() {
        'use strict';
    
        var client = new plivo.Client("<auth_id>","<auth_token>");
    
        client.multiPartyCalls.updateParticipant(memberId, uuid = mpc_uuid, friendlyName = mpc_name, { 'coachMode': True, 'mute': True, 'hold': False}).then(function (response) {
            console.log(response);
        }, function (err) {
            console.error(err);
        });
    })();