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

Schema Version Resource



SchemaVersion Properties

schemaversion-properties page anchor
Property nameTypePIIDescription
idstring
Not PII

The unique identifier of the schema. Each schema can have multiple versions, that share the same id.


schema_versioninteger

The version of this schema.


date_createdstring<date-time>

The date the schema version was created, given in ISO 8601 format.


urlstring<uri>

The URL of this resource.


rawstring<uri>

Fetch a SchemaVersion resource

fetch-a-schemaversion-resource page anchor
GET https://events.twilio.com/v1/Schemas/{Id}/Versions/{SchemaVersion}

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
Idstringrequired

The unique identifier of the schema. Each schema can have multiple versions, that share the same id.


SchemaVersionintegerrequired

The version of the schema

Fetch Schema Version

fetch-schema-version page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function fetchSchemaVersion() {
_19
const version = await client.events.v1
_19
.schemas("Messaging.MessageStatus")
_19
.versions(551)
_19
.fetch();
_19
_19
console.log(version.id);
_19
}
_19
_19
fetchSchemaVersion();

Output

_10
{
_10
"id": "Messaging.MessageStatus",
_10
"schema_version": 551,
_10
"public": true,
_10
"date_created": "2015-07-30T20:00:00Z",
_10
"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions/1",
_10
"raw": "https://events-schemas.twilio.com/Messaging.MessageStatus/1"
_10
}


Read multiple SchemaVersion resources

read-multiple-schemaversion-resources page anchor
GET https://events.twilio.com/v1/Schemas/{Id}/Versions

Property nameTypeRequiredPIIDescription
Idstringrequired

The unique identifier of the schema. Each schema can have multiple versions, that share the same id.

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.

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 listSchemaVersion() {
_18
const versions = await client.events.v1
_18
.schemas("Id")
_18
.versions.list({ limit: 20 });
_18
_18
versions.forEach((v) => console.log(v.id));
_18
}
_18
_18
listSchemaVersion();

Output

_29
{
_29
"schema_versions": [
_29
{
_29
"id": "Messaging.MessageStatus",
_29
"schema_version": 1,
_29
"public": true,
_29
"date_created": "2015-07-30T20:00:00Z",
_29
"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions/1",
_29
"raw": "https://events-schemas.twilio.com/Messaging.MessageStatus/1"
_29
},
_29
{
_29
"id": "Messaging.MessageStatus",
_29
"schema_version": 2,
_29
"public": true,
_29
"date_created": "2015-07-30T20:00:00Z",
_29
"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions/2",
_29
"raw": "https://events-schemas.twilio.com/Messaging.MessageStatus/2"
_29
}
_29
],
_29
"meta": {
_29
"page": 0,
_29
"page_size": 50,
_29
"first_page_url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions?PageSize=50&Page=0",
_29
"previous_page_url": null,
_29
"url": "https://events.twilio.com/v1/Schemas/Messaging.MessageStatus/Versions?PageSize=50&Page=0",
_29
"next_page_url": null,
_29
"key": "schema_versions"
_29
}
_29
}


Rate this page: