NAME

Twilio::Rest::Api::V2010::Account::Recording - The Recording resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

for my $recording ($client->recordings->read({}, 20)) {
  ...
}
my $recording = $client->recordings($sid)->fetch;
$client->recordings($sid)->delete;

DESCRIPTION

Recordings of phone calls

This file holds RecordingList, RecordingPage, RecordingContext and RecordingInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

RecordingList

Returned by $client->recordings. See also Twilio::ListResource.

read

my @records = $client->recordings->read(\%options, $limit, $page_size);

Retrieve a list of recordings belonging to the account used to make the request. Returns the records as a list, fetching as many pages as it needs.

The options are:

call_sid

The Call SID of the resources to read.

conference_sid

The Conference SID that identifies the conference associated with the recording to read.

date_created

Only include recordings that were created on this date. Specify a date as YYYY-MM-DD in GMT, for example: 2009-07-06, to read recordings that were created on this date. You can also specify an inequality, such as DateCreated<=YYYY-MM-DD, to read recordings that were created on or before midnight of this date, and DateCreated>=YYYY-MM-DD to read recordings that were created on or after midnight of this date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

date_created_before

Only include recordings that were created on this date. Specify a date as YYYY-MM-DD in GMT, for example: 2009-07-06, to read recordings that were created on this date. You can also specify an inequality, such as DateCreated<=YYYY-MM-DD, to read recordings that were created on or before midnight of this date, and DateCreated>=YYYY-MM-DD to read recordings that were created on or after midnight of this date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

date_created_after

Only include recordings that were created on this date. Specify a date as YYYY-MM-DD in GMT, for example: 2009-07-06, to read recordings that were created on this date. You can also specify an inequality, such as DateCreated<=YYYY-MM-DD, to read recordings that were created on or before midnight of this date, and DateCreated>=YYYY-MM-DD to read recordings that were created on or after midnight of this date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

include_soft_deleted

A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.

stream

my $stream = $client->recordings->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->recordings->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->recordings->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->recordings->get_context($sid);

Returns a RecordingContext, and makes no request.

RecordingPage

A Twilio::Page of RecordingInstance objects.

records_key

build_instance

Used by Twilio::Page.

RecordingContext

Returned by $client->recordings($sid). It makes no request until one of these methods is called.

fetch

my $recording = $client->recordings($sid)->fetch(\%options);

Fetch an instance of a recording. Returns a RecordingInstance.

The options are:

include_soft_deleted

A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.

delete

$client->recordings($sid)->delete;

Delete a recording from your account. Returns true.

add_on_results

my $list = $object->add_on_results;

my $context = $object->add_on_results($sid);

See Twilio::Rest::Api::V2010::Account::Recording::AddOnResult.

transcriptions

my $list = $object->transcriptions;

my $context = $object->transcriptions($sid);

See Twilio::Rest::Api::V2010::Account::Recording::Transcription.

RecordingInstance

See also Twilio::InstanceResource.

It has fetch, delete, add_on_results and transcriptions, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Recording resource.

api_version

The API version used during the recording.

call_sid

The SID of the Call the Recording resource is associated with. This will always refer to the parent leg of a two-leg call.

channels

The number of channels in the recording resource. For information on specifying the number of channels in the downloaded recording file, check out Fetch a Recording’s media file.

conference_sid

The Conference SID that identifies the conference associated with the recording, if a conference recording.

date_created

The date and time in GMT that the resource was created specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT that the resource was last updated specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

duration

The length of the recording in seconds.

encryption_details

How to decrypt the recording if it was encrypted using Call Recording Encryption feature.

error_code

The error code that describes why the recording is absent. The error code is described in our Error Dictionary. This value is null if the recording status is not absent.

media_url

The URL of the media file associated with this recording resource. When stored externally, this is the full URL location of the media file.

price

The one-time cost of creating the recording in the price_unit currency.

price_unit

The currency used in the price property. Example: USD.

sid

The unique string that that we created to identify the Recording resource.

source

One of DialVerb, Conference, OutboundAPI, Trunking, RecordVerb, StartCallRecordingAPI or StartConferenceRecordingAPI.

start_time

The start time of the recording in GMT and in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

status

One of in-progress, paused, stopped, processing, completed, absent or deleted.

subresource_uris

A list of related resources identified by their relative URIs.

uri

The URI of the resource, relative to https://api.twilio.com.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.