[metadata]
article:modified_time: 2026-07-20T17:18:46.000Z
dcterms.modified: 2026-07-20T17:18:46.000Z
description: Explore the various response formats, exceptions, and resources returned from Twilio to your application
og:updated_time: 2026-07-20T17:18:46.000Z
viewport: width=device-width
x-twilio-docs-origin: otk
x-twilio-docs-source: primary

[canonical-links]
https://www.twilio.com/docs/usage/twilios-response

[document-links]
/docs
A Beginner's Guide to the Command Line: /docs/usage/tutorials/a-beginners-guide-to-the-command-line
API best practices: /docs/usage/rest-api-best-practices
API concurrency limit: https://help.twilio.com/hc/en-us/articles/360044308153-Twilio-API-response-Error-429-Too-Many-Requests-
API mutation and conflict resolution: /docs/usage/mutation-and-conflict-resolution
API requests: /docs/usage/requests-to-twilio
API responses: /docs/usage/twilios-response
Addresses: /docs/usage/api/address
Alarms: /docs/usage/troubleshooting/alarms
Alerts: /docs/usage/monitor-alert
All docs...: /docs
Analyze: /docs/usage/fraud-response-guide/analyze
Anti-Fraud Developer's Guide: /docs/usage/anti-fraud-developer-guide
Applications: /docs/usage/api/applications
Availability and Reliability: /docs/usage/security/availability-reliability
Billing Groups: /docs/usage/billing/billing-group
Browse all of Twilio's APIs: /docs
Build with AI: /docs/ai
C# / ASP.NET Core: /docs/usage/tutorials/how-to-secure-your-csharp-aspnet-core-app-by-validating-incoming-twilio-requests
C# / ASP.NET WEB API: /docs/usage/tutorials/how-to-secure-your-csharp-aspnet-web-api-app-by-validating-incoming-twilio-requests
C# / ASP.NET: /docs/usage/tutorials/how-to-secure-your-csharp-aspnet-app-by-validating-incoming-twilio-requests
Contain: /docs/usage/fraud-response-guide/contain
Conversations: /docs/conversations
Days resource: /docs/usage/bulkexport/day
Debug events webhooks: /docs/usage/troubleshooting/debugging-event-webhooks
Developer Hub: https://www.twilio.com/en-us/developers
Diagnose: /docs/usage/fraud-response-guide/diagnose
E.164: https://en.wikipedia.org/wiki/E.164
Engage: /docs/usage/fraud-response-guide/engage
Events: /docs/usage/monitor-events
Example: RCA Summary Request Form: /docs/usage/fraud-response-guide/example-rca-summary-request-form
Exports Configuration resource: /docs/usage/bulkexport/exportconfiguration
Exports Jobs: custom jobs: /docs/usage/bulkexport/export-custom-job
FAQ: /docs/usage/webhooks/webhooks-faq
Flex: /docs/flex
General Usage: /docs/usage
Get started with your Twilio trial account: /docs/usage/tutorials/how-to-use-your-free-trial-account
Getting Started: /docs/usage/webhooks/getting-started-twilio-webhooks
Global Safe List API: /docs/usage/global-safe-list
Go / Gin: /docs/usage/tutorials/how-to-secure-your-gin-project-by-validating-incoming-twilio-requests
Help Center: https://help.twilio.com
Hypermedia As The Engine Of Application State (HATEOAS): https://en.wikipedia.org/wiki/HATEOAS
ISO/IEC Certification: /docs/usage/security/iso-iec-certification
Introduction: /docs/usage/webhooks
Java / Servlets: /docs/usage/tutorials/how-to-secure-your-servlet-app-by-validating-incoming-twilio-requests
Jobs resource: /docs/usage/bulkexport/job
Key: /docs/iam/api-keys/key-resource-v1
Log in: https://www.twilio.com/login
Manage unused resources: /docs/usage/manage-unused-resources
Messaging: /docs/messaging
Node.js / Express: /docs/usage/tutorials/how-to-secure-your-express-app-by-validating-incoming-twilio-requests
Open in ChatGPT: https://chatgpt.com/?hint=search&q=Read%20https%3A%2F%2Fwww.twilio.com%2Fdocs%2Fusage%2Ftwilios-response.md%20so%20I%20can%20ask%20questions%20about%20it
Open in Claude: https://claude.ai/new?q=Read%20https%3A%2F%2Fwww.twilio.com%2Fdocs%2Fusage%2Ftwilios-response.md%20so%20I%20can%20ask%20questions%20about%20it
Open in Cursor: https://cursor.com/link/prompt?text=Read%20https%3A%2F%2Fwww.twilio.com%2Fdocs%2Fusage%2Ftwilios-response.md%20so%20I%20can%20ask%20questions%20about%20it
Open in Perplexity: https://www.perplexity.ai/search?q=Read%20https%3A%2F%2Fwww.twilio.com%2Fdocs%2Fusage%2Ftwilios-response.md%20so%20I%20can%20ask%20questions%20about%20it
Overview: /docs/iam/api/account
Overview: /docs/usage/api
Overview: /docs/usage/billing
Overview: /docs/usage/bulkexport
Overview: /docs/usage/fraud-response-guide
Overview: /docs/usage/trials
Overview: /docs/usage/webhooks/webhooks-overview
PHP / Lumen: /docs/usage/tutorials/how-to-secure-your-lumen-app-by-validating-incoming-twilio-requests
Pagination: /docs/usage/twilios-response#pagination
Privacy Policy: /en-us/legal/privacy
Programmable Messaging: /docs/messaging
Programmable Voice: /docs/voice
Python / Django: /docs/usage/tutorials/how-to-secure-your-django-project-by-validating-incoming-twilio-requests
Python / Flask: /docs/usage/tutorials/how-to-secure-your-flask-app-by-validating-incoming-twilio-requests
REST API requests in PowerShell: /docs/usage/tutorials/how-to-make-http-basic-request-twilio-powershell
RFC 2822: https://www.ietf.org/rfc/rfc2822.txt
Reporting security vulnerabilities: /docs/usage/security/reporting-vulnerabilities
Ruby / Sinatra: /blog/secure-your-sinatra-app-validating-incoming-twilio-requests
SDKs: /docs/libraries
Security: /docs/usage/security
Security: /docs/usage/webhooks/webhooks-security
Set up your local development environment: /docs/usage/local-environment
Sign up: https://www.twilio.com/try-twilio
Store Your Twilio Credentials Securely: /docs/usage/secure-credentials
Studio: /docs/studio
Subaccounts: /docs/iam/api/subaccounts
Terms of service: /en-us/legal/tos
Try out Email: /docs/usage/trials/try-out-email
Try out SMS Messaging: /docs/usage/trials/try-out-sms
Try out Voice: /docs/usage/trials/try-out-voice
Try out WhatsApp: /docs/usage/trials/try-out-whatsapp
Twilio Console Assistant AI Nutrition Facts: /docs/usage/twilio-console-assistant-ai-facts
Twilio Console Assistant: /docs/usage/twilio-console-assistant
Twilio Debugger: /docs/usage/troubleshooting/debugging-your-application
Twilio Docs: /docs
Twilio SDKs: /docs/libraries
Twilio Workbench: /docs/usage/workbench
Twilio tag: https://stackoverflow.com/questions/tagged/twilio
Usage records: /docs/usage/api/usage-record
Usage triggers: /docs/usage/api/usage-trigger
Validate: /docs/usage/fraud-response-guide/validate
Verify API: /docs/verify/api
Video: /docs/video
View as markdown: /docs/usage/twilios-response.md
Voice: /docs/voice
Webhooks Connection Overrides: /docs/usage/webhooks/webhooks-connection-overrides
Welcome to the new Twilio console: /docs/usage/new-twilio-console
support team: https://help.twilio.com

[structured-data]
{"@context":"https://schema.org","@id":"https://www.twilio.com/docs/usage/twilios-response#article","@type":"TechArticle","author":{"@type":"Organization","name":"Twilio Developer Education Team"},"dateModified":"2026-07-20T17:18:46.000Z","description":"Explore the various response formats, exceptions, and resources returned from Twilio to your application","headline":"Twilio API responses","inLanguage":"en","publisher":{"@type":"Organization","name":"Twilio"},"url":"https://www.twilio.com/docs/usage/twilios-response"}

[content]
Twilio API responses | Twilio
Skip to content
Skip to navigation
Skip to topbar
Twilio Docs
General Usage
Get started
Get started with your Twilio trial account
Welcome to the new Twilio console
A Beginner's Guide to the Command Line
Set up your local development environment
Twilio Console Assistant
Twilio Console Assistant AI Nutrition Facts
Trials
Overview
Try out SMS Messaging
Try out Voice
Try out Email
Try out WhatsApp
Twilio APIs
Overview
API requests
API responses
API mutation and conflict resolution
API best practices
REST API requests in PowerShell
Accounts
Overview
Subaccounts
Addresses
Applications
BulkExport API
Overview
Exports Configuration resource
Exports Jobs: custom jobs
Jobs resource
Days resource
Key
Usage records
Usage triggers
Monitor REST API
Alerts
Events
Browse all of Twilio's APIs
Webhooks
Introduction
Overview
Getting Started
Webhooks Connection Overrides
FAQ
Security
Preventing Fraud
Anti-Fraud Developer's Guide
Fraud & Abuse Response Guide
Overview
Validate
Engage
Contain
Analyze
Diagnose
Example: RCA Summary Request Form
Global Safe List API
Troubleshooting and Security
Twilio Debugger
Debug events webhooks
Alarms
Availability and Reliability
Security
ISO/IEC Certification
Reporting security vulnerabilities
Store Your Twilio Credentials Securely
Secure your app by validating incoming Twilio requests
C# / ASP.NET
C# / ASP.NET Core
C# / ASP.NET WEB API
Java / Servlets
Node.js / Express
PHP / Lumen
Python / Django
Python / Flask
Ruby / Sinatra
Go / Gin
Billing
Overview
Billing Groups
Maintenance
Manage unused resources
Twilio products: API docs, quickstarts, and tutorials
Programmable Messaging
Programmable Voice
Verify API
Twilio Workbench
Twilio Docs
Search
Search
Messaging
Voice
Video
Conversations
Flex
Studio
All docs...
Build with AI
SDKs
Help Center
Search
Log in
Sign up
Page tools
Copy as markdown
Useful for sharing or LLM
Copy and view
Copy as markdown
View as markdown
Open in assistant
Open in ChatGPT
Open in Claude
Open in Cursor
Open in Perplexity
On this page
Response formats
Response examples
Status codes
Exceptions
404 Not Found
400 Bad Request
Hypermedia references
Pagination
Paging through API resources
Data formats
Phone numbers
Dates and times
Looking for more inspiration?
Visit the
Developer Hub
On this page
Response formats
Response examples
Status codes
Exceptions
404 Not Found
400 Bad Request
Hypermedia references
Pagination
Paging through API resources
Data formats
Phone numbers
Dates and times
Copy as markdown
Copy and view
Copy as markdown
View as markdown
Open in assistant
Open in ChatGPT
Open in Claude
Open in Cursor
Open in Perplexity
Twilio API responses
Learn how to work with Twilio API responses, including how to set response formats, handle errors, and navigate paginated results.
Response formats
In your API requests, you can specify the format of the response you want to receive by adding an extension to the URI.
Twilio 2010 APIs (
api.twilio.com/2010-04-01
) return XML responses by default. You can also request JSON or CSV. Twilio Product APIs (
<PRODUCT>.twilio.com/v<VERSION>
) return responses in JSON only.
Format
Extension
MIME type
2010 API
Product API
XML
.xml
application/xml
✓ (Default)
JSON
.json
application/json
✓
✓
CSV
.csv
text/csv
✓
Response examples
To request a specific format, append the corresponding extension to the resource URI. The following examples show the same Message resource returned as XML, JSON, and CSV.
XML
JSON
CSV
Copy code block
GET
/2010-04-01/Accounts/
<
ACCOUNT_SI
D
>
/Messages/
<
MESSAGE_SI
D
>
Copy code block
1
<
TwilioResponse
>
2
<
SMSMessage
>
3
<
Sid
>SM1f0e8ae6ade43cb3c0ce4525424e404f</
Sid
>
4
<
DateCreated
>Fri, 13 Aug 2010 01:16:24 +0000</
DateCreated
>
5
<
DateUpdated
>Fri, 13 Aug 2010 01:16:24 +0000</
DateUpdated
>
6
<
DateSent
/>
7
<
AccountSid
>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
AccountSid
>
8
<
To
>+13455431221</
To
>
9
<
From
>+15104564545</
From
>
10
<
Body
>A Test Message</
Body
>
11
<
Status
>queued</
Status
>
12
<
Flags
>
13
<
Flag
>outbound</
Flag
>
14
</
Flags
>
15
<
ApiVersion
>2010-04-01</
ApiVersion
>
16
<
Price
/>
17
<
Uri
>
18
/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/SM1f0e8ae6ade43cb3c0ce4525424e404f
19
</
Uri
>
20
</
SMSMessage
>
21
</
TwilioResponse
>
Copy code block
GET
/2010-04-01/Accounts/
<
ACCOUNT_SI
D
>
/Messages/
<
MESSAGE_SI
D
>
.json
Copy code block
1
{
2
"sid"
:
"SM1f0e8ae6ade43cb3c0ce4525424e404f"
,
3
"date_created"
:
"Fri, 13 Aug 2010 01:16:24 +0000"
,
4
"date_updated"
:
"Fri, 13 Aug 2010 01:16:24 +0000"
,
5
"date_sent"
:
null
,
6
"account_sid"
:
"ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
,
7
"to"
:
"+15305431221"
,
8
"from"
:
"+15104564545"
,
9
"body"
:
"A Test Message"
,
10
"status"
:
"queued"
,
11
"flags"
:[
"outbound"
],
12
"api_version"
:
"2010-04-01"
,
13
"price"
:
null
,
14
"uri"
:
"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/SM1f0e8ae6ade43cb3c0ce4525424e404f.json"
15
}
Copy code block
GET
/2010-04-01/Accounts/
<
ACCOUNT_SI
D
>
/Messages/
<
MESSAGE_SI
D
>
.csv
Copy code block
1
Sid,
DateCreated,
DateUpdated,
DateSent,
AccountSid,
To,
From,
Body,
Status,
Flags,ApiVersion,
Price,
Uri
2
SM1f0e8ae6ade43cb3c0ce4525424e404f,
"Fri, 13 Aug 2010 01:16:24 +0000",
"Fri, 13 Aug 2010 01:16:24 +0000",
,
ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,
+15305431221,
+15104564545,
"A Test Message",
queued,
"[outbound]","2010-04-01",
,
"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/SM1f0e8ae6ade43cb3c0ce4525424e404f.json"
Status codes
When you make a request to a Twilio API, it returns an HTTP status code to indicate the result of your request.
Status code
Description
200 OK
Twilio successfully processed the request. The response body contains the requested resource.
201 Created
(For
POST
requests only) Twilio successfully created a new resource. The response body contains the new resource.
202 Accepted
Twilio accepted the request for processing but hasn't completed it yet.
204 No Content
(For
DELETE
requests only) Twilio successfully deleted the resource.
302 Found
Twilio redirected the request. You can retrieve the resource at the URI in the
Location
header.
304 Not modified
The resource hasn't changed. Your client's cached version of the representation is still current.
401 Unauthorized
The credentials you provided are missing or invalid.
404 Not found
Twilio can't find the requested resource.
405 Not allowed
The HTTP method you used isn't allowed for this resource. For example, you're trying to
DELETE
a resource that can't be deleted.
429 Too many requests
You have reached the Twilio
API concurrency limit
.
500 Server error
Twilio encountered an internal error.
503 Service unavailable
The Twilio service is temporarily unavailable. Try again later.
Exceptions
When a request is unsuccessful, Twilio returns an exception with the following information:
Property
Description
status
The HTTP status code for the exception.
message
A detailed description of the exception.
code
(If present) A Twilio-specific error code to help you identify the problem.
more_info
(If present) A URL to Twilio documentation for the error code.
Note
: For XML responses, the exception is wrapped in a
<TwilioResponse>
element. For JSON responses, the exception is returned as a JSON object.
404 Not Found
The following example shows a
404 Not Found
error that occurs when the requested resource doesn't exist:
Requested resource not found
.css-1raivgc{box-sizing:border-box;background-color:inherit;color:inherit;font-family:inherit;line-height:1.75rem;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:0.25rem;}
xml
json
Report code block
Copy code block
1
<
TwilioResponse
>
2
<
RestException
>
3
<
Status
>404</
Status
>
4
<
Message
>The requested resource was not found</
Message
>
5
</
RestException
>
6
</
TwilioResponse
>
400 Bad Request
The following example shows a 400 Bad Request error that occurs when the request is missing a required parameter. The response includes the
code
and
more_info
properties to help you resolve the error.
Bad request
xml
json
Report code block
Copy code block
1
<
TwilioResponse
>
2
<
RestException
>
3
<
Status
>400</
Status
>
4
<
Message
>No to number is specified</
Message
>
5
<
Code
>21201</
Code
>
6
<
MoreInfo
>http://www.twilio.com/docs/errors/21201</
MoreInfo
>
7
</
RestException
>
8
</
TwilioResponse
>
Hypermedia references
To align with the
Hypermedia As The Engine Of Application State (HATEOAS)
principle, the Twilio API responses include URIs to the resources and their related resources. Using the URIs, you can navigate the API and discover related resources.
For List resources, the response includes URIs for pagination. Learn more about
Pagination
.
For Instance resources with subresources, the response includes URIs for those subresources in the
subresource_uris
property.
Hypermedia in Instance Resources
xml
json
Report code block
Copy code block
1
<
TwilioResponse
>
2
<
Call
>
3
<
Sid
>CAe1644a7eed5088b159577c5802d8be38</
Sid
>
4
<
DateCreated
>Tue, 10 Aug 2010 08:02:17 +0000</
DateCreated
>
5
<
DateUpdated
>Tue, 10 Aug 2010 08:02:47 +0000</
DateUpdated
>
6
<
ParentCallSid
/>
7
<
AccountSid
>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
AccountSid
>
8
<
To
>+14153855708</
To
>
9
<
From
>+14158141819</
From
>
10
<
PhoneNumberSid
></
PhoneNumberSid
>
11
<
Status
>completed</
Status
>
12
<
StartTime
>Tue, 10 Aug 2010 08:02:31 +0000</
StartTime
>
13
<
EndTime
>Tue, 10 Aug 2010 08:02:47 +0000</
EndTime
>
14
<
Duration
>16</
Duration
>
15
<
Price
>-0.03000</
Price
>
16
<
Flags
>
17
<
Flag
>outbound-api</
Flag
>
18
</
Flags
>
19
<
ApiVersion
>2008-08-01</
ApiVersion
>
20
<
ForwardedFrom
/>
21
<
CallerName
/>
22
<
Uri
>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAe1644a7eed5088b159577c5802d8be38</
Uri
>
23
<
SubresourceUris
>
24
<
Notifications
>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAe1644a7eed5088b159577c5802d8be38/Notifications</
Notifications
>
25
<
Recordings
>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAe1644a7eed5088b159577c5802d8be38/Recordings</
Recordings
>
26
</
SubresourceUris
>
27
</
Call
>
28
</
TwilioResponse
>
Pagination
The Twilio API supports pagination for resources that return multiple items. When you request a list of resources, Twilio returns partial results in a single page and includes information to help you navigate through the pages of results.
Property
Description
uri
The URI of the current page.
first_page_uri
The URI for the first page of this list.
next_page_uri
The URI for the next page of this list.
previous_page_uri
The URI for the previous page of this list.
page
The current page number. Pages are zero-indexed, so the first page is 0.
page_size
The number of items included in each page of results. The default is
50
.
Pagination
xml
json
Report code block
Copy code block
1
<
TwilioResponse
>
2
<
Calls
page
=
"0"
pagesize
=
"50"
3
uri
=
"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls"
4
firstpageuri
=
"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls?Page=0
&
PageSize=50"
5
previouspageuri
=
""
6
nextpageuri
=
"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls?Page=1
&
PageSize=50
&
AfterSid=CA228399228abecca920de212121"
>
7
<
Call
>
8
<
Sid
>CA92d4405c9237c4ea04b56cbda88e128c</
Sid
>
9
<
DateCreated
>Fri, 13 Aug 2010 01:16:22 +0000</
DateCreated
>
10
<
DateUpdated
>Fri, 13 Aug 2010 01:16:22 +0000</
DateUpdated
>
11
<
ParentCallSid
/>
12
<
AccountSid
>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
AccountSid
>
13
<
To
>+15305431221</
To
>
14
<
From
>+15104563443</
From
>
15
<
PhoneNumberSid
>PNe2d8e63b37f46f2adb16f228afdb9058</
PhoneNumberSid
>
16
<
Status
>queued</
Status
>
17
<
StartTime
/>
18
<
EndTime
/>
19
<
Duration
/>
20
<
Price
/>
21
<
Flags
>
22
<
Flag
>outbound-api</
Flag
>
23
</
Flags
>
24
<
ApiVersion
>2010-04-01</
ApiVersion
> <
ForwardedFrom
/> <
CallerName
/>
25
<
Uri
>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CA92d4405c9237c4ea04b56cbda88e128c</
Uri
>
26
<
SubresourceUris
>
27
<
Notifications
>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CA92d4405c9237c4ea04b56cbda88e128c/Notifications</
Notifications
>
28
<
Recordings
>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CA92d4405c9237c4ea04b56cbda88e128c/Recordings</
Recordings
>
29
</
SubresourceUris
>
30
</
Call
>
31
...
32
</
Calls
>
33
</
TwilioResponse
>
Paging through API resources
(information)
Info
Twilio SDKs
automatically handle pagination. You don't need to explicitly request individual pages when using an SDK to retrieve lists of resources.
To retrieve multiple pages of API results, use the
next_page_uri
parameter provided in the response.
To control the number of items returned in each page, you can use the
page_size
parameter in your request. For example,
GET /2010-04-01/Accounts/<ACCOUNT_SID>/Calls?PageSize=5
limits the number of items to five per page.
Data formats
Phone numbers
Twilio returns all phone numbers in
E.164
format. For example,
+14155554345
. If Twilio can't normalize an incoming caller ID to E.164 format, it returns the raw caller ID string.
Dates and times
Twilio returns all dates and times in GMT using the
RFC 2822
format. For example,
Fri, 20 Aug 2010 01:13:42 +0000
.
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 browsing the
Twilio tag
on Stack Overflow.
Terms of service
Privacy Policy
Copyright © 2026 Twilio Inc.
