NAME

Twilio::Rest::PreviewIam::Versionless::Organization::User - The User resource

SYNOPSIS

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

my $user = $client->preview_iam->versionless->organization($organization_sid)->users->create(\%body);
for my $user ($client->preview_iam->versionless->organization($organization_sid)->users->read({}, 20)) {
  ...
}
my $user = $client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->fetch;
$client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->patch(\%body, \%options);
$client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->update(\%body, \%options);
$client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->delete;

DESCRIPTION

This file holds UserList, UserPage, UserContext and UserInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

UserList

Returned by $client->preview_iam->versionless->organization($organization_sid)->users. See also Twilio::ListResource.

create

my $user = $client->preview_iam->versionless->organization($organization_sid)->users->create(\%body);

Returns a UserInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

active

Indicates whether the user is active

displayName

User friendly display name

emails

Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

externalId

External unique resource id defined by provisioning client

id

Unique Twilio user sid

locale

User's locale

meta

No description in the specification.

name

No description in the specification.

schemas

An array of URIs that indicate the schemas supported for this user resource

timezone

User's time zone

userName

Required. Unique username, MUST be same as primary email address

read

my @records = $client->preview_iam->versionless->organization($organization_sid)->users->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

The options are:

filter

No description in the specification.

stream

my $stream = $client->preview_iam->versionless->organization($organization_sid)->users->stream(\%options, $limit, $page_size);

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

page

my $page = $client->preview_iam->versionless->organization($organization_sid)->users->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->preview_iam->versionless->organization($organization_sid)->users->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->preview_iam->versionless->organization($organization_sid)->users->get_context($user_sid);

Returns a UserContext, and makes no request.

UserPage

A Twilio::Page of UserInstance objects.

records_key

build_instance

Used by Twilio::Page.

UserContext

Returned by $client->preview_iam->versionless->organization($organization_sid)->users($user_sid). It makes no request until one of these methods is called.

fetch

my $user = $client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->fetch;

Returns a UserInstance.

patch

my $user = $client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->patch(\%body, \%options);

Returns a UserInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

Operations

No description in the specification.

schemas

No description in the specification.

The options are:

if_match

No description in the specification.

update

my $user = $client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->update(\%body, \%options);

Returns a UserInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

active

Indicates whether the user is active

displayName

User friendly display name

emails

Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

externalId

External unique resource id defined by provisioning client

id

Unique Twilio user sid

locale

User's locale

meta

No description in the specification.

name

No description in the specification.

schemas

An array of URIs that indicate the schemas supported for this user resource

timezone

User's time zone

userName

Required. Unique username, MUST be same as primary email address

The options are:

if_match

No description in the specification.

delete

$client->preview_iam->versionless->organization($organization_sid)->users($user_sid)->delete;

Returns true.

UserInstance

See also Twilio::InstanceResource.

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

Its fields are:

active

Indicates whether the user is active

display_name

User friendly display name

emails

Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

external_id

External unique resource id defined by provisioning client

id

Unique Twilio user sid

locale

User's locale

meta

No description in the specification.

name

No description in the specification.

schemas

An array of URIs that indicate the schemas supported for this user resource

timezone

User's time zone

user_name

Unique username, MUST be same as primary email address

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.