Event types describe the various kinds of events that are accessible through the Event Streams APIs. Each Event Type resource includes a reference to the schema which defines the event type that the resource represents. See the Schema resource documentation for more information.
Not seeing an event type you would like to configure? Submit an event type request.
A string that uniquely identifies the Schema this Event Type adheres to.
The date that this Event Type was created, given in ISO 8601 format.
The date that this Event Type was updated, given in ISO 8601 format.
A string that describes how this Event Type can be used. For example: available
, deprecated
, restricted
, discontinued
. When the status is available
, the Event Type can be used normally.
The URL to the documentation or to the most relevant Twilio Changelog entry of this Event Type.
GET https://events.twilio.com/v1/Types/{Type}
Fetch the list of all available event types in ascending order by event type.
A string that uniquely identifies this Event Type.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchEventType() {11const eventType = await client.events.v112.eventTypes("com.twilio.messaging.message.delivered")13.fetch();1415console.log(eventType.type);16}1718fetchEventType();
1{2"date_created": "2020-08-13T13:28:20Z",3"date_updated": "2020-08-13T13:28:20Z",4"type": "com.twilio.messaging.message.delivered",5"schema_id": "Messaging.MessageStatus",6"public": true,7"status": "available",8"documentation_url": "/docs/voice/voice-insights/event-streams",9"description": "Messaging- delivered message",10"url": "https://events.twilio.com/v1/Types/com.twilio.messaging.message.delivered",11"links": {12"schema": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions"13}14}
GET https://events.twilio.com/v1/Types
A string parameter filtering the results to return only the Event Types using a given schema.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listEventType() {11const eventTypes = await client.events.v1.eventTypes.list({ limit: 20 });1213eventTypes.forEach((e) => console.log(e.type));14}1516listEventType();
1{2"types": [3{4"date_created": "2020-08-13T13:28:20Z",5"date_updated": "2020-08-13T13:28:20Z",6"type": "com.twilio.messaging.message.delivered",7"schema_id": "Messaging.MessageStatus",8"public": true,9"status": "available",10"documentation_url": null,11"description": "Messaging- delivered message",12"url": "https://events.twilio.com/v1/Types/com.twilio.messaging.message.delivered",13"links": {14"schema": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions"15}16},17{18"date_created": "2020-08-13T13:28:19Z",19"date_updated": "2020-08-13T13:28:19Z",20"type": "com.twilio.messaging.message.failed",21"schema_id": "Messaging.MessageStatus",22"public": true,23"status": "deprecated",24"documentation_url": "/docs/voice/voice-insights/event-streams",25"description": "Messaging- failed message",26"url": "https://events.twilio.com/v1/Types/com.twilio.messaging.message.failed",27"links": {28"schema": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions"29}30}31],32"meta": {33"page": 0,34"page_size": 20,35"first_page_url": "https://events.twilio.com/v1/Types?PageSize=20&Page=0",36"previous_page_url": null,37"url": "https://events.twilio.com/v1/Types?PageSize=20&Page=0",38"next_page_url": null,39"key": "types"40}41}