REST API: Recordings

A Recording instance resource represents an individually recorded call. Recordings are generated when you use the <Record> TwiML verb. Those recordings are hosted with Twilio for you to retrieve. The Recordings list resource represents the set of an account's recordings.

For convenience, a Recordings list resource is also available as a subresource of a Call instance resource. This resource is scoped to an individual call, so that you can navigate directly from a call to the recordings generated from that call.

Recording Instance Resource

This resource represents an individual recording. These URLs may look familiar. That's because they're the RecordingURIs Twilio returns to your application when you use the verb!

Resource URI

/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}
Because these URLs are useful to many external applications, they are public and do not require HTTP Basic Auth to access. This allows you to easily embed the URL in a web application without revealing your Twilio API credentials. The URLs are fairly long and difficult to guess, so the contents of the recordings should be fairly private unless you distribute the URL. For added security, you can enforce HTTP basic auth to access media using your AccountSid and Authentication token via the account portal.

Resource Properties

A Recording resource is represented by the following properties:

Property Description
Sid A 34 character string that uniquely identifies this resource.
DateCreated The date that this resource was created, given in RFC 2822 format.
DateUpdated The date that this resource was last updated, given in RFC 2822 format.
AccountSid The unique id of the Account responsible for this recording.
CallSid The unique id for the parent call leg that corresponds to the recording.
Duration The length of the recording, in seconds.
Price The one-time cost of creating this recording. Example: -0.00250
PriceUnit The currency used in the Price property. Example: USD
ApiVersion The version of the API in use during the recording.
Uri The URI for this resource, relative to https://api.twilio.com
Status The status of the recording. Possible values are processing, completed.
Source The type of call that created this recording. Possible values are DialVerb, Conference, OutboundAPI, Trunking, RecordVerb.
Channels The number of channels in the final recording file as an integer.

HTTP GET

Returns one of several representations:

Default: WAV

Without an extension, or with a ".wav", a binary WAV audio file is returned with mime-type "audio/x-wav". For example:

GET /2010-04-01/Accounts/ACda6f1.../Recordings/RE557ce644e5ab84fa21cc21112e22c485
Alternative: MP3

Appending ".mp3" to the URI returns a binary MP3 audio file with mime-type type "audio/mpeg". For example:

GET /2010-04-01/Accounts/ACda6f1.../Recordings/RE557ce644e5ab84fa21cc21112e22c485.mp3
Alternative: XML

Appending ".xml" to the URI returns a familiar XML representation. For example:

GET /2010-04-01/Accounts/ACda6f1.../Recordings/RE557ce644e5ab84fa21cc21112e22c485.xml
<TwilioResponse>
  <Recording>
    <Sid>RE557ce644e5ab84fa21cc21112e22c485</Sid>
    <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
    <CallSid>CA8dfedb55c129dd4d6bd1f59af9d11080</CallSid>
    <Duration>1</Duration>
    <DateCreated>Fri, 17 Jul 2009 01:52:49 +0000</DateCreated>
    <ApiVersion>2008-08-01</ApiVersion>
    <DateUpdated>Fri, 17 Jul 2009 01:52:49 +0000</DateUpdated>
    <Price>-0.00250</Price>
    <PriceUnit>USD</PriceUnit>
    <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RE557ce644e5ab84fa21cc21112e22c485.xml</Uri>
  </Recording>
</TwilioResponse>

HTTP POST

Not Supported.

HTTP PUT

Not Supported.

HTTP DELETE

Deletes a recording from your account. Once the recording is deleted, you will no longer be billed for those minutes.

If successful, returns HTTP 204 (No Content) with no body.

Examples
Delete a Recording
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RE557ce644e5ab84fa21cc21112e22c485.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteRecording("RE557ce644e5ab84fa21cc21112e22c485");
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Recording;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Recording recording = client.getAccount().getRecording("RE557ce644e5ab84fa21cc21112e22c485");
    
    recording.delete();
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.recordings("RE557ce644e5ab84fa21cc21112e22c485").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid RE557ce644e5ab84fa21cc21112e22c485 deleted successfully.");
    }
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.recordings.delete("RE557ce644e5ab84fa21cc21112e22c485")
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@recording = @client.account.recordings.get("RE557ce644e5ab84fa21cc21112e22c485")
@recording.delete
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->account
    ->recordings("RE557ce644e5ab84fa21cc21112e22c485")
    ->delete();
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RE557ce644e5ab84fa21cc21112e22c485 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->recordings->delete("RE557ce644e5ab84fa21cc21112e22c485");

Recording Instance Subresources

Each Recording instance resource has a Transcriptions subresource which represents the set of transcriptions generated from the recording (if any).

Transcriptions List Subresource
/2010-04-01/Accounts/{YourAccountSid}/Recordings/{RecordingSid}/Transcriptions

Represents the set of transcriptions available for the recording identified by {RecordingSid}. See the Transcriptions resource documentation for properties and response formats.

Recordings List Resource

Resource URI

/2010-04-01/Accounts/{AccountSid}/Recordings
/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings

NOTE: Unlike the Recording instance resource described above, the list of recordings IS protected by your account credentials like most parts of this API. You must use HTTP basic auth to access the Recordings list resource.

HTTP GET

Returns a list of Recording resource representations, each representing a recording generated during the course of a phone call. The list includes paging information.

List Filters

The following GET query string parameters allow you to limit the list returned. Note, parameters are case-sensitive:

Parameter Description
CallSid Show only recordings made during the call given by this sid.
DateCreated Only show recordings created on the given date. Should be formatted as YYYY-MM-DD. You can also specify inequality, such as DateCreated<=YYYY-MM-DD for recordings generated at or before midnight on a date, and DateCreated>=YYYY-MM-DD for recordings generated at or after midnight on a date.
Example 1
Get all Recordings
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var recordings = twilio.ListRecordings(null, null, null, null);
    
    foreach (var recording in recordings.Recordings)
    {
      Console.WriteLine(recording.Duration);
    }
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Recording;
import com.twilio.sdk.resource.list.RecordingList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    RecordingList recordings = client.getAccount().getRecordings();
    
    // Loop over recordings and print out a property for each one.
    for (Recording recording : recordings) {
      System.out.println(recording.getDuration());
    }
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.recordings.list(function(err, data) {
    data.recordings.forEach(function(recording) {
        console.log(recording.Duration);
    });
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of recording objects with the properties described above
recordings = client.recordings.list()
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over recordings and print out a property for each one
@client.account.recordings.list.each do |recording|
    puts recording.duration
end
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of recordings and echo a property for each one
foreach ($client->account->recordings->read() as $recording) {
    echo $recording->duration;
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of recordings and echo a property for each one
foreach ($client->account->recordings as $recording) {
    echo $recording->duration;
}
Show Output
  • JSON
  • XML
{
	"page": 0,
	"page_size": 50,
	"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings.json"
	"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings.json?Page=0&PageSize=50",
	"previous_page_uri": null,
	"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings.json?Page=1&PageSize=50",
	"recordings": [
		{
			"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"api_version": "2008-08-01",
			"call_sid": "CA8dfedb55c129dd4d6bd1f59af9d11080",
			"date_created": "Fri, 17 Jul 2009 01:52:49 +0000",
			"date_updated": "Fri, 17 Jul 2009 01:52:49 +0000",
			"duration": "1",
			"sid": "RE557ce644e5ab84fa21cc21112e22c485",
			"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RE557ce644e5ab84fa21cc21112e22c485.json"
		},
		...
	]
}
<TwilioResponse>
	<Recordings page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?Page=0&amp;PageSize=50" previouspageuri="" nextpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?Page=1&amp;PageSize=50">
		<Recording>
			<Sid>RE557ce644e5ab84fa21cc21112e22c485</Sid>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<CallSid>CA8dfedb55c129dd4d6bd1f59af9d11080</CallSid>
			<Duration>1</Duration>
			<DateCreated>Fri, 17 Jul 2009 01:52:49 +0000</DateCreated>
			<ApiVersion>2008-08-01</ApiVersion>
			<DateUpdated>Fri, 17 Jul 2009 01:52:49 +0000</DateUpdated>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RE557ce644e5ab84fa21cc21112e22c485</Uri>
		</Recording>
		...
	</Recordings>
</TwilioResponse>
Example 2

Only return recordings generated on Jul 06th, 2009.

Filter Recordings with Exact Match
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings.json \
    -d "DateCreated=2009-07-06" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var recordings = twilio.ListRecordings(null, new DateTime(2009, 07, 06), null, null);
    
    foreach (var recording in recordings.Recordings)
    {
      Console.WriteLine(recording.CallSid);
    }
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Recording;
import com.twilio.sdk.resource.list.RecordingList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the RecordingList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("DateCreated", "2009-07-06");
    
    RecordingList recordings = client.getAccount().getRecordings(params);
    
    // Loop over recordings and print out a property for each one.
    for (Recording recording : recordings) {
      System.out.println(recording.getCallSid());
    }
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.recordings.list({ dateCreated: "2009-07-06" }, function(err, data) {
    data.recordings.forEach(function(recording) {
        console.log(recording.CallSid);
    });
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of recording objects with the properties described above
recordings = client.recordings.list(date_created="2009-07-06")
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over recordings and print out a property for each one
@client.account.recordings.list({
    :date_created => "2009-07-06"}).each do |recording|
    puts recording.call_sid
end
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$recordings = $client->account->recordings->read(
    array("dateCreated" => "2009-07-06")
);
// Loop over the list of recordings and echo a property for each one
foreach ($recordings as $recording) {
    echo $recording->callSid;
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings \
    -d "DateCreated=2009-07-06" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of recordings and echo a property for each one
foreach ($client->account->recordings->getIterator(0, 50, array(
        "DateCreated" => "2009-07-06"
    )) as $recording
) {
    echo $recording->call_sid;
}
Example 3

Only return recordings generated after midnight Jul 06th, 2009.

Filter Recordings with Partial Match
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings.json \
    -d "DateCreated>=2009-07-06" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var recordings = twilio.ListRecordings(null, null, null, null);
    
    foreach (var recording in recordings.Recordings)
    {
      Console.WriteLine(recording.CallSid);
    }
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Recording;
import com.twilio.sdk.resource.list.RecordingList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the RecordingList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("DateCreated>", "2009-07-06");
    
    RecordingList recordings = client.getAccount().getRecordings(params);
    
    // Loop over recordings and print out a property for each one.
    for (Recording recording : recordings) {
      System.out.println(recording.getCallSid());
    }
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.recordings.list({ "dateCreated>": "2009-07-06" }, function(err, data) {
    data.recordings.forEach(function(recording) {
        console.log(recording.CallSid);
    });
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of recording objects with the properties described above
recordings = client.recordings.list(after=date(2009, 7, 6))
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over recordings and print out a property for each one
@client.account.recordings.list({
    :"date_created>" => "2009-07-06"}).each do |recording|
    puts recording.call_sid
end
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$recordings = $client->account->recordings->read(
    array("datecreatedAfter" => "2009-07-06")
);
// Loop over the list of recordings and echo a property for each one
foreach ($recordings as $recording) {
    echo $recording->callSid;
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings \
    -d "DateCreated>=2009-07-06" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of recordings and echo a property for each one
foreach ($client->account->recordings->getIterator(0, 50, array(
        "DateCreated>" => "2009-07-06"
    )) as $recording
) {
    echo $recording->call_sid;
}
Example 4

Only return recordings generated between midnight Jul 04th, 2009 and midnight Jul 06th, 2009.

Filter Recordings with Range Match
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings.json \
    -d "DateCreated<=2009-07-06" \
    -d "DateCreated>=2009-07-04" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var recordings = twilio.ListRecordings(null, null, null, null);
    
    foreach (var recording in recordings.Recordings)
    {
      Console.WriteLine(recording.Duration);
    }
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Recording;
import com.twilio.sdk.resource.list.RecordingList;
import java.util.HashMap;
import java.util.Map;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the RecordingList
    Map<String, String> params = new HashMap<String, String>();
    
    params.put("DateCreated<", "2009-07-06");
    params.put("DateCreated>", "2009-07-04");
    
    RecordingList recordings = client.getAccount().getRecordings(params);
    
    // Loop over recordings and print out a property for each one.
    for (Recording recording : recordings) {
      System.out.println(recording.getDuration());
    }
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.recordings.list({ "dateCreated<": "2009-07-06",
    "dateCreated>": "2009-07-04" }, function(err, data) {
    data.recordings.forEach(function(recording) {
        console.log(recording.Duration);
    });
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
from datetime import date

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of recording objects with the properties described above
recordings = client.recordings.list(before=date(2009, 7, 6),
    after=date(2009, 7, 4))
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over recordings and print out a property for each one
@client.account.recordings.list({
    :"date_created<" => "2009-07-06",
    :"date_created>" => "2009-07-04"}).each do |recording|
    puts recording.duration
end
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$recordings = $client->account->recordings->read(
    array(
        "datecreatedBefore" = "2009-07-06"
        "datecreatedAfter" => "2009-07-04"
    )
);
// Loop over the list of recordings and echo a property for each one
foreach ($recordings as $recording) {
    echo $recording->callSid;
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings \
    -d "DateCreated<=2009-07-06" \
    -d "DateCreated>=2009-07-04" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of recordings and echo a property for each one
foreach ($client->account->recordings->getIterator(0, 50, array(
        "DateCreated<" => "2009-07-06",
    "DateCreated>" => "2009-07-04"
    )) as $recording
) {
    echo $recording->duration;
}

HTTP POST

Not Supported.

HTTP PUT

Not Supported.

HTTP DELETE

Not Supported.