# Conversational Intelligence - OperatorType Resource

The OperatorType resource represents the different Operator Types you can [attach to your Intelligence Service](/docs/conversational-intelligence/api/operator-attachment-subresource). If an Operator Type is configurable, you can [create a Custom Operator](/docs/conversational-intelligence/api/custom-operator-subresource#create-a-custom-operator) for it. This resource allows you to fetch a specific Operator Type or list all available Operator Types.

## OperatorType Properties

```json
{"type":"object","refName":"intelligence.v2.operator_type","modelName":"intelligence_v2_operator_type","properties":{"name":{"type":"string","nullable":true,"description":"A unique name that references an Operator's Operator Type."},"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^EY[0-9a-fA-F]{32}$","nullable":true,"description":"A 34 character string that uniquely identifies this Operator Type."},"friendly_name":{"type":"string","nullable":true,"description":"A human-readable name of this resource, up to 64 characters."},"description":{"type":"string","nullable":true,"description":"A human-readable description of this resource, longer than the friendly name."},"docs_link":{"type":"string","format":"uri","nullable":true,"description":"Additional documentation for the Operator Type."},"output_type":{"type":"string","enum":["text-classification","text-extraction","text-extraction-normalized","text-generation","json"],"description":"Operator Results for this Operator Type will follow this format. Possible values: text-classification, text-extraction, text-extraction-normalized, text-generation.","refName":"operator_type_enum_output_type","modelName":"operator_type_enum_output_type"},"supported_languages":{"type":"array","nullable":true,"description":"List of languages this Operator Type supports.","items":{"type":"string"}},"provider":{"type":"string","enum":["twilio","amazon","openai"],"description":"Operators with this Operator Type are executed using this provider. Possible values: twilio, amazon, openai.","refName":"operator_type_enum_provider","modelName":"operator_type_enum_provider"},"availability":{"type":"string","enum":["internal","beta","general-availability","retired","deprecated"],"description":"Operator Type availability status. Possible values: internal, beta, general-availability, retired, deprecated.","refName":"operator_type_enum_availability","modelName":"operator_type_enum_availability"},"configurable":{"type":"boolean","nullable":true,"description":"Operators can be created from configurable Operator Types."},"config_schema":{"nullable":true,"description":"JSON Schema for configuring an Operator with this Operator Type. Following https://json-schema.org/"},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date that this Operator Type was created, given in ISO 8601 format."},"date_updated":{"type":"string","format":"date-time","nullable":true,"description":"The date that this Operator Type was updated, given in ISO 8601 format."},"url":{"type":"string","format":"uri","nullable":true,"description":"The URL of this resource."}}}
```

## Fetch an Operator Type

`GET https://intelligence.twilio.com/v2/OperatorTypes/{Sid}`

This endpoint allows you to retrieve the details of an Operator Type using its SID or name. The response includes information such as supported languages, output types, whether an Operator Type is configurable, and a configuration schema with a list of required and optional properties.

### Path parameters

```json
[{"name":"Sid","in":"path","description":"Either a 34 character string that uniquely identifies this Operator Type or the unique name that references an Operator Type.","schema":{"type":"string"},"required":true}]
```

Fetch an Operator Type by SID

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchOperatorType() {
  const operatorType = await client.intelligence.v2
    .operatorType("EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(operatorType.name);
}

fetchOperatorType();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

operator_type = client.intelligence.v2.operator_type(
    "EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).fetch()

print(operator_type.name)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Intelligence.V2;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var operatorType =
            await OperatorTypeResource.FetchAsync(pathSid: "EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(operatorType.Name);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.intelligence.v2.OperatorType;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        OperatorType operatorType = OperatorType.fetcher("EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(operatorType.getName());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.IntelligenceV2.FetchOperatorType("EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Name != nil {
			fmt.Println(*resp.Name)
		} else {
			fmt.Println(resp.Name)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$operator_type = $twilio->intelligence->v2
    ->operatorType("EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $operator_type->name;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

operator_type = @client
                .intelligence
                .v2
                .operator_type('EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                .fetch

puts operator_type.name
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:intelligence:v2:operator-types:fetch \
   --sid EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://intelligence.twilio.com/v2/OperatorTypes/EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "name": "Summarization",
  "sid": "EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "Summarize Conversations",
  "description": "Summarize Conversations",
  "docs_link": "/docs/conversational-intelligence/key-concepts#language-operators",
  "output_type": "text-generation",
  "supported_languages": [
    "en"
  ],
  "provider": "openai",
  "availability": "general-availability",
  "configurable": true,
  "config_schema": {
    "field": "value"
  },
  "date_created": "2010-08-31T20:36:28Z",
  "date_updated": "2010-08-31T20:36:28Z",
  "url": "https://intelligence.twilio.com/v2/OperatorTypes/EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## List available Operator Types

`GET https://intelligence.twilio.com/v2/OperatorTypes`

This endpoint lists all available Operator Types for an Account.

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}},{"name":"LanguageCode","in":"query","description":"Returns Operator Types that support the provided language code.","schema":{"type":"string"},"examples":{"readFull":{"value":"en"},"readEmpty":{"value":"en"}}}]
```

List multiple OperatorTypes

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listOperatorType() {
  const operatorTypes = await client.intelligence.v2.operatorType.list({
    limit: 20,
  });

  operatorTypes.forEach((o) => console.log(o.name));
}

listOperatorType();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

operator_types = client.intelligence.v2.operator_type.list(limit=20)

for record in operator_types:
    print(record.name)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Intelligence.V2;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var operatorTypes = await OperatorTypeResource.ReadAsync(limit: 20);

        foreach (var record in operatorTypes) {
            Console.WriteLine(record.Name);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.intelligence.v2.OperatorType;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<OperatorType> operatorTypes = OperatorType.reader().limit(20).read();

        for (OperatorType record : operatorTypes) {
            System.out.println(record.getName());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	intelligence "github.com/twilio/twilio-go/rest/intelligence/v2"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &intelligence.ListOperatorTypeParams{}
	params.SetLimit(20)

	resp, err := client.IntelligenceV2.ListOperatorType(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Name != nil {
				fmt.Println(*resp[record].Name)
			} else {
				fmt.Println(resp[record].Name)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$operatorTypes = $twilio->intelligence->v2->operatorType->read([], 20);

foreach ($operatorTypes as $record) {
    print $record->name;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

operator_types = @client
                 .intelligence
                 .v2
                 .operator_type
                 .list(limit: 20)

operator_types.each do |record|
   puts record.name
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:intelligence:v2:operator-types:list
```

```bash
curl -X GET "https://intelligence.twilio.com/v2/OperatorTypes?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "operator_types": [
    {
      "name": "Summarization",
      "sid": "EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "friendly_name": "Summarize Conversations",
      "description": "Summarize Conversations",
      "docs_link": "/docs/conversational-intelligence/key-concepts#language-operators",
      "output_type": "text-generation",
      "supported_languages": [
        "en"
      ],
      "provider": "openai",
      "availability": "general-availability",
      "configurable": true,
      "config_schema": {
        "field": "value"
      },
      "date_created": "2010-08-31T20:36:28Z",
      "date_updated": "2010-08-31T20:36:28Z",
      "url": "https://intelligence.twilio.com/v2/OperatorTypes/EYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  ],
  "meta": {
    "first_page_url": "https://intelligence.twilio.com/v2/OperatorTypes?PageSize=50&Page=0",
    "key": "operator_types",
    "next_page_url": null,
    "page": 0,
    "page_size": 50,
    "previous_page_url": null,
    "url": "https://intelligence.twilio.com/v2/OperatorTypes?PageSize=50&Page=0"
  }
}
```
