Skip to contentSkip to navigationSkip to topbar
On this page

Plugin Configuration Resource


Configurations contain a snapshot of your contact center's customizations so that it can be audited or rolled back. It is a package of your plugin versions that you bundle together for a release. Configurations contain Plugin Version SIDs and are defined as a list of JSON strings. For example:

[{"plugin_version": "FV00000000000000000000000000000000"}, {"plugin_version": "FV00000000000000000000000000000001"}]

Configurations are immutable; in order to update your contact center's Configuration, you must create a new Configuration.


Configuration Properties

configuration-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<FJ>Optional
Not PII

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

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

account_sidSID<AC>Optional

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

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

namestringOptional

The name of this Flex Plugin Configuration.


descriptionstringOptional
PII MTL: 30 days

The description of the Flex Plugin Configuration resource.


archivedbooleanOptional

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


date_createdstring<date-time>Optional

urlstring<uri>Optional

The absolute URL of the Flex Plugin Configuration resource.


linksobject<uri-map>Optional

Create a PluginConfiguration resource

create-a-pluginconfiguration-resource page anchor
POST https://flex-api.twilio.com/v1/PluginService/Configurations

Headers

headers page anchor
Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
Namestringrequired

The Flex Plugin Configuration's name.


PluginsarrayOptional

A list of objects that describe the plugin versions included in the configuration. Each object contains the sid of the plugin version.


DescriptionstringOptional

The Flex Plugin Configuration's description.

Create a Configuration with a single PluginLink to code sample: Create a Configuration with a single Plugin
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 createPluginConfiguration() {
11
const pluginConfiguration =
12
await client.flexApi.v1.pluginConfigurations.create({
13
name: "Name",
14
plugins: [
15
{
16
plugin_version: "FV00000000000000000000000000000000",
17
},
18
],
19
});
20
21
console.log(pluginConfiguration.sid);
22
}
23
24
createPluginConfiguration();

Output

1
{
2
"sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"name": "Name",
5
"description": "description",
6
"archived": false,
7
"date_created": "2020-01-10T20:00:00Z",
8
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"links": {
10
"plugins": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins"
11
}
12
}
Create a Configuration with multiple PluginsLink to code sample: Create a Configuration with multiple Plugins
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 createPluginConfiguration() {
11
const pluginConfiguration =
12
await client.flexApi.v1.pluginConfigurations.create({
13
name: "Name",
14
plugins: [
15
{
16
plugin_version: "FV00000000000000000000000000000000",
17
},
18
{
19
plugin_version: "FV00000000000000000000000000000001",
20
},
21
],
22
});
23
24
console.log(pluginConfiguration.sid);
25
}
26
27
createPluginConfiguration();

Output

1
{
2
"sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"name": "Name",
5
"description": "description",
6
"archived": false,
7
"date_created": "2020-01-10T20:00:00Z",
8
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"links": {
10
"plugins": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins"
11
}
12
}

Fetch a PluginConfiguration resource

fetch-a-pluginconfiguration-resource page anchor
GET https://flex-api.twilio.com/v1/PluginService/Configurations/{Sid}

Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
SidSID<FJ>required

The SID of the Flex Plugin Configuration resource to fetch.

Pattern: ^FJ[0-9a-fA-F]{32}$Min length: 34Max length: 34
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 fetchPluginConfiguration() {
11
const pluginConfiguration = await client.flexApi.v1
12
.pluginConfigurations("FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.fetch();
14
15
console.log(pluginConfiguration.sid);
16
}
17
18
fetchPluginConfiguration();

Output

1
{
2
"sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"name": "some name",
5
"description": "description",
6
"archived": false,
7
"date_created": "2020-01-10T20:00:00Z",
8
"url": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"links": {
10
"plugins": "https://flex-api.twilio.com/v1/PluginService/Configurations/FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Plugins"
11
}
12
}

Read multiple PluginConfiguration resources

read-multiple-pluginconfiguration-resources page anchor
GET https://flex-api.twilio.com/v1/PluginService/Configurations

Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

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.

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 listPluginConfiguration() {
11
const pluginConfigurations =
12
await client.flexApi.v1.pluginConfigurations.list({ limit: 20 });
13
14
pluginConfigurations.forEach((p) => console.log(p.sid));
15
}
16
17
listPluginConfiguration();

Output

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

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.