Skip to contentSkip to navigationSkip to topbar
Rate this Page:

Event Type Resource


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.

(information)

Info


EventType Properties

eventtype-properties page anchor
Resource properties
typetype: stringNot PII

A string that uniquely identifies this Event Type.


schema_idtype: stringNot PII

A string that uniquely identifies the Schema this Event Type adheres to.


date_createdtype: string<DATE TIME>Not PII

The date that this Event Type was created, given in ISO 8601 format.


date_updatedtype: string<DATE TIME>Not PII

The date that this Event Type was updated, given in ISO 8601 format.


descriptiontype: stringNot PII

A human readable description for this Event Type.


urltype: string<URI>Not PII

The URL of this resource.


linkstype: object<URI MAP>Not PII

Fetch an EventType resource

fetch-an-eventtype-resource page anchor
GET https://events.twilio.com/v1/Types/{Type}

Fetch the list of all available event types in ascending order by event type.

Parameters

fetch-parameters page anchor
URI parameters
Typetype: stringNot PII
Path Parameter

A string that uniquely identifies this Event Type.

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

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.events.v1.eventTypes('com.twilio.messaging.message.delivered')
_10
.fetch()
_10
.then(event_type => console.log(event_type.type));

Output

_11
{
_11
"date_created": "2020-08-13T13:28:20Z",
_11
"date_updated": "2020-08-13T13:28:20Z",
_11
"type": "com.twilio.messaging.message.delivered",
_11
"schema_id": "Messaging.MessageStatus",
_11
"description": "Messaging- delivered message",
_11
"url": "https://events.twilio.com/v1/Types/com.twilio.messaging.message.delivered",
_11
"links": {
_11
"schema": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions"
_11
}
_11
}


Read multiple EventType resources

read-multiple-eventtype-resources page anchor
GET https://events.twilio.com/v1/Types

URI parameters
SchemaIdtype: stringNot PII
Query Parameter

A string parameter filtering the results to return only the Event Types using a given schema.


PageSizetype: integerNot PII
Query Parameter

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


Pagetype: integerNot PII
Query Parameter

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


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

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

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

Output

_37
{
_37
"types": [
_37
{
_37
"date_created": "2020-08-13T13:28:20Z",
_37
"date_updated": "2020-08-13T13:28:20Z",
_37
"type": "com.twilio.messaging.message.delivered",
_37
"schema_id": "Messaging.MessageStatus",
_37
"public": true,
_37
"description": "Messaging- delivered message",
_37
"url": "https://events.twilio.com/v1/Types/com.twilio.messaging.message.delivered",
_37
"links": {
_37
"schema": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions"
_37
}
_37
},
_37
{
_37
"date_created": "2020-08-13T13:28:19Z",
_37
"date_updated": "2020-08-13T13:28:19Z",
_37
"type": "com.twilio.messaging.message.failed",
_37
"schema_id": "Messaging.MessageStatus",
_37
"public": true,
_37
"description": "Messaging- failed message",
_37
"url": "https://events.twilio.com/v1/Types/com.twilio.messaging.message.failed",
_37
"links": {
_37
"schema": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions"
_37
}
_37
}
_37
],
_37
"meta": {
_37
"page": 0,
_37
"page_size": 20,
_37
"first_page_url": "https://events.twilio.com/v1/Types?PageSize=20&Page=0",
_37
"previous_page_url": "https://events.twilio.com/v1/Types?PageSize=20&Page=0",
_37
"url": "https://events.twilio.com/v1/Types?PageSize=20&Page=0",
_37
"next_page_url": "https://events.twilio.com/v1/Types?PageSize=20&Page=1",
_37
"key": "types"
_37
}
_37
}


Rate this Page: