NAME

Twilio::Rest::Numbers::V2::AuthorizationDocument - The AuthorizationDocument resource

SYNOPSIS

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

my $authorization_document = $client->numbers->v2->authorization_documents->create($address_sid, $email, $contact_phone_number, $hosted_number_order_sids, \%options);
for my $authorization_document ($client->numbers->v2->authorization_documents->read({}, 20)) {
  ...
}
my $authorization_document = $client->numbers->v2->authorization_documents($sid)->fetch;
$client->numbers->v2->authorization_documents($sid)->delete;

DESCRIPTION

This file holds AuthorizationDocumentList, AuthorizationDocumentPage, AuthorizationDocumentContext and AuthorizationDocumentInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

AuthorizationDocumentList

Returned by $client->numbers->v2->authorization_documents. See also Twilio::ListResource.

create

my $authorization_document = $client->numbers->v2->authorization_documents->create($address_sid, $email, $contact_phone_number, $hosted_number_order_sids, \%options);

Create an AuthorizationDocument for authorizing the hosting of phone number capabilities on Twilio's platform. Returns a AuthorizationDocumentInstance.

The required values are:

$address_sid

A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.

$email

Email that this AuthorizationDocument will be sent to for signing.

$contact_phone_number

The contact phone number of the person authorized to sign the Authorization Document.

$hosted_number_order_sids

A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. An array reference.

The options are:

cc_emails

Email recipients who will be informed when an Authorization Document has been sent and signed. An array reference.

contact_title

The title of the person authorized to sign the Authorization Document for this phone number.

read

my @records = $client->numbers->v2->authorization_documents->read(\%options, $limit, $page_size);

Retrieve a list of AuthorizationDocuments belonging to the account initiating the request. Returns the records as a list, fetching as many pages as it needs.

The options are:

email

Email that this AuthorizationDocument will be sent to for signing.

status

Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled Status Values for more information on each of these statuses. One of opened, signing, signed, canceled or failed.

stream

my $stream = $client->numbers->v2->authorization_documents->stream(\%options, $limit, $page_size);

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

page

my $page = $client->numbers->v2->authorization_documents->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->numbers->v2->authorization_documents->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->numbers->v2->authorization_documents->get_context($sid);

Returns a AuthorizationDocumentContext, and makes no request.

AuthorizationDocumentPage

A Twilio::Page of AuthorizationDocumentInstance objects.

records_key

build_instance

Used by Twilio::Page.

AuthorizationDocumentContext

Returned by $client->numbers->v2->authorization_documents($sid). It makes no request until one of these methods is called.

fetch

my $authorization_document = $client->numbers->v2->authorization_documents($sid)->fetch;

Fetch a specific AuthorizationDocument. Returns a AuthorizationDocumentInstance.

delete

$client->numbers->v2->authorization_documents($sid)->delete;

Cancel the AuthorizationDocument request. Returns true.

dependent_hosted_number_orders

my $list = $object->dependent_hosted_number_orders;

See Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrder.

AuthorizationDocumentInstance

See also Twilio::InstanceResource.

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

Its fields are:

address_sid

A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.

cc_emails

Email recipients who will be informed when an Authorization Document has been sent and signed.

date_created

The date this resource was created, given as GMT RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date that this resource was updated, given as GMT RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

email

Email that this AuthorizationDocument will be sent to for signing.

No description in the specification.

sid

A 34 character string that uniquely identifies this AuthorizationDocument.

status

One of opened, signing, signed, canceled or failed.

url

No description in the specification.

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.