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.
The unique string that we created to identify the Flex Plugin Version resource.
^FV[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Flex Plugin resource this Flex Plugin Version belongs to.
^FP[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Flex Plugin Version resource and owns this resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The URL of where the Flex Plugin Version JavaScript bundle is hosted on.
A changelog that describes the changes this Flex Plugin Version brings.
Whether the Flex Plugin Version is validated. The default value is false.
Whether the Flex Plugin Version is archived. The default value is false.
The date and time in GMT when the Flex Plugin Version was created specified in ISO 8601 format.
The absolute URL of the Flex Plugin Version resource.
POST https://flex-api.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions
The Flex-Metadata HTTP request header
The SID of the Flex Plugin the resource to belongs to.
application/x-www-form-urlencoded
The validation status of the plugin, indicating whether it has been validated
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 createPluginVersion() {11const pluginVersion = await client.flexApi.v112.plugins("PluginSid")13.pluginVersions.create({14pluginUrl: "https://www.example.com",15version: "Version",16});1718console.log(pluginVersion.sid);19}2021createPluginVersion();
1{2"sid": "FVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"plugin_sid": "PluginSid",5"version": "Version",6"plugin_url": "https://www.example.com",7"changelog": "the changelog",8"private": true,9"archived": false,10"validated": false,11"date_created": "2020-01-10T20:00:00Z",12"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions/FVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"13}
GET https://flex-api.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions/{Sid}
The Flex-Metadata HTTP request header
The SID of the Flex Plugin Version resource to fetch.
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 fetchPluginVersion() {11const pluginVersion = await client.flexApi.v112.plugins("PluginSid")13.pluginVersions("Sid")14.fetch();1516console.log(pluginVersion.sid);17}1819fetchPluginVersion();
1{2"sid": "Sid",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"plugin_sid": "PluginSid",5"version": "1.0.0",6"plugin_url": "https://sample.twil.io/plugin.js",7"changelog": "the changelog",8"private": false,9"archived": false,10"validated": false,11"date_created": "2020-01-10T20:00:00Z",12"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions/FVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"13}
GET https://flex-api.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions
The Flex-Metadata HTTP request header
The SID of the Flex Plugin the resource to belongs to.
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 listPluginVersion() {11const pluginVersions = await client.flexApi.v112.plugins("PluginSid")13.pluginVersions.list({ limit: 20 });1415pluginVersions.forEach((p) => console.log(p.sid));16}1718listPluginVersion();
1{2"plugin_versions": [],3"meta": {4"page": 0,5"page_size": 50,6"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions?PageSize=50&Page=0",7"previous_page_url": null,8"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Versions?PageSize=50&Page=0",9"next_page_url": null,10"key": "plugin_versions"11}12}