Skip to main content
POST
/
conferences
/
{id}
/
actions
/
record_start
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.recordStart('id', { format: 'wav' });

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.record_start(
id="id",
format="wav",
)
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.RecordStart(
context.TODO(),
"id",
telnyx.ConferenceActionRecordStartParams{
Format: telnyx.ConferenceActionRecordStartParamsFormatWav,
},
)
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.ActionRecordStartParams;
import com.telnyx.sdk.models.conferences.actions.ActionRecordStartResponse;

public final class Main {
private Main() {}

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

ActionRecordStartParams params = ActionRecordStartParams.builder()
.id("id")
.format(ActionRecordStartParams.Format.WAV)
.build();
ActionRecordStartResponse response = client.conferences().actions().recordStart(params);
}
}
require "telnyx"

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

response = telnyx.conferences.actions.record_start("id", format_: :wav)

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->recordStart(
'id',
format: 'wav',
channels: 'dual',
commandID: '891510ac-f3e4-11e8-af5b-de00688a4901',
customFileName: 'my_recording_file_name',
playBeep: true,
region: 'US',
trim: 'trim-silence',
);

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx conferences:actions record-start \
--api-key 'My API Key' \
--id id \
--format wav
curl --request POST \
--url https://api.telnyx.com/v2/conferences/{id}/actions/record_start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"format": "wav",
"command_id": "891510ac-f3e4-11e8-af5b-de00688a4901",
"play_beep": true
}
'
{
  "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

Specifies the conference to record by id or name

Body

application/json
format
enum<string>
required

The audio file format used when storing the conference recording. Can be either mp3 or wav.

Available options:
wav,
mp3
Example:

"mp3"

command_id
string

Use this field to avoid duplicate commands. Telnyx will ignore any command with the same command_id for the same conference_id.

Example:

"891510ac-f3e4-11e8-af5b-de00688a4901"

channels
enum<string>
default:single

When dual, final audio file will be stereo recorded with the conference creator on the first channel, and the rest on the second channel.

Available options:
single,
dual
Example:

"dual"

play_beep
boolean

If enabled, a beep sound will be played at the start of a recording.

Example:

true

trim
enum<string>

When set to trim-silence, silence will be removed from the beginning and end of the recording.

Available options:
trim-silence
Example:

"trim-silence"

custom_file_name
string

The custom recording file name to be used instead of the default call_leg_id. Telnyx will still add a Unix timestamp suffix.

Required string length: 1 - 40
Example:

"my_recording_file_name"

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" }