Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM

On this page
Looking for more inspiration?Visit the

Plugin Release Resource


The Plugin Release resource lets you set a Configuration active on a Flex project. A Flex project can have multiple Plugins with different Versions. When you're confident that your Plugins all work properly and are ready for production, you can create a release to push the changes to your contact center.

This allows you to audit when a Flex project changed and rollback your changes when necessary. Releases are immutable and irreversible. A rollback requires a new Release using a previous Configuration.


Release Properties

release-properties page anchor
Property nameTypeRequiredPIIDescriptionChild properties
sidSID<FK>

Optional

Not PII

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

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

accountSidSID<AC>

Optional

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

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

configurationSidSID<FJ>

Optional

The SID of the Plugin Configuration resource to release.

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

urlstring<uri>

Optional

The absolute URL of the Plugin Release resource.


Create a PluginRelease resource

create-a-pluginrelease-resource page anchor

POST https://flex-api.twilio.com/v1/PluginService/Releases

Headers

headers page anchor
Property nameTypeRequiredPIIDescription
flex-Metadatastring

Optional

The Flex-Metadata HTTP request header

Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
configurationIdstring
required

The SID or the Version of the Flex Plugin Configuration to release.

Create a Plugin ReleaseLink to code sample: Create a Plugin Release
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createPluginRelease() {
11
const pluginRelease = await client.flexApi.v1.pluginReleases.create({
12
configurationId: "ConfigurationId",
13
});
14
15
console.log(pluginRelease.sid);
16
}
17
18
createPluginRelease();

Response

Note about this response
1
{
2
"sid": "FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"date_created": "2020-01-10T20:00:00Z",
6
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
7
}

Fetch a PluginRelease resource

fetch-a-pluginrelease-resource page anchor

GET https://flex-api.twilio.com/v1/PluginService/Releases/{Sid}

Property nameTypeRequiredPIIDescription
flex-Metadatastring

Optional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
sidstring
required

The SID of the Flex Plugin Release resource to fetch.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchPluginRelease() {
11
const pluginRelease = await client.flexApi.v1.pluginReleases("Sid").fetch();
12
13
console.log(pluginRelease.sid);
14
}
15
16
fetchPluginRelease();

Response

Note about this response
1
{
2
"sid": "Sid",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"date_created": "2020-01-10T20:00:00Z",
6
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
7
}

Read multiple PluginRelease resources

read-multiple-pluginrelease-resources page anchor

GET https://flex-api.twilio.com/v1/PluginService/Releases

Property nameTypeRequiredPIIDescription
flex-Metadatastring

Optional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
pageSizeinteger<int64>

Optional

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

Minimum: 1Maximum: 1000

pageinteger

Optional

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

Minimum: 0

pageTokenstring

Optional

The page token. This is provided by the API.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listPluginRelease() {
11
const pluginReleases = await client.flexApi.v1.pluginReleases.list({
12
limit: 20,
13
});
14
15
pluginReleases.forEach((p) => console.log(p.sid));
16
}
17
18
listPluginRelease();

Response

Note about this response
1
{
2
"releases": [],
3
"meta": {
4
"page": 0,
5
"page_size": 50,
6
"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Releases?PageSize=50&Page=0",
7
"previous_page_url": null,
8
"url": "https://flex-api.twilio.com/v1/PluginService/Releases?PageSize=50&Page=0",
9
"next_page_url": null,
10
"key": "releases"
11
}
12
}