Leave a conference
Removes a call leg from a conference and moves it back to parked state.
Expected Webhooks:
conference.participant.left
POST
/
conferences
/
{id}
/
actions
/
leave
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.conferences.actions.leave('id', {
call_control_id: 'c46e06d7-b78f-4b13-96b6-c576af9640ff',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.conferences.actions.leave(
id="id",
call_control_id="c46e06d7-b78f-4b13-96b6-c576af9640ff",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Conferences.Actions.Leave(
context.TODO(),
"id",
telnyx.ConferenceActionLeaveParams{
CallControlID: "c46e06d7-b78f-4b13-96b6-c576af9640ff",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.conferences.actions.ActionLeaveParams;
import com.telnyx.sdk.models.conferences.actions.ActionLeaveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionLeaveParams params = ActionLeaveParams.builder()
.id("id")
.callControlId("c46e06d7-b78f-4b13-96b6-c576af9640ff")
.build();
ActionLeaveResponse response = client.conferences().actions().leave(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.conferences.actions.leave("id", call_control_id: "c46e06d7-b78f-4b13-96b6-c576af9640ff")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->conferences->actions->leave(
'id',
callControlID: 'c46e06d7-b78f-4b13-96b6-c576af9640ff',
beepEnabled: 'never',
commandID: '891510ac-f3e4-11e8-af5b-de00688a4901',
region: 'US',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx conferences:actions leave \
--api-key 'My API Key' \
--id id \
--call-control-id c46e06d7-b78f-4b13-96b6-c576af9640ffcurl --request POST \
--url https://api.telnyx.com/v2/conferences/{id}/actions/leave \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"call_control_id": "c46e06d7-b78f-4b13-96b6-c576af9640ff",
"beep_enabled": "never"
}
'{
"data": {
"result": "ok"
}
}Authorizations
Body
application/json
Leave Conference request object
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.conferences.actions.leave('id', {
call_control_id: 'c46e06d7-b78f-4b13-96b6-c576af9640ff',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.conferences.actions.leave(
id="id",
call_control_id="c46e06d7-b78f-4b13-96b6-c576af9640ff",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Conferences.Actions.Leave(
context.TODO(),
"id",
telnyx.ConferenceActionLeaveParams{
CallControlID: "c46e06d7-b78f-4b13-96b6-c576af9640ff",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.conferences.actions.ActionLeaveParams;
import com.telnyx.sdk.models.conferences.actions.ActionLeaveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionLeaveParams params = ActionLeaveParams.builder()
.id("id")
.callControlId("c46e06d7-b78f-4b13-96b6-c576af9640ff")
.build();
ActionLeaveResponse response = client.conferences().actions().leave(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.conferences.actions.leave("id", call_control_id: "c46e06d7-b78f-4b13-96b6-c576af9640ff")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->conferences->actions->leave(
'id',
callControlID: 'c46e06d7-b78f-4b13-96b6-c576af9640ff',
beepEnabled: 'never',
commandID: '891510ac-f3e4-11e8-af5b-de00688a4901',
region: 'US',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx conferences:actions leave \
--api-key 'My API Key' \
--id id \
--call-control-id c46e06d7-b78f-4b13-96b6-c576af9640ffcurl --request POST \
--url https://api.telnyx.com/v2/conferences/{id}/actions/leave \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"call_control_id": "c46e06d7-b78f-4b13-96b6-c576af9640ff",
"beep_enabled": "never"
}
'{
"data": {
"result": "ok"
}
}