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

Plugin Version Resource


A Plugin Version contains all the information about a particular version of a Plugin. Some notable fields include the URL to the plugin package, the version number and what plugin is it the version of.

Providing a URL to the built package in the plugin version provides you the flexibility of hosting your package in the software of your choice.


PluginVersion Properties

pluginversion-properties page anchor
Property nameTypePIIDescription
sidSID<FV>
Not PII

The unique string that we created to identify the Flex Plugin Version resource.

Pattern: ^FV[0-9a-fA-F]{32}$Min length: 34Max length: 34

plugin_sidSID<FP>

The SID of the Flex Plugin resource this Flex Plugin Version belongs to.

Pattern: ^FP[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>

The SID of the Account that created the Flex Plugin Version resource and owns this resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

versionstring

The unique version of this Flex Plugin Version.


plugin_urlstring<uri>
PII MTL: 30 days

The URL of where the Flex Plugin Version JavaScript bundle is hosted on.


changelogstring

A changelog that describes the changes this Flex Plugin Version brings.


privateboolean

Whether the Flex Plugin Version is validated. The default value is false.


archivedboolean

Whether the Flex Plugin Version is archived. The default value is false.


validatedboolean

urlstring<uri>

The absolute URL of the Flex Plugin Version resource.


Create a PluginVersion resource

create-a-pluginversion-resource page anchor
POST https://flex.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions

Headers

headers page anchor
Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
PluginSidstringrequired

The SID of the Flex Plugin the resource to belongs to.

Property nameTypeRequiredPIIDescription
Versionstringrequired

The Flex Plugin Version's version.


PluginUrlstring<uri>required

The URL of the Flex Plugin Version bundle


ChangelogstringOptional

The changelog of the Flex Plugin Version.


PrivatebooleanOptional

Whether this Flex Plugin Version requires authorization.


CliVersionstringOptional

The version of Flex Plugins CLI used to create this plugin


ValidateStatusstringOptional

The validation status of the plugin, indicating whether it has been validated

Create a PluginVersion

create-a-pluginversion page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createPluginVersion() {
_21
const pluginVersion = await client.flexApi.v1
_21
.plugins("PluginSid")
_21
.pluginVersions.create({
_21
pluginUrl: "https://www.example.com",
_21
version: "Version",
_21
});
_21
_21
console.log(pluginVersion.sid);
_21
}
_21
_21
createPluginVersion();

Output

_13
{
_13
"sid": "FVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"plugin_sid": "PluginSid",
_13
"version": "Version",
_13
"plugin_url": "https://www.example.com",
_13
"changelog": "the changelog",
_13
"private": true,
_13
"archived": false,
_13
"validated": false,
_13
"date_created": "2020-01-10T20:00:00Z",
_13
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions/FVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_13
}


Fetch a PluginVersion resource

fetch-a-pluginversion-resource page anchor
GET https://flex.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions/{Sid}

Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
PluginSidstringrequired

The SID of the Flex Plugin the resource to belongs to.


Sidstringrequired

The SID of the Flex Plugin Version resource to fetch.

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 fetchPluginVersion() {
_19
const pluginVersion = await client.flexApi.v1
_19
.plugins("PluginSid")
_19
.pluginVersions("Sid")
_19
.fetch();
_19
_19
console.log(pluginVersion.sid);
_19
}
_19
_19
fetchPluginVersion();

Output

_13
{
_13
"sid": "Sid",
_13
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"plugin_sid": "PluginSid",
_13
"version": "1.0.0",
_13
"plugin_url": "https://sample.twil.io/plugin.js",
_13
"changelog": "the changelog",
_13
"private": false,
_13
"archived": false,
_13
"validated": false,
_13
"date_created": "2020-01-10T20:00:00Z",
_13
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions/FVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_13
}


Read multiple PluginVersion resources

read-multiple-pluginversion-resources page anchor
GET https://flex.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions

Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
PluginSidstringrequired

The SID of the Flex Plugin the resource to belongs to.

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.

List multiple PluginVersions

list-multiple-pluginversions page anchor
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 listPluginVersion() {
_18
const pluginVersions = await client.flexApi.v1
_18
.plugins("PluginSid")
_18
.pluginVersions.list({ limit: 20 });
_18
_18
pluginVersions.forEach((p) => console.log(p.sid));
_18
}
_18
_18
listPluginVersion();

Output

_12
{
_12
"plugin_versions": [],
_12
"meta": {
_12
"page": 0,
_12
"page_size": 50,
_12
"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions?PageSize=50&Page=0",
_12
"previous_page_url": null,
_12
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions?PageSize=50&Page=0",
_12
"next_page_url": null,
_12
"key": "plugin_versions"
_12
}
_12
}


Rate this page: