Skip to main content
POST
/
conferences
/
{id}
/
actions
/
hold
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.hold('id');

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.hold(
id="id",
)
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.Hold(
context.TODO(),
"id",
telnyx.ConferenceActionHoldParams{},
)
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.ActionHoldParams;
import com.telnyx.sdk.models.conferences.actions.ActionHoldResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

ActionHoldResponse response = client.conferences().actions().hold("id");
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

response = telnyx.conferences.actions.hold("id")

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->hold(
'id',
audioURL: 'http://example.com/message.wav',
callControlIDs: [
'v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg'
],
mediaName: 'my_media_uploaded_to_media_storage_api',
region: 'US',
);

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx conferences:actions hold \
--api-key 'My API Key' \
--id id
curl --request POST \
--url https://api.telnyx.com/v2/conferences/{id}/actions/hold \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"call_control_ids": [
"v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"
],
"audio_url": "http://example.com/message.wav"
}
'
{
  "data": {
    "result": "ok"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Uniquely identifies the conference by id or name

Body

application/json
call_control_ids
string[]

List of unique identifiers and tokens for controlling the call. When empty all participants will be placed on hold.

audio_url
string

The URL of a file to be played to the participants when they are put on hold. media_name and audio_url cannot be used together in one request.

Example:

"http://example.com/message.wav"

media_name
string

The media_name of a file to be played to the participants when they are put on hold. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file.

Example:

"my_media_uploaded_to_media_storage_api"

region
enum<string>

Region where the conference data is located. Defaults to the region defined in user's data locality settings (Europe or US).

Available options:
Australia,
Europe,
Middle East,
US
Example:

"US"

Response

Successful response upon making a conference command.

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