Update participant state
Perform actions on the participants in a multiparty call to mute, unmute, hold, and unhold.
API Endpoint
POST
https://api.plivo.com/v1/Account/{Auth Id}/MultiPartyCall/name_{mpc_name}/Participant/{all | member_id}/
Arguments
mute boolean
Allowed values: true , false
hold boolean
Allowed values: true , false
coach_mode boolean
Allowed 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 = "<auth_id>" , auth_token = "<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
14
15
require 'rubygems'
require 'plivo'
include Plivo
include Plivo :: Exceptions
api = RestClient . new ( "<auth_id>" , "<auth_token>" )
begin
response = api . multipartycalls . update_participant (
"friendly_name" :"mpc_name" ,
"member_id" :"memberid" ,
"mute" :true )
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e . message
end
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 );
});
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require 'vendor/autoload.php' ;
use Plivo\RestClient ;
use Plivo\Exceptions\PlivoRestException ;
$client = new RestClient ( "<auth_id>" , "<auth_token>" );
try
{
$response = $client
-> multiPartyCalls
-> updateParticipant ( "member_id" , [ "friendly_name" => "mpc_name" , "mute" => true ]);
print_r ( $response );
}
catch ( PlivoRestException $ex )
{
print_r ( $ex );
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.plivo.examples.multipartycall ;
import com.plivo.api.Plivo ;
import com.plivo.api.exceptions.PlivoRestException ;
import com.plivo.api.exceptions.PlivoValidationException ;
import com.plivo.api.models.multipartycall.* ;
import com.plivo.api.util.Utils ;
import java.io.IOException ;
public class UpdateParticipant {
public static void main ( String [] args ) throws IOException , PlivoRestException , PlivoValidationException {
Plivo . init ( "<auth_id>" , "<auth_token>" );
try
{
MultiPartyCallParticipant participant = MultiPartyCall . participantGetter ( MultiPartyCallUtils . friendlyName ( "myMPC" ), "member_id" ). get ();
participant . kick ();
}
catch ( Exception e )
{
e . printStackTrace ();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System ;
using Plivo ;
using Plivo.Exception ;
namespace PlivoExamples
{
class Program
{
static void Main ( string [] args )
{
var api = new PlivoApi ( "<auth_id>" , "<auth_token>" );
try
{
var response = api . MultiPartyCall . UpdateParticipant ( participantId : "member_id" , friendlyName : "mpc_name" )
Console . WriteLine ( response );
}
catch ( PlivoRestException e )
{
Console . WriteLine ( "Exception: " + e . Message );
}
}
}
}
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"mute": true, "hold": true, "coach_mode": true}' \
https://api.plivo.com/v1/Account/{ auth_id} /MultiPartyCall/name_{ mpc_name} /Participant/{ all |member_id} /
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package main
import (
"fmt"
"github.com/plivo/plivo-go/v7"
)
func main () {
client , err := plivo . NewClient ( "<auth_id>" , "<auth_token>" , & plivo . ClientOptions {})
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
var mutePointer = true
response , err := client . MultiPartyCall . UpdateParticipant ( plivo . MultiPartyCallParticipantParams {}, plivo . MultiPartyCallUpdateParticipantParams { Mute : & mutePointer })
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
fmt . Printf ( "Response: %#v \n " , response )
}
Example Request
1
2
3
4
5
6
7
8
9
10
11
12
import plivo
client = plivo . RestClient ( auth_id = "<auth_id>" , auth_token = "<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
14
15
require 'rubygems'
require 'plivo'
include Plivo
include Plivo :: Exceptions
api = RestClient . new ( "<auth_id>" , "<auth_token>" )
begin
response = api . multipartycalls . update_participant (
"friendly_name" :"mpc_name" ,
"member_id" :"memberid" ,
"mute" :true )
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e . message
end
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 );
});
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require 'vendor/autoload.php' ;
use Plivo\RestClient ;
use Plivo\Exceptions\PlivoRestException ;
$client = new RestClient ( "<auth_id>" , "<auth_token>" );
try
{
$response = $client
-> multiPartyCalls
-> updateParticipant ( "member_id" , [ "friendly_name" => "mpc_name" , "mute" => true ]);
print_r ( $response );
}
catch ( PlivoRestException $ex )
{
print_r ( $ex );
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.plivo.examples.multipartycall ;
import com.plivo.api.Plivo ;
import com.plivo.api.exceptions.PlivoRestException ;
import com.plivo.api.exceptions.PlivoValidationException ;
import com.plivo.api.models.multipartycall.* ;
import com.plivo.api.util.Utils ;
import java.io.IOException ;
public class UpdateParticipant {
public static void main ( String [] args ) throws IOException , PlivoRestException , PlivoValidationException {
Plivo . init ( "<auth_id>" , "<auth_token>" );
try
{
MultiPartyCallParticipant participant = MultiPartyCall . participantGetter ( MultiPartyCallUtils . friendlyName ( "myMPC" ), "member_id" ). get ();
participant . kick ();
}
catch ( Exception e )
{
e . printStackTrace ();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System ;
using Plivo ;
using Plivo.Exception ;
namespace PlivoExamples
{
class Program
{
static void Main ( string [] args )
{
var api = new PlivoApi ( "<auth_id>" , "<auth_token>" );
try
{
var response = api . MultiPartyCall . UpdateParticipant ( participantId : "member_id" , friendlyName : "mpc_name" )
Console . WriteLine ( response );
}
catch ( PlivoRestException e )
{
Console . WriteLine ( "Exception: " + e . Message );
}
}
}
}
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"mute": true, "hold": true, "coach_mode": true}' \
https://api.plivo.com/v1/Account/{ auth_id} /MultiPartyCall/name_{ mpc_name} /Participant/{ all |member_id} /
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main
import (
"fmt"
"github.com/plivo/plivo-go/v7"
)
func main () {
client , err := plivo . NewClient ( "<auth_id>" , "<auth_token>" , & plivo . ClientOptions {})
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
var mutePointer = true
response , err := client . MultiPartyCall . UpdateParticipant ( plivo . MultiPartyCallParticipantParams {}, plivo . MultiPartyCallUpdateParticipantParams { Mute : & mutePointer })
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
fmt . Printf ( "Response: %#v \n " , response )
}
🥳 Thank you! It means a lot to us!
Help Us Improve
Thank you so much for rating the page, we would like to get your input
for further improvements!
Thank you for your feedback!