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.


CustomOperator Properties

customoperator-properties page anchor
Property nameTypePIIDescription
account_sidSID<AC>
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>

A 34 character string that uniquely identifies this Custom Operator.

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

friendly_namestring

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


descriptionstring

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


authorstring

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


operator_typestring

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


versioninteger

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


availabilityenum<string>

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

Possible values:
internalbetapublicretired

configobject

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


date_createdstring<date-time>

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


date_updatedstring<date-time>

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


urlstring<uri>

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
Property nameTypeRequiredPIIDescription
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 CustomOperator

create-a-customoperator page anchor
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
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
const customOperator = await client.intelligence.v2.customOperators.create({
_16
config: {},
_16
friendlyName: "FriendlyName",
_16
operatorType: "OperatorType",
_16
});
_16
_16
console.log(customOperator.accountSid);

Output

_14
{
_14
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14
"author": "Author",
_14
"availability": "retired",
_14
"config": {},
_14
"date_created": "2009-07-06T20:30:00Z",
_14
"date_updated": "2009-07-06T20:30:00Z",
_14
"description": "Description",
_14
"friendly_name": "FriendlyName",
_14
"operator_type": "OperatorType",
_14
"sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14
"url": "https://www.example.com",
_14
"version": 289
_14
}


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

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
import twilio from "twilio";
_14
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = twilio(accountSid, authToken);
_14
_14
const customOperator = await client.intelligence.v2
_14
.customOperators("LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_14
.fetch();
_14
_14
console.log(customOperator.accountSid);

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.

List multiple CustomOperators

list-multiple-customoperators page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
import twilio from "twilio";
_14
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = twilio(accountSid, authToken);
_14
_14
const customOperators = await client.intelligence.v2.customOperators.list({
_14
limit: 20,
_14
});
_14
_14
customOperators.forEach((c) => console.log(c.accountSid));

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
Property nameTypeRequiredPIIDescription
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

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

Output

_14
{
_14
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14
"author": "Author",
_14
"availability": "internal",
_14
"config": {},
_14
"date_created": "2009-07-06T20:30:00Z",
_14
"date_updated": "2009-07-06T20:30:00Z",
_14
"description": "Description",
_14
"friendly_name": "FriendlyName",
_14
"operator_type": "OperatorType",
_14
"sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14
"url": "https://www.example.com",
_14
"version": 246
_14
}


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

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


Rate this page: