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

Plugin Resource


A Plugin is a resource that contains information about a given plugin, like its name, description, and the account that owns the plugin.

While the Plugin Version Resource contains information on the actual source code for a deployed Plugin, the Plugin Resource serves as an identifier for the Plugin itself. For example, you might have a CRM plugin. You can use the Plugin Resource to describe the plugin itself, and then a series of Plugin Versions to reference the source code of your various iterations of the Plugin.


Plugin Properties

plugin-properties page anchor
Resource properties
sidtype: SID<FP>Not PII

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


unique_nametype: stringPII MTL: 30 days

The name that uniquely identifies this Flex Plugin resource.


friendly_nametype: stringPII MTL: 30 days

The friendly name this Flex Plugin resource.


descriptiontype: stringPII MTL: 30 days

A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long


archivedtype: booleanNot PII

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


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT-7 when the Flex Plugin was created specified in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT-7 when the Flex Plugin was last updated specified in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The absolute URL of the Flex Plugin resource.


linkstype: object<URI MAP>Not PII

Create a Plugin resource

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

Parameters

create-parameters page anchor
Request headers
Flex-Metadatatype: stringNot PII

The Flex-Metadata HTTP request header


Request body parameters
UniqueNametype: stringPII MTL: 30 days
Required

The Flex Plugin's unique name.


FriendlyNametype: stringPII MTL: 30 days

The Flex Plugin's friendly name.


Descriptiontype: stringPII MTL: 30 days

A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.flexApi.v1.plugins
_10
.create({uniqueName: 'unique_name'})
_10
.then(plugin => console.log(plugin.sid));

Output

_14
{
_14
"sid": "FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"unique_name": "unique-name",
_14
"friendly_name": "friendly name",
_14
"description": "description",
_14
"archived": false,
_14
"date_created": "2020-01-10T20:00:00Z",
_14
"date_updated": "2020-01-10T20:00:00Z",
_14
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"links": {
_14
"plugin_versions": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions"
_14
}
_14
}


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

Request headers
Flex-Metadatatype: stringNot PII

The Flex-Metadata HTTP request header


URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the Flex Plugin resource to fetch.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.flexApi.v1.plugins('FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(plugin => console.log(plugin.uniqueName));

Output

_14
{
_14
"sid": "FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"unique_name": "unique-name",
_14
"friendly_name": "friendly name",
_14
"description": "description",
_14
"archived": false,
_14
"date_created": "2020-01-10T20:00:00Z",
_14
"date_updated": "2020-01-10T20:00:00Z",
_14
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"links": {
_14
"plugin_versions": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions"
_14
}
_14
}


Read multiple Plugin resources

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

Request headers
Flex-Metadatatype: stringNot PII

The Flex-Metadata HTTP request header


URI parameters
PageSizetype: integerNot PII
Query Parameter

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


Pagetype: integerNot PII
Query Parameter

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


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.flexApi.v1.plugins
_10
.list({limit: 20})
_10
.then(plugins => plugins.forEach(p => console.log(p.sid)));

Output

_27
{
_27
"plugins": [
_27
{
_27
"sid": "FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"unique_name": "unique-name",
_27
"friendly_name": "friendly name",
_27
"description": "description",
_27
"archived": false,
_27
"date_created": "2020-01-10T20:00:00Z",
_27
"date_updated": "2020-01-10T20:00:00Z",
_27
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"links": {
_27
"plugin_versions": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions"
_27
}
_27
}
_27
],
_27
"meta": {
_27
"page": 0,
_27
"page_size": 50,
_27
"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins?PageSize=50&Page=0",
_27
"previous_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins?PageSize=50&Page=0",
_27
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins?PageSize=50&Page=0",
_27
"next_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins?PageSize=50&Page=1",
_27
"key": "plugins"
_27
}
_27
}


Update a Plugin resource

update-a-plugin-resource page anchor
POST https://flex-api.twilio.com/v1/PluginService/Plugins/{Sid}

Request headers
Flex-Metadatatype: stringNot PII

The Flex-Metadata HTTP request header


URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the Flex Plugin resource to update.


Request body parameters
FriendlyNametype: stringPII MTL: 30 days

The Flex Plugin's friendly name.


Descriptiontype: stringPII MTL: 30 days

A descriptive string that you update to describe the plugin resource. It can be up to 500 characters long

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.flexApi.v1.plugins('FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.update({friendlyName: 'friendly_name'})
_10
.then(plugin => console.log(plugin.uniqueName));

Output

_14
{
_14
"sid": "FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"unique_name": "unique-name",
_14
"friendly_name": "friendly name update",
_14
"description": "description update",
_14
"archived": false,
_14
"date_created": "2020-01-10T20:00:00Z",
_14
"date_updated": "2020-01-10T20:00:00Z",
_14
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"links": {
_14
"plugin_versions": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions"
_14
}
_14
}


Rate this page: