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

PrebuiltOperator Subresource


The PrebuiltOperator subresource of the Operator resource represents a Prebuilt Operator.


PrebuiltOperator Properties

prebuiltoperator-properties page anchor
Property nameTypePIIDescription
account_sidSID<AC>
Not PII

The unique SID identifier of the Account the Pre-built 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 Pre-built 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 Operator. Pre-built Operators can only be created by Twilio.


operator_typestring

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


versioninteger

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


availabilityenum<string>

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 Custom Operators created by the Account, will be empty for Pre-Built Operators.


date_createdstring<date-time>

The date that this Pre-built Operator was created, given in ISO 8601 format.


date_updatedstring<date-time>

The date that this Pre-built Operator was updated, given in ISO 8601 format.


urlstring<uri>

The URL of this resource.


Fetch a Prebuilt Operator

fetch-a-prebuilt-operator page anchor
GET https://intelligence.twilio.com/v2/Operators/PreBuilt/{Sid}

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

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
SidSID<LY>required

A 34 character string that uniquely identifies this Pre-built Operator.

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

Fetch a PrebuiltOperator

fetch-a-prebuiltoperator 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 prebuiltOperator = await client.intelligence.v2
_14
.prebuiltOperators("LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_14
.fetch();
_14
_14
console.log(prebuiltOperator.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/PreBuilt/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_18
}


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

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

Property nameTypeRequiredPIIDescription
Availabilityenum<string>Optional

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

Possible values:
internalbetapublicretired

LanguageCodestringOptional

Returns Pre-built 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 PrebuiltOperators

list-multiple-prebuiltoperators 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 prebuiltOperators = await client.intelligence.v2.prebuiltOperators.list({
_14
limit: 20,
_14
});
_14
_14
prebuiltOperators.forEach((p) => console.log(p.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/PreBuilt/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_31
}
_31
],
_31
"meta": {
_31
"first_page_url": "https://intelligence.twilio.com/v2/Operators/PreBuilt?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/PreBuilt?LanguageCode=en&Availability=public&PageSize=50&Page=0"
_31
}
_31
}


Rate this page: