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.
The unique SID identifier of the Service.
^GA[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique SID identifier of the Operator.
^LY[0-9a-fA-F]{32}$Min length: 34Max length: 34The URL of this resource.
POST https://intelligence.twilio.com/v2/Services/{ServiceSid}/Operators/{OperatorSid}
This endpoint attaches an Operator to an Intelligence Service.
The unique SID identifier of the Service.
^GA[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.
^LY[0-9a-fA-F]{32}$Min length: 34Max length: 341// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function createOperatorAttachment() {14const operatorAttachment = await client.intelligence.v215.operatorAttachment(16"GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18)19.create();2021console.log(operatorAttachment.serviceSid);22}2324createOperatorAttachment();
Response
1{2"operator_sid": "LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"service_sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Operators/LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"5}
DELETE https://intelligence.twilio.com/v2/Services/{ServiceSid}/Operators/{OperatorSid}
This endpoint detaches an Operator from an Intelligence Service.
The unique SID identifier of the Service.
^GA[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.
^LY[0-9a-fA-F]{32}$Min length: 34Max length: 341// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function deleteOperatorAttachment() {14await client.intelligence.v215.operatorAttachment(16"GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18)19.remove();20}2122deleteOperatorAttachment();