NAME

Twilio::Rest::Proxy::V1::Service::Session::Interaction - The Interaction resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

for my $interaction ($client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions->read({}, 20)) {
  ...
}
my $interaction = $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions($sid)->fetch;
$client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions($sid)->delete;

DESCRIPTION

This file holds InteractionList, InteractionPage, InteractionContext and InteractionInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

InteractionList

Returned by $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions. See also Twilio::ListResource.

read

my @records = $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions->read(\%options, $limit, $page_size);

Retrieve a list of all Interactions for a Session. A maximum of 100 records will be returned per page. Returns the records as a list, fetching as many pages as it needs.

stream

my $stream = $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions->get_context($sid);

Returns a InteractionContext, and makes no request.

InteractionPage

A Twilio::Page of InteractionInstance objects.

records_key

build_instance

Used by Twilio::Page.

InteractionContext

Returned by $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions($sid). It makes no request until one of these methods is called.

fetch

my $interaction = $client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions($sid)->fetch;

Retrieve a list of Interactions for a given Session. Returns a InteractionInstance.

delete

$client->proxy->v1->services($service_sid)->sessions($session_sid)->interactions($sid)->delete;

Delete a specific Interaction. Returns true.

InteractionInstance

See also Twilio::InstanceResource.

It has fetch and delete, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Interaction resource.

data

A JSON string that includes the message body of message interactions (e.g. {"body": "hello"}) or the call duration (when available) of a call (e.g. {"duration": "5"}).

date_created

The ISO 8601 date and time in GMT when the Interaction was created. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The ISO 8601 date and time in GMT when the resource was last updated. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

inbound_participant_sid

The SID of the inbound Participant resource.

inbound_resource_sid

The SID of the inbound resource; either the Call or Message.

inbound_resource_status

One of accepted, answered, busy, canceled, completed, deleted, delivered, delivery-unknown, failed, in-progress, initiated, no-answer, queued, received, receiving, ringing, scheduled, sending, sent, undelivered or unknown.

inbound_resource_type

The inbound resource type. Can be Call or Message.

inbound_resource_url

The URL of the Twilio inbound resource

outbound_participant_sid

The SID of the outbound Participant).

outbound_resource_sid

The SID of the outbound resource; either the Call or Message.

outbound_resource_status

One of accepted, answered, busy, canceled, completed, deleted, delivered, delivery-unknown, failed, in-progress, initiated, no-answer, queued, received, receiving, ringing, scheduled, sending, sent, undelivered or unknown.

outbound_resource_type

The outbound resource type. Can be: Call or Message.

outbound_resource_url

The URL of the Twilio outbound resource.

service_sid

The SID of the parent Service resource.

session_sid

The SID of the parent Session resource.

sid

The unique string that we created to identify the Interaction resource.

type

One of message, voice or unknown.

url

The absolute URL of the Interaction resource.

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.