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

Call Event Resource



CallEvent Properties

Property nameTypePIIDescription
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.


request

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.


response

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

GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json

Path parameters

Property nameTypeRequiredPIIDescription
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

Query parameters

Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

List multiple CallEvents

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listCallEvent() {
_18
const events = await client
_18
.calls("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.events.list({ limit: 20 });
_18
_18
events.forEach((e) => console.log(e.request));
_18
}
_18
_18
listCallEvent();

Output

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


Rate this page: