NAME
Twilio::Rest::Intelligence::V3::Operator - The Operator resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $operator = $client->intelligence->v3->operators->create(\%body);
for my $operator ($client->intelligence->v3->operators->read({}, 20)) {
...
}
my $operator = $client->intelligence->v3->operators($id)->fetch;
$client->intelligence->v3->operators($id)->update(\%body, \%options);
$client->intelligence->v3->operators($id)->delete;
DESCRIPTION
This file holds OperatorList, OperatorPage, OperatorContext and OperatorInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
OperatorList
Returned by $client->intelligence->v3->operators. See also Twilio::ListResource.
create
my $operator = $client->intelligence->v3->operators->create(\%body);
Create a custom language operator. You can define a reusable, programmable conversational analysis task tailored to your business needs. Returns a OperatorInstance.
%body is sent as JSON. It takes the names Twilio's API documentation uses.
read
my @records = $client->intelligence->v3->operators->read(\%options, $limit, $page_size);
Retrieve a list of Operators for the account, including those not attached to an Intelligence Configuration. This request returns both Twilio-authored and custom language operators. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->intelligence->v3->operators->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->intelligence->v3->operators->page(\%options, $page_size, $page_token);
Fetches one page, and returns a Twilio::TokenPaginationPage. This API pages by token, so there is no page number.
get_page
my $page = $client->intelligence->v3->operators->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->intelligence->v3->operators->get_context($id);
Returns a OperatorContext, and makes no request.
OperatorPage
A Twilio::Page of OperatorInstance objects.
records_key
build_instance
Used by Twilio::Page.
OperatorContext
Returned by $client->intelligence->v3->operators($id). It makes no request until one of these methods is called.
fetch
my $operator = $client->intelligence->v3->operators($id)->fetch;
Returns a OperatorInstance.
update
my $operator = $client->intelligence->v3->operators($id)->update(\%body, \%options);
Returns a OperatorInstance.
%body is sent as JSON. It takes the names Twilio's API documentation uses.
The options are:
if_match-
Current ETag/version required for conditional update
delete
$client->intelligence->v3->operators($id)->delete;
Returns true.
OperatorInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
-
One of
SELForTWILIO. - context
-
No description in the specification.
- description
-
Description of the Language Operator further explaining its purpose.
- display_name
-
Display name of the Language Operator describing its purpose.
- id
-
No description in the specification.
- output_format
-
One of
TEXT,JSONorCLASSIFICATION. - output_schema
-
No description in the specification.
- parameters
-
No description in the specification.
- prompt
-
The natural language instructions used by the operator to analyze the conversation. Within the prompt, users can reference parameters using the
{{parameters.[param_name]}}syntax. Parameter values are provided to the Operator by the Intelligence Configuration Rule at runtime. Note: Prompts will only be exposed for Custom Operators (author=SELF). Twilio-authored Operators (author=TWILIO) will have their prompts omitted from the API. - training_examples
-
An array of example input/output pairs used to illustrate the intended behavior of the Language Operator. These examples help guide the model's understanding of expected input–output relationships and improve consistency during evaluation and testing. Note: Training examples will only be exposed for Custom Operators (
author=SELF). Twilio-authored Operators (author=TWILIO) will have their training examples omitted from the API. - version
-
Numeric Operator version. Automatically incremented with each update on the resource, used to ensure integrity when updating the Operator.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.