Get Started
This document describes Twilio's old 2008-08-01 API. See what we added in our latest revision: changelog.

REST API: Recordings

Recordings are generated when you use the <Record> TwiML Verb. Those recordings are hosted with Twilio for you to retrieve.

Recording Instance Resource

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

Resource URI

/2008-08-01/Accounts/{YourAccountSid}/Recordings/{RecordingSid}
SPECIAL NOTE: Because these URLs may be accessed by a wide range of applications, they are public and do not require credentials to access. This allows you to, for example, 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.

Resource Properties

A <Recording> resource is represented by the following properties:

Recording Resource 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 34 character id of the Account this notification is associated with. (Your account!)
CallSid The call during which the recording was made.
Duration The length of the recording, in seconds

HTTP Methods

GET

Returns one of several representations:

Default: WAV

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

https://api.twilio.com/2008-08-01/Account/AC309475e5fede1b49e100272a8640f438/Recordings/RE41331862605f3d662488fdafda2e175f

Would return a wav of the recording.

Alternative: MP3

With a .mp3 file extension on the URL, a binary MP3 audio file is returned, with mime-type type "audio/mpeg". For example:

https://api.twilio.com/2008-08-01/Account/AC309475e5fede1b49e100272a8640f438/Recordings/RE41331862605f3d662488fdafda2e175f.mp3

Would return an mp3 of the recording.

Alternative: XML

With an .xml file extension on the URL, a familiar XML representation is returned. For example:

GET /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings/RE41331862605f3d662488fdafda2e175f.xml HTTP/1.1
<TwilioResponse> 
    <Recording> 
    <Sid>RE41331862605f3d662488fdafda2e175f</Sid> 
    <AccountSid>AC309475e5fede1b49e100272a8640f438</AccountSid> 
    <CallSid>CAcd420fcb3c4b86e360ea0cc27ebc8698</CallSid> 
    <Duration>15</Duration> 
    <DateCreated>Tue, 01 Apr 2008 01:07:15 -0400</DateCreated> 
    <DateUpdated>Tue, 01 Apr 2008 01:07:15 -0400</DateUpdated> 
    </Recording> 
</TwilioResponse>
POST

Not Supported.

PUT

Not Supported.

DELETE

Deletes a recording from your account. Returns HTTP 204 (No Content) with no body. For example:

DELETE /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings/RE41331862605f3d662488fdafda2e175f HTTP/1.1

Recordings List Resource

Resource URI

/2008-08-01/Accounts/{YourAccountSid}/Recordings

NOTE: Unlike the Recording instance resource described below, the list of recordings IS protected by your account credentials like most parts of this API.

HTTP Methods

GET

Returns a list of <Recording> elements, each representing a recording generated by your account, under a <Recordings> list element that includes paging information.

Example:

GET /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings HTTP/1.1
<TwilioResponse> 
    <Recordings page="0" numpages="1" pagesize="50" total="16" start="0" end="15"> 
        <Recording> 
            <Sid>RE41331862605f3d662488fdafda2e175f</Sid> 
            <AccountSid>AC309475e5fede1b49e100272a8640f438</AccountSid> 
            <CallSid>CAcd420fcb3c4b86e360ea0cc27ebc8698</CallSid> 
            <Duration>123</Duration> 
            <DateCreated>Tue, 01 Apr 2008 01:07:15 -0400</DateCreated> 
            <DateUpdated>Tue, 01 Apr 2008 01:07:15 -0400</DateUpdated> 
        </Recording> 
        <Recording> 
            <Sid>RE50358f2565ad3c542e004161c3aecfd2</Sid> 
            <AccountSid>AC309475e5fede1b49e100272a8640f438</AccountSid> 
            <CallSid>CAcd420fcb3c4b86e360ea0cc27ebc8698</CallSid> 
            <Duration>45</Duration> 
            <DateCreated>Tue, 01 Apr 2008 01:07:10 -0400</DateCreated> 
            <DateUpdated>Tue, 01 Apr 2008 01:07:10 -0400</DateUpdated> 
        </Recording> 
        ... 
    </Recordings> 
</TwilioResponse>
List Filtering

You may limit the list by providing certain query string parameters to the listing resource. Note, parameters are case-sensitive:

  • CallSid: Show only Recordings made during the given CallSid
  • 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.

Examples:

GET /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings?DateCreated=2009-07-06

Would list only recordings generated on Jul 06th, 2009.

GET /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings?DateCreated>=2009-07-06

Would list only recordings generated after midnight Jul 06th, 2009.

GET /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings?DateCreated>=2009-07-04&DateCreated<=2009-07-06

Would list only recordings generated between midnight Jul 04th, 2009 and midnight Jul 06th, 2009.

POST

Not Supported.

PUT

Not Supported.

DELETE

Not Supported.