NAME
Twilio::Rest::FlexApi::V1::Interaction - The Interaction resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $interaction = $client->flex_api->v1->interaction->create($channel, \%options);
my $interaction = $client->flex_api->v1->interaction($sid)->fetch;
$client->flex_api->v1->interaction($sid)->update(\%options);
DESCRIPTION
This file holds InteractionList, InteractionContext and InteractionInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
InteractionList
Returned by $client->flex_api->v1->interaction. See also Twilio::ListResource.
create
my $interaction = $client->flex_api->v1->interaction->create($channel, \%options);
Create a new Interaction. Returns a InteractionInstance.
The required values are:
The options are:
interaction_context_sid-
The Interaction context sid is used for adding a context lookup sid
routing-
The Interaction's routing logic. A hash or array reference, or a string of JSON.
webhook_ttid-
The unique identifier for Interaction level webhook
get_context
my $context = $client->flex_api->v1->interaction->get_context($sid);
Returns a InteractionContext, and makes no request.
InteractionContext
Returned by $client->flex_api->v1->interaction($sid). It makes no request until one of these methods is called.
fetch
my $interaction = $client->flex_api->v1->interaction($sid)->fetch;
Returns a InteractionInstance.
update
my $interaction = $client->flex_api->v1->interaction($sid)->update(\%options);
Updates an interaction. Returns a InteractionInstance.
The options are:
webhook_ttid-
The unique identifier for Interaction level webhook
channels
my $list = $object->channels;
my $context = $object->channels($sid);
See Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel.
InteractionInstance
See also Twilio::InstanceResource.
It has fetch, update and channels, which work as they do on the context.
Its fields are:
- channel
-
A JSON object that defines the Interaction’s communication channel and includes details about the channel. See the Outbound SMS and inbound (API-initiated) Channel object examples.
- interaction_context_sid
-
No description in the specification.
- links
-
No description in the specification.
- routing
-
A JSON Object representing the routing rules for the Interaction Channel. See Outbound SMS Example for an example Routing object. The Interactions resource uses TaskRouter for all routing functionality. All attributes in the Routing object on your Interaction request body are added “as is” to the task. For a list of known attributes consumed by the Flex UI and/or Flex Insights, see Known Task Attributes.
- sid
-
The unique string created by Twilio to identify an Interaction resource, prefixed with KD.
- url
-
No description in the specification.
- webhook_ttid
-
No description in the specification.
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.