Get Started

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.

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 call during which the recording was made.
Duration The length of the recording, in seconds.
ApiVersion The version of the API in use during the recording.
Uri The URI for this resource, relative to https://api.twilio.com

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:

Try it now
  • GET /2010-04-01/Accounts/ACda6f1.../Recordings/RE557ce644e5ab84fa21cc21112e22c485.xml

    <TwilioResponse>
      <Recording>
        <Sid>RE557ce644e5ab84fa21cc21112e22c485</Sid>
        <AccountSid>ACda6f1e11047ebd6fe7a55f120be3a900</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/ACda6f1e11047ebd6fe7a55f120be3a900/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

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
Example 2

Only return recordings generated on Jul 06th, 2009.

Example 3

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

Example 4

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

HTTP POST

Not Supported.

HTTP PUT

Not Supported.

HTTP DELETE

Not Supported.