NAME

Twilio::Rest::Conversations::V2::Participant - The Participant resource

SYNOPSIS

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

my $participant = $client->conversations->v2->participants($conversation_id)->create(\%body);
for my $participant ($client->conversations->v2->participants($conversation_id)->read({}, 20)) {
  ...
}
my $participant = $client->conversations->v2->participants($conversation_id, $id)->fetch;
$client->conversations->v2->participants($conversation_id, $id)->update(\%body);

DESCRIPTION

This file holds ParticipantList, ParticipantPage, ParticipantContext and ParticipantInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

ParticipantList

Returned by $client->conversations->v2->participants($conversation_id). See also Twilio::ListResource.

create

my $participant = $client->conversations->v2->participants($conversation_id)->create(\%body);

Create a Participant. Returns a ParticipantInstance.

%body is sent as JSON. It can be left out. When given, it takes the names Twilio's API documentation uses.

Its fields are:

addresses

Required. No description in the specification.

name

No description in the specification.

profileId

No description in the specification.

type

Type of Participant in the Conversation. One of HUMAN_AGENT, CUSTOMER, AI_AGENT, AGENT or UNKNOWN.

read

my @records = $client->conversations->v2->participants($conversation_id)->read(\%options, $limit, $page_size);

Retrieve a list of Participants in a Conversation. Returns the records as a list, fetching as many pages as it needs.

stream

my $stream = $client->conversations->v2->participants($conversation_id)->stream(\%options, $limit, $page_size);

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

page

my $page = $client->conversations->v2->participants($conversation_id)->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->conversations->v2->participants($conversation_id)->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->conversations->v2->participants($conversation_id)->get_context($id);

Returns a ParticipantContext, and makes no request.

ParticipantPage

A Twilio::Page of ParticipantInstance objects.

records_key

build_instance

Used by Twilio::Page.

ParticipantContext

Returned by $client->conversations->v2->participants($conversation_id, $id). It makes no request until one of these methods is called.

fetch

my $participant = $client->conversations->v2->participants($conversation_id, $id)->fetch;

Retrieve a Participant. Returns a ParticipantInstance.

update

my $participant = $client->conversations->v2->participants($conversation_id, $id)->update(\%body);

Update an existing Participant. Returns a ParticipantInstance.

%body is sent as JSON. It can be left out. When given, it takes the names Twilio's API documentation uses.

Its fields are:

addresses

No description in the specification.

name

No description in the specification.

profileId

No description in the specification.

type

Type of Participant in the Conversation. One of HUMAN_AGENT, CUSTOMER, AI_AGENT, AGENT or UNKNOWN.

ParticipantInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_id

Account ID.

addresses

Communication addresses for this Participant. Address format varies by channel: - SMS/VOICE: E.164 phone number (such as "+18005550100") - EMAIL: Email address (such as "user@example.com") - WHATSAPP: Phone number with whatsapp prefix (such as "whatsapp:+18005550100") - RCS: Sender ID or phone number with rcs prefix (such as "rcs:brand_acme_agent" or "rcs:+18005550100")

conversation_id

Conversation ID.

created_at

Timestamp when this Participant was created. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

id

Participant ID.

name

Participant display name.

profile_id

Profile ID. Note: This field is only resolved for CUSTOMER participant types, not for HUMAN_AGENT or AI_AGENT participants.

type

Type of Participant in the Conversation. One of HUMAN_AGENT, CUSTOMER, AI_AGENT, AGENT or UNKNOWN.

updated_at

Timestamp when this Participant was last updated. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

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.