import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const callEvents = await client.callEvents.list();
console.log(callEvents.data);{
"data": [
{
"record_type": "call_event",
"call_leg_id": "308fe500-5213-11e9-ace7-02420a0f0668",
"call_session_id": "308fec30-5213-11e9-9d3f-02420a0f0668",
"event_timestamp": "2019-03-29T11:10:19.127783Z",
"name": "call.hangup",
"type": "webhook",
"metadata": {}
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Filters call events by given filter parameters. Events are ordered by occurred_at. If filter for leg_id or application_session_id is not present, it only filters events from the last 24 hours.
Note: Only one filter[occurred_at] can be passed.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const callEvents = await client.callEvents.list();
console.log(callEvents.data);{
"data": [
{
"record_type": "call_event",
"call_leg_id": "308fe500-5213-11e9-ace7-02420a0f0668",
"call_session_id": "308fec30-5213-11e9-9d3f-02420a0f0668",
"event_timestamp": "2019-03-29T11:10:19.127783Z",
"name": "call.hangup",
"type": "webhook",
"metadata": {}
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[application_name][contains], filter[outbound.outbound_voice_profile_id], filter[leg_id], filter[application_session_id], filter[connection_id], filter[product], filter[failed], filter[from], filter[to], filter[name], filter[type], filter[occurred_at][eq/gt/gte/lt/lte], filter[status]
Show child attributes
Application name filters
Show child attributes
If present, applications with <code>application_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.
Identifies the associated outbound voice profile.
"1293384261075731499"
The unique identifier of an individual call leg.
The unique identifier of the call session. A session may include multiple call leg events.
The unique identifier of the conection.
Filter by product.
call_control, fax, texml "texml"
Delivery failed or not.
false
Filter by From number.
"+12025550142"
Filter by To number.
"+12025550142"
If present, conferences will be filtered to those with a matching name attribute. Matching is case-sensitive
Event type
command, webhook "webhook"
Event occurred_at filters
Show child attributes
Event occurred_at: equal
"2019-03-29T11:10:00Z"
Event occurred_at: greater than
"2019-03-29T11:10:00Z"
Event occurred_at: greater than or equal
"2019-03-29T11:10:00Z"
Event occurred_at: lower than
"2019-03-29T11:10:00Z"
Event occurred_at: lower than or equal
"2019-03-29T11:10:00Z"
If present, conferences will be filtered by status.
init, in_progress, completed Consolidated page parameter (deepObject style). Originally: page[after], page[before], page[limit], page[size], page[number]
Show child attributes
Opaque identifier of next page
Opaque identifier of previous page
Limit of records per single page
1 <= x <= 250The size of the page
1 <= x <= 250The page number to load
x >= 1Successful response with a list of call events.
Show child attributes
call_event "call_event"
Uniquely identifies an individual call leg.
"308fe500-5213-11e9-ace7-02420a0f0668"
Uniquely identifies the call control session. A session may include multiple call leg events.
"308fec30-5213-11e9-9d3f-02420a0f0668"
Event timestamp
"2019-03-29T11:10:19.127783Z"
Event name
"call.hangup"
Event type
command, webhook "webhook"
Event metadata, which includes raw event, and extra information based on event type
Was this page helpful?