NAME

Twilio::Rest::Conversations::V1::Service::User::UserConversation - The UserConversation resource

SYNOPSIS

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

for my $user_conversation ($client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations->read({}, 20)) {
  ...
}
my $user_conversation = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations($conversation_sid)->fetch;
$client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations($conversation_sid)->update(\%options);
$client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations($conversation_sid)->delete;

DESCRIPTION

A Service User Conversation resource represents a conversation of the user belonging to a specific conversation service.

This file holds UserConversationList, UserConversationPage, UserConversationContext and UserConversationInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

UserConversationList

Returned by $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations. See also Twilio::ListResource.

read

my @records = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations->read(\%options, $limit, $page_size);

Retrieve a list of all User Conversations for the User. Returns the records as a list, fetching as many pages as it needs.

stream

my $stream = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations->stream(\%options, $limit, $page_size);

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

page

my $page = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations->get_context($conversation_sid);

Returns a UserConversationContext, and makes no request.

UserConversationPage

A Twilio::Page of UserConversationInstance objects.

records_key

build_instance

Used by Twilio::Page.

UserConversationContext

Returned by $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations($conversation_sid). It makes no request until one of these methods is called.

fetch

my $user_conversation = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations($conversation_sid)->fetch;

Fetch a specific User Conversation. Returns a UserConversationInstance.

update

my $user_conversation = $client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations($conversation_sid)->update(\%options);

Update a specific User Conversation. Returns a UserConversationInstance.

The options are:

last_read_message_index

The index of the last Message in the Conversation that the Participant has read.

last_read_timestamp

The date of the last message read in conversation by the user, given in ISO 8601 format. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

notification_level

One of default or muted.

delete

$client->conversations->v1->services($chat_service_sid)->users($user_sid)->user_conversations($conversation_sid)->delete;

Delete a specific User Conversation. Returns true.

UserConversationInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The unique ID of the Account responsible for this conversation.

attributes

An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.

chat_service_sid

The unique ID of the Conversation Service this conversation belongs to.

conversation_sid

The unique ID of the Conversation for this User Conversation.

conversation_state

One of inactive, active or closed.

created_by

Identity of the creator of this Conversation.

date_created

The date that this conversation was created, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date that this conversation was last updated, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

friendly_name

The human-readable name of this conversation, limited to 256 characters. Optional.

last_read_message_index

The index of the last Message in the Conversation that the Participant has read.

Contains absolute URLs to access the participant and conversation of this conversation.

notification_level

One of default or muted.

participant_sid

The unique ID of the participant the user conversation belongs to.

timers

Timer date values representing state update for this conversation.

unique_name

An application-defined string that uniquely identifies the Conversation resource. It can be used to address the resource in place of the resource's conversation_sid in the URL.

unread_messages_count

The number of unread Messages in the Conversation for the Participant.

url

No description in the specification.

user_sid

The unique string that identifies the User 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.