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

CustomOperator Subresource


The CustomOperator subresource of the Operator resource represents a Custom Operator.


Custom Properties

custom-properties page anchor
Property nameTypeRequiredDescriptionChild properties
account_sidSID<AC>Optional
Not PII

The unique SID identifier of the Account the Custom Operator belongs to.

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

sidSID<LY>Optional

A 34 character string that uniquely identifies this Custom Operator.

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

friendly_namestringOptional

A human-readable name of this resource, up to 64 characters.


descriptionstringOptional

A human-readable description of this resource, longer than the friendly name.


authorstringOptional

The creator of the Custom Operator. Custom Operators can only be created by a Twilio Account.


operator_typestringOptional

Operator Type for this Operator. References an existing Operator Type resource.


versionintegerOptional

Numeric Custom Operator version. Incremented with each update on the resource, used to ensure integrity when updating the Custom Operator.

Default: 0

availabilityenum<string>Optional

Custom Operator availability status. Possible values: internal, beta, public, retired.

Possible values:
internalbetapublicretired

configobjectOptional

Operator configuration, following the schema defined by the Operator Type. Only available on Operators created by the Account.


date_createdstring<date-time>Optional

The date that this Custom Operator was created, given in ISO 8601 format.


date_updatedstring<date-time>Optional

The date that this Custom Operator was updated, given in ISO 8601 format.


urlstring<uri>Optional

The URL of this resource.


Create a Custom Operator

create-a-custom-operator page anchor
POST https://intelligence.twilio.com/v2/Operators/Custom

This endpoint creates a new Custom Operator for an Account.

Request body parameters

request-body-parameters page anchor
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
FriendlyNamestringrequired

A human readable description of the new Operator, up to 64 characters.


OperatorTypestringrequired

Operator Type for this Operator. References an existing Operator Type resource.


Configobjectrequired

Operator configuration, following the schema defined by the Operator Type.

Create a Custom

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

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function createCustomOperator() {
_20
const customOperator = await client.intelligence.v2.customOperators.create({
_20
config: {},
_20
friendlyName: "FriendlyName",
_20
operatorType: "OperatorType",
_20
});
_20
_20
console.log(customOperator.accountSid);
_20
}
_20
_20
createCustomOperator();

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"friendly_name": "FriendlyName",
_18
"description": "New Operator",
_18
"author": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"operator_type": "OperatorType",
_18
"version": 1,
_18
"availability": "public",
_18
"config": {
_18
"configuration": {
_18
"field": "value"
_18
}
_18
},
_18
"date_created": "2010-08-31T20:36:28Z",
_18
"date_updated": "2010-08-31T20:36:28Z",
_18
"url": "https://intelligence.twilio.com/v2/Operators/Custom/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_18
}


GET https://intelligence.twilio.com/v2/Operators/Custom/{Sid}

This endpoint retrieves the details of a Custom Operator using its SID.

Property nameTypeRequiredPIIDescription
SidSID<LY>required

A 34 character string that uniquely identifies this Custom Operator.

Pattern: ^LY[0-9a-fA-F]{32}$Min length: 34Max length: 34
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 fetchCustomOperator() {
_18
const customOperator = await client.intelligence.v2
_18
.customOperators("LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.fetch();
_18
_18
console.log(customOperator.accountSid);
_18
}
_18
_18
fetchCustomOperator();

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"friendly_name": "My New Operator",
_18
"description": "New Operator",
_18
"author": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"operator_type": "operator-type-name",
_18
"version": 1,
_18
"availability": "public",
_18
"config": {
_18
"configuration": {
_18
"field": "value"
_18
}
_18
},
_18
"date_created": "2010-08-31T20:36:28Z",
_18
"date_updated": "2010-08-31T20:36:28Z",
_18
"url": "https://intelligence.twilio.com/v2/Operators/Custom/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_18
}


GET https://intelligence.twilio.com/v2/Operators/Custom

This endpoint lists all available Custom Operators for an Account, with optional filtering.

Property nameTypeRequiredPIIDescription
Availabilityenum<string>Optional

Returns Custom Operators with the provided availability type. Possible values: internal, beta, public, retired.

Possible values:
internalbetapublicretired

LanguageCodestringOptional

Returns Custom Operators that support the provided language code.


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.

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 listCustomOperator() {
_18
const customOperators = await client.intelligence.v2.customOperators.list({
_18
limit: 20,
_18
});
_18
_18
customOperators.forEach((c) => console.log(c.accountSid));
_18
}
_18
_18
listCustomOperator();

Output

_31
{
_31
"operators": [
_31
{
_31
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_31
"sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_31
"friendly_name": "My New Operator",
_31
"description": "New Operator",
_31
"author": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_31
"operator_type": "operator-type-name",
_31
"version": 1,
_31
"availability": "public",
_31
"config": {
_31
"configuration": {
_31
"field": "value"
_31
}
_31
},
_31
"date_created": "2010-08-31T20:36:28Z",
_31
"date_updated": "2010-08-31T20:36:28Z",
_31
"url": "https://intelligence.twilio.com/v2/Operators/Custom/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_31
}
_31
],
_31
"meta": {
_31
"first_page_url": "https://intelligence.twilio.com/v2/Operators/Custom?LanguageCode=en&Availability=public&PageSize=50&Page=0",
_31
"key": "operators",
_31
"next_page_url": null,
_31
"page": 0,
_31
"page_size": 50,
_31
"previous_page_url": null,
_31
"url": "https://intelligence.twilio.com/v2/Operators/Custom?LanguageCode=en&Availability=public&PageSize=50&Page=0"
_31
}
_31
}


Update a Custom Operator

update-a-custom-operator page anchor
POST https://intelligence.twilio.com/v2/Operators/Custom/{Sid}

This endpoint updates a Custom Operator.

Property nameTypeRequiredPIIDescription
If-MatchstringOptional

The If-Match HTTP request header

Property nameTypeRequiredPIIDescription
SidSID<LY>required

A 34 character string that uniquely identifies this Custom Operator.

Pattern: ^LY[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
FriendlyNamestringrequired

A human-readable name of this resource, up to 64 characters.


Configobjectrequired

Operator configuration, following the schema defined by the Operator Type.

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 updateCustomOperator() {
_21
const customOperator = await client.intelligence.v2
_21
.customOperators("LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_21
.update({
_21
config: {},
_21
friendlyName: "FriendlyName",
_21
});
_21
_21
console.log(customOperator.accountSid);
_21
}
_21
_21
updateCustomOperator();

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"friendly_name": "FriendlyName",
_18
"description": "My New Operator",
_18
"author": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"operator_type": "operator-type-name",
_18
"version": 2,
_18
"availability": "public",
_18
"config": {
_18
"configuration": {
_18
"field": "value"
_18
}
_18
},
_18
"date_created": "2010-08-31T20:36:28Z",
_18
"date_updated": "2010-08-31T20:36:28Z",
_18
"url": "https://intelligence.twilio.com/v2/Operators/Custom/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_18
}


Delete a Custom Operator

delete-a-custom-operator page anchor
DELETE https://intelligence.twilio.com/v2/Operators/Custom/{Sid}

This endpoint deletes a Custom Operator.

Property nameTypeRequiredPIIDescription
SidSID<LY>required

A 34 character string that uniquely identifies this Custom Operator.

Pattern: ^LY[0-9a-fA-F]{32}$Min length: 34Max length: 34
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
async function deleteCustomOperator() {
_16
await client.intelligence.v2
_16
.customOperators("LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.remove();
_16
}
_16
_16
deleteCustomOperator();


Rate this page: