Recordings are generated when you use the <Record> Verb. Those recordings are hosted on Twilio's REST API for you to access.
/2008-08-01/Accounts/{YourAccountSid}/Recordings
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 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 |
/2008-08-01/Accounts/{YourAccountSid}/Recordings
NOTE: Unlike the Recording instance resources below, the list of recordings IS protected by your account credentials like most parts of this API.
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>
Not Supported.
Not Supported.
Not Supported.
You may limit the list by providing certain query string parameters to the listing resource. Note, parameters are case-sensitive:
Examples:
https://api.twilio.com/2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings?DateCreated=2009-07-06
Would list only recordings generated on Jul 06th, 2009.
https://api.twilio.com/2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings?DateCreated>=2009-07-06
Would list only recordings generated after midnight Jul 06th, 2009.
https://api.twilio.com/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.
This resource represents an individual recording. These URLs may look familiar... they're the RecordingURL handed to your application in the TwiML API when you use the
/2008-08-01/Accounts/{YourAccountSid}/Recordings/{RecordingSid}
Returns one of several representations:
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.
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.
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>
Not Supported.
Not Supported.
Use to delete a recording from your account. Returns an HTTP 204 (No Content), with no body. For example:
DELETE /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/Recordings/RE41331862605f3d662488fdafda2e175f HTTP/1.1