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

OperatorAttachment Resource


The OperatorAttachment resource represents the link between a specific Prebuilt or Custom Operator and a specific Voice Intelligence Service. When an Operator is attached to a Service, it is available for use in that Service.


OperatorAttachment Properties

operatorattachment-properties page anchor
Property nameTypePIIDescription
service_sidSID<GA>
Not PII

The unique SID identifier of the Service.

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

operator_sidSID<LY>

The unique SID identifier of the Operator.

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

urlstring<uri>

The URL of this resource.


Create an Operator attachment

create-an-operator-attachment page anchor
POST https://intelligence.twilio.com/v2/Services/{ServiceSid}/Operators/{OperatorSid}

This endpoint attaches an Operator to a Service.

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
ServiceSidSID<GA>required

The unique SID identifier of the Service.

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

OperatorSidSID<LY>required

The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.

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

Create an OperatorAttachment

create-an-operatorattachment page anchor
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 operatorAttachment = await client.intelligence.v2
_17
.operatorAttachment(
_17
"GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_17
)
_17
.create();
_17
_17
console.log(operatorAttachment.serviceSid);

Output

_10
{
_10
"operator_sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"service_sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"url": "https://www.example.com"
_10
}


Delete an Operator attachment

delete-an-operator-attachment page anchor
DELETE https://intelligence.twilio.com/v2/Services/{ServiceSid}/Operators/{OperatorSid}

This endpoint detaches an Operator from a Service.

Property nameTypeRequiredPIIDescription
ServiceSidSID<GA>required

The unique SID identifier of the Service.

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

OperatorSidSID<LY>required

The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.

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

Delete an OperatorAttachment

delete-an-operatorattachment page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

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


Rate this page: