NAME

Twilio::Rest::Numbers::V3::HostedNumberOrder - The HostedNumberOrder resource

SYNOPSIS

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

my $hosted_number_order = $client->numbers->v3->hosted_number_orders->create($phone_number, $sms_capability, \%options);

DESCRIPTION

This file holds HostedNumberOrderList and HostedNumberOrderInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

HostedNumberOrderList

Returned by $client->numbers->v3->hosted_number_orders. See also Twilio::ListResource.

create

my $hosted_number_order = $client->numbers->v3->hosted_number_orders->create($phone_number, $sms_capability, \%options);

Host a phone number's capability on Twilio's platform. Returns a HostedNumberOrderInstance.

The required values are:

$phone_number

The number to host in +E.164 format

$sms_capability

Used to specify that the SMS capability will be hosted on Twilio's platform.

The options are:

account_sid

This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to.

address_sid

Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.

cc_emails

Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. An array reference.

email

Optional. Email of the owner of this phone number that is being hosted.

friendly_name

A 64 character string that is a human readable text that describes this resource.

sms_application_sid

Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a SmsApplicationSid is present, Twilio will ignore all of the SMS urls above and use those set on the application.

sms_fallback_method

The HTTP method that should be used to request the SmsFallbackUrl. Must be either GET or POST. This will be copied onto the IncomingPhoneNumber resource. One of GET or POST.

sms_fallback_url

A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource.

sms_method

The HTTP method that should be used to request the SmsUrl. Must be either GET or POST. This will be copied onto the IncomingPhoneNumber resource. One of GET or POST.

sms_url

The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.

status_callback_method

Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. One of GET or POST.

status_callback_url

Optional. The Status Callback URL attached to the IncomingPhoneNumber resource.

unique_name

Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.

verification_document_sid

Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.

verification_type

Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. One of phone-call or phone-bill.

HostedNumberOrderInstance

See also Twilio::InstanceResource.

Its fields are:

account_sid

A 34 character string that uniquely identifies the account.

address_sid

A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.

call_delay

A value between 0-30 specifying the number of seconds to delay initiating the ownership verification call.

capabilities

Set of booleans describing the capabilities hosted on Twilio's platform. SMS is currently only supported. A Twilio::Base::PhoneNumberCapabilities object.

cc_emails

A list of emails that LOA document for this HostedNumberOrder will be carbon copied to.

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 of the owner of this phone number that is being hosted.

extension

A numerical extension to be used when making the ownership verification call.

failure_reason

A message that explains why a hosted_number_order went to status "action-required"

friendly_name

A 64 character string that is a human-readable text that describes this resource.

incoming_phone_number_sid

A 34 character string that uniquely identifies the IncomingPhoneNumber resource that represents the phone number being hosted.

phone_number

Phone number to be hosted. This must be in E.164 format, e.g., +16175551212

sid

A 34 character string that uniquely identifies this HostedNumberOrder.

signing_document_sid

A 34 character string that uniquely identifies the Authorization Document the user needs to sign.

status

Status of this resource. It can hold one of the values: 1. Twilio Processing 2. Received, 3. Pending LOA, 4. Carrier Processing, 5. Completed, 6. Action Required, 7. Failed. See the HostedNumberOrders Status Values section for more information on each of these statuses. One of twilio-processing, received, pending-verification, verified, pending-loa, carrier-processing, testing, completed, failed or action-required.

unique_name

Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.

url

The URL of this HostedNumberOrder.

verification_attempts

The number of attempts made to verify ownership of the phone number that is being hosted.

verification_call_sids

A list of 34 character strings that are unique identifiers for the calls placed as part of ownership verification.

verification_code

A verification code provided in the response for a user to enter when they pick up the phone call.

verification_document_sid

A 34 character string that uniquely identifies the Identity Document resource that represents the document for verifying ownership of the number to be hosted.

verification_type

The type of ownership verification required to move the number to a verified state. The verification methods are phone-call or phone-bill. One of phone-call or phone-bill.

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.