Update recording on a call
Updates recording resource for particular call.
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.texml.accounts.calls.recordings.recordingSidJson(
'6a09cdc3-8948-47f0-aa62-74ac943d6c58',
{ account_sid: 'account_sid', call_sid: 'call_sid' },
);
console.log(response.account_sid);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.texml.accounts.calls.recordings.recording_sid_json(
recording_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
call_sid="call_sid",
)
print(response.account_sid)
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.Texml.Accounts.Calls.Recordings.RecordingSidJson(
context.TODO(),
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
telnyx.TexmlAccountCallRecordingRecordingSidJsonParams{
AccountSid: "account_sid",
CallSid: "call_sid",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.AccountSid)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RecordingRecordingSidJsonParams params = RecordingRecordingSidJsonParams.builder()
.accountSid("account_sid")
.callSid("call_sid")
.recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
.build();
RecordingRecordingSidJsonResponse response = client.texml().accounts().calls().recordings().recordingSidJson(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.texml.accounts.calls.recordings.recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "account_sid",
call_sid: "call_sid"
)
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->texml->accounts->calls->recordings->recordingSidJson(
'6a09cdc3-8948-47f0-aa62-74ac943d6c58',
accountSid: 'account_sid',
callSid: 'call_sid',
status: 'paused',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx texml:accounts:calls:recordings recording-sid-json \
--api-key 'My API Key' \
--account-sid account_sid \
--call-sid call_sid \
--recording-sid 6a09cdc3-8948-47f0-aa62-74ac943d6c58curl --request POST \
--url https://api.telnyx.com/v2/texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data Status=paused{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
"conference_sid": "cd5a70f4-759b-4d5e-9c06-88c00f16f3c1",
"channels": 1,
"date_created": "2023-08-11T19:12:11Z",
"date_updated": "2023-08-11T19:12:11Z",
"start_time": "2023-08-11T19:12:11Z",
"price": "0.10",
"price_unit": "USD",
"duration": "12",
"sid": "e9cea0be-7dbd-4b98-98b1-c0089d9d43b0",
"source": "StartCallRecordingAPI",
"error_code": null,
"track": "inbound",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}{
"errors": [
{
"detail": "Resource not found"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The id of the account the resource belongs to.
The CallSid that identifies the call to update.
Uniquely identifies the recording by id.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Body
Update call recording on a call.
in-progress, paused, stopped "paused"
Response
Successful call recording create response
"61bf923e-5e4d-4595-a110-56190ea18a1b"
"v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA"
"cd5a70f4-759b-4d5e-9c06-88c00f16f3c1"
1, 2 1
"2023-08-11T19:12:11Z"
"2023-08-11T19:12:11Z"
"2023-08-11T19:12:11Z"
The price of this recording, the currency is specified in the price_unit field.
"0.10"
The unit in which the price is given.
"USD"
The duration of this recording, given in seconds.
"12"
Identifier of a resource.
"e9cea0be-7dbd-4b98-98b1-c0089d9d43b0"
Defines how the recording was created.
StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking null
The audio track to record for the call. The default is both.
inbound, outbound, both "inbound"
The relative URI for this recording resource.
"/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
Was this page helpful?
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.texml.accounts.calls.recordings.recordingSidJson(
'6a09cdc3-8948-47f0-aa62-74ac943d6c58',
{ account_sid: 'account_sid', call_sid: 'call_sid' },
);
console.log(response.account_sid);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.texml.accounts.calls.recordings.recording_sid_json(
recording_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
call_sid="call_sid",
)
print(response.account_sid)
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.Texml.Accounts.Calls.Recordings.RecordingSidJson(
context.TODO(),
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
telnyx.TexmlAccountCallRecordingRecordingSidJsonParams{
AccountSid: "account_sid",
CallSid: "call_sid",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.AccountSid)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RecordingRecordingSidJsonParams params = RecordingRecordingSidJsonParams.builder()
.accountSid("account_sid")
.callSid("call_sid")
.recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
.build();
RecordingRecordingSidJsonResponse response = client.texml().accounts().calls().recordings().recordingSidJson(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.texml.accounts.calls.recordings.recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "account_sid",
call_sid: "call_sid"
)
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->texml->accounts->calls->recordings->recordingSidJson(
'6a09cdc3-8948-47f0-aa62-74ac943d6c58',
accountSid: 'account_sid',
callSid: 'call_sid',
status: 'paused',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx texml:accounts:calls:recordings recording-sid-json \
--api-key 'My API Key' \
--account-sid account_sid \
--call-sid call_sid \
--recording-sid 6a09cdc3-8948-47f0-aa62-74ac943d6c58curl --request POST \
--url https://api.telnyx.com/v2/texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data Status=paused{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
"conference_sid": "cd5a70f4-759b-4d5e-9c06-88c00f16f3c1",
"channels": 1,
"date_created": "2023-08-11T19:12:11Z",
"date_updated": "2023-08-11T19:12:11Z",
"start_time": "2023-08-11T19:12:11Z",
"price": "0.10",
"price_unit": "USD",
"duration": "12",
"sid": "e9cea0be-7dbd-4b98-98b1-c0089d9d43b0",
"source": "StartCallRecordingAPI",
"error_code": null,
"track": "inbound",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}{
"errors": [
{
"detail": "Resource not found"
}
]
}