Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Call Event Resource



CallEvent Properties

callevent-properties page anchor
requestobject
PII MTL: 30 days

Contains a dictionary representing the request of the call.


responseobject

Contains a dictionary representing the call response, including a list of the call events.


The request property represents the request that Twilio made to your application. It contains the url, method, and parameters.

(information)

Info

The parameters property keys are presented in snake_case format, lower cased and words separated by underscores.

For example, the results from your AddOns will be found under the key add_ons.


The response property represents what your application sent back to Twilio. It contains date_created, request_duration, response_code, content_type, and response_body.

You can use this information to ensure you are producing the intended Voice TwiML.


Read multiple CallEvent resources

read-multiple-callevent-resources page anchor
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json

Path parameters

path-parameters page anchor
AccountSidSID<AC>required
Not PII

The unique SID identifier of the Account.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

CallSidSID<CA>required

The unique SID identifier of the Call.

Pattern: ^CA[0-9a-fA-F]{32}$Min length: 34Max length: 34
PageSizeinteger

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

Pageinteger

The page index. This value is simply for client state.

Minimum: 0

PageTokenstring

The page token. This is provided by the API.

List multiple CallEvents

list-multiple-callevents page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.events
_11
.list({limit: 20})
_11
.then(events => events.forEach(e => console.log(e.request)));

Output

_38
{
_38
"events": [
_38
{
_38
"request": {
_38
"method": "POST",
_38
"url": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
_38
"parameters": {
_38
"status_callback_method": "POST",
_38
"twiml": "<Response><Say>Hi!</Say></Response>",
_38
"trim": "trim-silence",
_38
"timeout": "55",
_38
"method": "POST",
_38
"from": "+987654321",
_38
"to": "+123456789",
_38
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_38
"machine_detection_timeout": "0"
_38
}
_38
},
_38
"response": {
_38
"response_code": 201,
_38
"request_duration": 50,
_38
"content_type": "application/json",
_38
"response_body": {
_38
"sid": "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_38
},
_38
"date_created": "Tue, 11 Aug 2020 17:44:08 +0000"
_38
}
_38
}
_38
],
_38
"end": 0,
_38
"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=0",
_38
"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=50",
_38
"page": 0,
_38
"page_size": 50,
_38
"previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=0",
_38
"start": 0,
_38
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=0"
_38
}


Rate this page: