Rate this page:

Alternative Representations

Effective November 1, 2024, CNAME for unauthenticated access to HTTP Voice recording media URLs will no longer be supported. For more information, see the Changelog.

You can create a CNAME of our API URLS and serve up recording media from a hostname of your choosing! To do this, create a CNAME record with your DNS provider that points to

Alternate Representations

Twilio's 2010 APIs (those under respond as XML by default, but can also return JSON, CSV, and even HTML. (Note: Newer APIs of the form are only available as JSON responses.)


Append a .csv to the end of REST URLs, and you'll get a Comma Separated Values (CSV) representation of the data, with a header row describing the columns. For example, if you requested the following Calls resource, the default representation is XML:

GET /2010-04-01/Accounts/AC30947.../Calls

    <Calls page="0" numpages="1" pagesize="50" total="38" start="0" end="37">  
            <DateCreated>Sat, 07 Feb 2009 13:15:19 +0000</DateCreated>
            <DateUpdated>Sat, 07 Feb 2009 13:15:19 +0000</DateUpdated>
            <StartTime>Thu, 03 Apr 2008 04:36:33 +0000</StartTime>  
            <EndTime>Thu, 03 Apr 2008 04:36:47 +0000</EndTime>  
            <DateCreated>Sat, 07 Feb 2009 13:15:19 +0000</DateCreated>
            <DateUpdated>Sat, 07 Feb 2009 13:15:19 +0000</DateUpdated>
            <StartTime>Thu, 03 Apr 2008 01:37:05 +0000</StartTime>  
            <EndTime>Thu, 03 Apr 2008 01:37:40 +0000</EndTime>  

Appending a .csv, you'd get a CSV representation of the same data with mime-type 'text/csv'. Each Call is a row in the table, and each XML element a column:

GET /2010-04-01/Accounts/AC30947.../Calls.csv

Would return:

Sid, DateCreated, DateUpdated, AccountSid, To, From, ...
CA42ed11f93dc08b952027ffbc406d0868,"Sat, 07 Feb 2009 13:15:19 +0000",
"Sat, 07 Feb 2009 13:15:19 +0000",AC309475e5fede1b49e100272a8640f438,
03 Apr 2008 04:36:33 +0000","Thu, 03 Apr 2008 04:36:47 +0000",14,,inbound,,

NOTE: The order of the columns in the CSV is not defined and may change when new fields are added to the API response. Your application design should be resilient to changes in the order of the columns in the CSV response.


You can also request JSON responses by appending a .json to the end of any REST URL. The response mime-type is 'application/json'.

The 2010-04-01 API version returns a new format for JSON responses than previous REST API versions. This format includes paging information and a simplified structure for resources!

For example, to retrieve IncomingPhoneNumber records as JSON:

GET /2010-04-01/Accounts/AC33d49.../IncomingPhoneNumbers.json

            "friendly_name":"My Phone Number",
            "date_created":"Thu, 29 Jul 2010 21:00:17 +0000","
            date_updated":"Mon, 09 Aug 2010 22:14:20 +0000",
            "capabilities": {


You can also get Twilio to return the same objects formatted as HTML by appending a .html to the end of any url. This may be useful if you intend to pass this data directly to a browser, but will require you to complete the URIs with the correct subdomain (generally

For example, consider the following XML representation of an account:

GET /2010-04-01/Accounts/AC35542fc30a091bed0c1ed511e1d9935d

        <FriendlyName>'s Account</FriendlyName>
        <DateCreated>Tue, 27 Jul 2010 01:54:11 +0000</DateCreated>
        <DateUpdated>Thu, 29 Jul 2010 20:59:01 +0000</DateUpdated>

The same resource, represented as HTML is shown below. Note the .html appended to the URI:

GET /2010-04-01/Accounts/AC35542fc30a091bed0c1ed511e1d9935d.html

<body class="twilio-response">
    <div class="account">
            <dd>'s Account</dd>
            <dd>Tue, 27 Jul 2010 01:54:11 +0000</dd>
            <dd>Thu, 29 Jul 2010 20:59:01 +0000</dd>
            <dd><a href="/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3.html">/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3.html</a></dd>
            <dl class="subresource-uris">
                <dd><a href="/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/AvailablePhoneNumbers.html">/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/AvailablePhoneNumbers.html</a></dd>
                <dd><a href="/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Calls.html">/2010-04-01/Accounts/AC228ba7a5fe4238be081ea6f3c44186f3/Calls.html</a></dd>
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Loading Code Sample...

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!