Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Conversation Intelligence (classic) - OperatorAttachment Subresource


The OperatorAttachment subresource represents the link between a specific Pre-built or Custom Operator and a specific Intelligence Service. When you attach an Operator to a Service, it's available for use in that Service.


Operator Properties

operator-properties page anchor
Property nameTypeRequiredPIIDescriptionChild properties
serviceSidSID<GA>

Optional

Not PII

The unique SID identifier of the Service.

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

operatorSidSID<LY>

Optional

The unique SID identifier of the Operator.

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

urlstring<uri>

Optional

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 an Intelligence 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
Attach an Operator to a ServiceLink to code sample: Attach an Operator to a Service
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID at twilio.com/console
5
// Provision API Keys at twilio.com/console/runtime/api-keys
6
// and set the environment variables. See http://twil.io/secure
7
// For local testing, you can use your Account SID and Auth token
8
const accountSid = process.env.TWILIO_ACCOUNT_SID;
9
const apiKey = process.env.TWILIO_API_KEY;
10
const apiSecret = process.env.TWILIO_API_SECRET;
11
const client = twilio(apiKey, apiSecret, { accountSid: accountSid });
12
13
async function createOperatorAttachment() {
14
const operatorAttachment = await client.intelligence.v2
15
.operatorAttachment(
16
"GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
17
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
18
)
19
.create();
20
21
console.log(operatorAttachment.serviceSid);
22
}
23
24
createOperatorAttachment();

Response

Note about this response
1
{
2
"operator_sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"service_sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Operators/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
5
}

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 an Intelligence 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
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID at twilio.com/console
5
// Provision API Keys at twilio.com/console/runtime/api-keys
6
// and set the environment variables. See http://twil.io/secure
7
// For local testing, you can use your Account SID and Auth token
8
const accountSid = process.env.TWILIO_ACCOUNT_SID;
9
const apiKey = process.env.TWILIO_API_KEY;
10
const apiSecret = process.env.TWILIO_API_SECRET;
11
const client = twilio(apiKey, apiSecret, { accountSid: accountSid });
12
13
async function deleteOperatorAttachment() {
14
await client.intelligence.v2
15
.operatorAttachment(
16
"GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
17
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
18
)
19
.remove();
20
}
21
22
deleteOperatorAttachment();