NAME
Twilio::Rest::Preview::HostedNumbers::AuthorizationDocument - The AuthorizationDocument resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $authorization_document = $client->preview->hosted_numbers->authorization_documents->create($hosted_number_order_sids, $address_sid, $email, $contact_title, $contact_phone_number, \%options);
for my $authorization_document ($client->preview->hosted_numbers->authorization_documents->read({}, 20)) {
...
}
my $authorization_document = $client->preview->hosted_numbers->authorization_documents($sid)->fetch;
$client->preview->hosted_numbers->authorization_documents($sid)->update(\%options);
$client->preview->hosted_numbers->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->preview->hosted_numbers->authorization_documents. See also Twilio::ListResource.
create
my $authorization_document = $client->preview->hosted_numbers->authorization_documents->create($hosted_number_order_sids, $address_sid, $email, $contact_title, $contact_phone_number, \%options);
Create an AuthorizationDocument for authorizing the hosting of phone number capabilities on Twilio's platform. Returns a AuthorizationDocumentInstance.
The required values are:
$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.
$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_title-
The title of the person authorized to sign the Authorization Document for this phone number.
$contact_phone_number-
The contact phone number of the person authorized to sign the Authorization Document.
The options are:
cc_emails-
Email recipients who will be informed when an Authorization Document has been sent and signed. An array reference.
read
my @records = $client->preview->hosted_numbers->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,canceledorfailed.
stream
my $stream = $client->preview->hosted_numbers->authorization_documents->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->preview->hosted_numbers->authorization_documents->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->preview->hosted_numbers->authorization_documents->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->preview->hosted_numbers->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->preview->hosted_numbers->authorization_documents($sid). It makes no request until one of these methods is called.
fetch
my $authorization_document = $client->preview->hosted_numbers->authorization_documents($sid)->fetch;
Fetch a specific AuthorizationDocument. Returns a AuthorizationDocumentInstance.
update
my $authorization_document = $client->preview->hosted_numbers->authorization_documents($sid)->update(\%options);
Updates a specific AuthorizationDocument. Returns a AuthorizationDocumentInstance.
The options 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 An array reference.
contact_phone_number-
The contact phone number of the person authorized to sign the Authorization Document.
contact_title-
The title of the person authorized to sign the Authorization Document for this phone number.
email-
Email that this AuthorizationDocument will be sent to for signing.
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.
status-
One of
opened,signing,signed,canceledorfailed.
delete
$client->preview->hosted_numbers->authorization_documents($sid)->delete;
Delete the AuthorizationDocument and remove any associations with HostedNumberOrders. Returns true.
dependent_hosted_number_orders
my $list = $object->dependent_hosted_number_orders;
See Twilio::Rest::Preview::HostedNumbers::AuthorizationDocument::DependentHostedNumberOrder.
AuthorizationDocumentInstance
See also Twilio::InstanceResource.
It has fetch, update, 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 that this AuthorizationDocument will be sent to for signing.
- links
-
No description in the specification.
- sid
-
A 34 character string that uniquely identifies this AuthorizationDocument.
- status
-
One of
opened,signing,signed,canceledorfailed. - 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.