NAME

Twilio::Rest::Verify::V2::Service::Entity - The Entity resource

SYNOPSIS

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

my $entity = $client->verify->v2->services($service_sid)->entities->create($identity);
for my $entity ($client->verify->v2->services($service_sid)->entities->read({}, 20)) {
  ...
}
my $entity = $client->verify->v2->services($service_sid)->entities($identity)->fetch;
$client->verify->v2->services($service_sid)->entities($identity)->delete;

DESCRIPTION

This file holds EntityList, EntityPage, EntityContext and EntityInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

EntityList

Returned by $client->verify->v2->services($service_sid)->entities. See also Twilio::ListResource.

create

my $entity = $client->verify->v2->services($service_sid)->entities->create($identity);

Create a new Entity for the Service. Returns a EntityInstance.

The required values are:

$identity

The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

read

my @records = $client->verify->v2->services($service_sid)->entities->read(\%options, $limit, $page_size);

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

stream

my $stream = $client->verify->v2->services($service_sid)->entities->stream(\%options, $limit, $page_size);

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

page

my $page = $client->verify->v2->services($service_sid)->entities->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->verify->v2->services($service_sid)->entities->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->verify->v2->services($service_sid)->entities->get_context($identity);

Returns a EntityContext, and makes no request.

EntityPage

A Twilio::Page of EntityInstance objects.

records_key

build_instance

Used by Twilio::Page.

EntityContext

Returned by $client->verify->v2->services($service_sid)->entities($identity). It makes no request until one of these methods is called.

fetch

my $entity = $client->verify->v2->services($service_sid)->entities($identity)->fetch;

Fetch a specific Entity. Returns a EntityInstance.

delete

$client->verify->v2->services($service_sid)->entities($identity)->delete;

Delete a specific Entity. Returns true.

challenges

my $list = $object->challenges;

my $context = $object->challenges($sid);

See Twilio::Rest::Verify::V2::Service::Entity::Challenge.

factors

my $list = $object->factors;

my $context = $object->factors($sid);

See Twilio::Rest::Verify::V2::Service::Entity::Factor.

new_factors

my $list = $object->new_factors;

See Twilio::Rest::Verify::V2::Service::Entity::NewFactor.

EntityInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The unique SID identifier of the Account.

date_created

The date that this Entity 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 Entity was updated, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

identity

The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

Contains a dictionary of URL links to nested resources of this Entity.

service_sid

The unique SID identifier of the Service.

sid

A 34 character string that uniquely identifies this Entity.

url

The URL of this 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.