Schema Version resource
Property nameTypeRequiredPIIDescriptionChild properties
The unique identifier of the schema. Each schema can have multiple versions, that share the same id.
The date the schema version was created, given in ISO 8601 format.
GET https://events.twilio.com/v1/Schemas/{Id}/Versions/{SchemaVersion}
Property nameTypeRequiredPIIDescription
The unique identifier of the schema. Each schema can have multiple versions, that share the same id.
The version of the schema
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 at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function fetchSchemaVersion() {14const version = await client.events.v115.schemas("Messaging.MessageStatus")16.versions(42)17.fetch();1819console.log(version.id);20}2122fetchSchemaVersion();
Response
1{2"id": "Messaging.MessageStatus",3"schema_version": 42,4"date_created": "2015-07-30T20:00:00Z",5"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions/1",6"raw": "https://events-schemas.twilio.com/Messaging.MessageStatus/1"7}
GET https://events.twilio.com/v1/Schemas/{Id}/Versions
Property nameTypeRequiredPIIDescription
The unique identifier of the schema. Each schema can have multiple versions, that share the same id.
Property nameTypeRequiredPIIDescription
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum:
1Maximum: 1000The 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 at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function listSchemaVersion() {14const versions = await client.events.v115.schemas("Id")16.versions.list({ limit: 20 });1718versions.forEach((v) => console.log(v.id));19}2021listSchemaVersion();
Response
1{2"schema_versions": [3{4"id": "Messaging.MessageStatus",5"schema_version": 1,6"date_created": "2015-07-30T20:00:00Z",7"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions/1",8"raw": "https://events-schemas.twilio.com/Messaging.MessageStatus/1"9},10{11"id": "Messaging.MessageStatus",12"schema_version": 2,13"date_created": "2015-07-30T20:00:00Z",14"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions/2",15"raw": "https://events-schemas.twilio.com/Messaging.MessageStatus/2"16}17],18"meta": {19"page": 0,20"page_size": 50,21"first_page_url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions?PageSize=50&Page=0",22"previous_page_url": null,23"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions?PageSize=50&Page=0",24"next_page_url": null,25"key": "schema_versions"26}27}