REST API: Hosted Number Orders

Hosted Numbers API is currently in Private Developer Preview

The Hosted Number Orders product allows an account to request for their phone numbers to be hosted on Twilio for SMS. Start the Hosted Number onboarding process by sending a POST to the list resource, which will create a new request to host a phone number, or move the Hosted Number Order along the onboarding process by updating the status of the Hosted Number Orders Instance Resource. Upon creation of a Hosted Number Order instance resource, a corresponding IncomingPhoneNumbers instance resource will also be created. Currently, Twilio only has the ability to onboard landline or toll-free US & Canada numbers that are not currently SMS enabled.

After the number's ownership has been verified, the user will then need to create a new Authorization Document that is electronically signed, giving Twilio permission to route SMS to and from Twilio's network. To see how to interact with the Authorization Documents resource, please visit the Public API reference.

Once the process is completed, users will be able to answer phone calls on their existing infrastructure and leverage the same number identity for two-way SMS on Twilio's platform.

Hosted Number Orders Instance Resource

The Hosted Number Orders instance resource represents a request to host a phone number's capability on Twilio's platform.

リソースURI

preview.twilio.com/HostedNumbers/HostedNumberOrders/{HostedNumberOrderSid}

リソースのプロパティ

名前 概要
account_sid

A 34 character string that uniquely identifies the account. (🏢 not PII)

address_sid

A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. (🏢 not PII)

call_delay

A value between 0-30 specifying the number of seconds to delay initiating the ownership verification call. (🏢 not PII)

capabilities

Set of booleans describing the capabilities hosted on Twilio's platform. SMS is currently only supported. (🏢 not PII)

cc_emails

A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. (📇 PII MTL: 30 days)

date_created

The date this resource was created, given as GMT RFC 2822 format. (🏢 not PII)

date_updated

The date that this resource was updated, given as GMT RFC 2822 format. (🏢 not PII)

Email

Email of the owner of this phone number that is being hosted. (📇 PII MTL: 30 days)

extension

A numerical extension to be used when making the ownership verification call. (🏢 not PII)

failure_reason

A message that explains why a hosted_number_order went to status "action-required" (🏢 not PII)

friendly_name

A 64 character string that is a human-readable text that describes this resource. (📇 PII MTL: 30 days)

incoming_phone_number_sid

A 34 character string that uniquely identifies the IncomingPhoneNumber resource that represents the phone number being hosted. (🏢 not PII)

phone_number

Phone number to be hosted. This must be in E.164 format, e.g., +16175551212 (🏢 not PII)

sid

A 34 character string that uniquely identifies this HostedNumberOrder. (🏢 not PII)

signing_document_sid

A 34 character string that uniquely identifies the Authorization Document the user needs to sign. (🏢 not PII)

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. (🏢 not PII)

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. (📇 PII MTL: 30 days)

url

The URL of this HostedNumberOrder. (🏢 not PII)

verification_attempts

The number of attempts made to verify ownership of the phone number that is being hosted. (🏢 not PII)

verification_call_sids

A list of 34 character strings that are unique identifiers for the calls placed as part of ownership verification. (🏢 not PII)

verification_code

A verification code provided in the response for a user to enter when they pick up the phone call. (🏢 not PII)

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. (🏢 not PII)

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. (🏢 not PII)

HostedNumberOrdersステータス値

Status 概要
twilio-processing Twilio is processing your request and will either send to the failed status if the number is not eligible to be hosted, or move the number to received status.
received TwilioはHostedNumberOrderリクエストを受信し、リクエスト中の電話番号がTwilioのプラットフォーム上でホスト可能であると判断しました。
pending-verification Twilio is awaiting the Hosted Number Order to be verified by the end-user by picking up the phone and listening to a security token, or supplying a copy of the phone bill. The verification code is valid for 10 minutes. Subsequent calls to the API within the expiration time will send the same verification code. There can be a max of three verification attempts before the status changes to action_required.
検証済み Twilioはセキュリティートークンによってその電話に出た個人がSMSをホストするリクエストを検証したことを確認しました。
pending-loa HostedNumberOrder用の委任状が生成されましたが、ドキュメントがHostedNumberOrdrで指定されたメール受信者によって署名されていません。
carrier-processing HostedNumberOrderに対する委任状が署名され、電話番号はTwilioの契約しているプロバイダーまたはキャリアーに対して指定された機能をオンにするよう申請しました。
testing 電話番号はこのオーダーで指定された機能に対するケイパビリティーテストを実行中です。
completed HostedNumberOrderのオンボーディングが完了し、電話番号の使用準備が整いました。
action-required HostedNumberOrderのオンボーディングが失敗しました。 オペレーションスペシャリストが失敗について調査を行います。
failed HostedNumberOrderが電話番号の現在のプロバイダーまたはキャリアーによって否認されました。 この時点で、同じリクエストの再送信はできなくなります。

HostedNumberOrdersステータスコールバック

StatusCallbackURLをAPIリクエストに指定している場合、Hosted Number Ordersのステータスが変化すると、Twilioは非同期のHTTPリクエストをそのURLに送信します。 このリクエストを捕捉することで、Hosted Number Ordersのステータスが変化したことを知ることができます。

The Hosted Number Orders status callback request passes the additional parameters listed in the table below:

Status 概要
Status Hosted Number Orderの新しいステータスです
HostedNumberOrderSid Hosted Number Orderの一意なSIDです。
PhoneNumber The +E.164 format of the Hosted Number Order

HTTP GET

リクエストされたHosted Number OrdersインスタンスリソースSIDによって指定された、単一の既存Hosted Number Ordersインスタンスリソースを返します。

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers
  .hostedNumberOrders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch()
  .then(hosted_number_order => console.log(hosted_number_order.friendlyName))
  .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrder = HostedNumberOrderResource.Fetch(
            pathSid: "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(hostedNumberOrder.FriendlyName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hosted_number_order = $twilio->preview->hostedNumbers->hostedNumberOrders("HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                      ->fetch();

print($hosted_number_order->friendlyName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_order = @client.preview.hosted_numbers
  .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch

puts hosted_number_order.friendly_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_order = client.preview.hosted_numbers \
    .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
    .fetch()

print(hosted_number_order.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder hostedNumberOrder = HostedNumberOrder.fetcher(
                "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .fetch();

        System.out.println(hostedNumberOrder.getFriendlyName());
    }
}
curl -X GET 'https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_delay": 15,
  "capabilities": {
    "sms": true,
    "voice": false
  },
  "cc_emails": [
    "aaa@twilio.com",
    "bbb@twilio.com"
  ],
  "date_created": "2017-03-28T20:06:39Z",
  "date_updated": "2017-03-28T20:06:39Z",
  "email": "test@twilio.com",
  "extension": "5105",
  "failure_reason": "",
  "friendly_name": "friendly_name",
  "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "phone_number": "+15017122661",
  "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "received",
  "unique_name": "foobar",
  "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_attempts": 0,
  "verification_call_sids": [
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
  ],
  "verification_code": "8794",
  "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_type": "phone-call"
}
Fetch Hosted Number Order

HTTP POST

単一の、既に存在するHosted Number Ordersインスタンスリソースのプロパティーの更新を試み、成功した場合は更新済みリソースの表現を返します。 返されたレスポンスはGETリクエストの発行時に上記で返されたものと同一です。

HostedNumberOrdersインスタンスPOSTオプションパラメーター

名前 概要
CallDelay

Optional. The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0. (🏢 not PII)

CcEmails

Optional. Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. (📇 PII MTL: 30 days)

Email

Optional. Email of the owner of this phone number that is being hosted. (📇 PII MTL: 30 days)

内線番号

Optional. Digits to dial after connecting the verification call. (🏢 not PII)

FriendlyName

Optional. A 64 character string that is a human readable text that describes this resource. (📇 PII MTL: 30 days)

Status

Optional. User can only post to pending-verification status to transition the HostedNumberOrder to initiate a verification call or verification of ownership with a copy of a phone bill. (🏢 not PII)

UniqueName

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. (📇 PII MTL: 30 days)

認証コード

Optional. A verification code that is given to the user via a phone call to the phone number that is being hosted. (🏢 not PII)

VerificationDocumentSid

Optional. 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. (🏢 not PII)

VerificationType

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

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers
  .hostedNumberOrders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .update({friendlyName: 'friendlyName'})
  .then(hosted_number_order => console.log(hosted_number_order.friendlyName))
  .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrder = HostedNumberOrderResource.Update(
            friendlyName: "FriendlyName",
            pathSid: "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(hostedNumberOrder.FriendlyName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hosted_number_order = $twilio->preview->hostedNumbers->hostedNumberOrders("HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                      ->update(array(
                                                                   'friendlyName' => "friendlyName"
                                                               )
                                                      );

print($hosted_number_order->friendlyName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_order = @client.preview.hosted_numbers
  .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .update(friendly_name: 'friendly_name')

puts hosted_number_order.friendly_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_order = client.preview.hosted_numbers \
    .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
    .update(friendly_name='friendly_name')

print(hosted_number_order.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder hostedNumberOrder = HostedNumberOrder.updater(
                "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .setFriendlyName("friendlyName").update();

        System.out.println(hostedNumberOrder.getFriendlyName());
    }
}
curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
--data-urlencode "FriendlyName=FriendlyName" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_delay": 15,
  "capabilities": {
    "sms": true,
    "voice": false
  },
  "cc_emails": [
    "test1@twilio.com",
    "test2@twilio.com"
  ],
  "date_created": "2017-03-28T20:06:39Z",
  "date_updated": "2017-03-28T20:06:39Z",
  "email": "test+hosted@twilio.com",
  "extension": "1234",
  "failure_reason": "",
  "friendly_name": "new friendly name",
  "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "phone_number": "+15017122661",
  "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "pending-loa",
  "unique_name": "new unique name",
  "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_attempts": 1,
  "verification_call_sids": [
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
  ],
  "verification_code": "8794",
  "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_type": "phone-call"
}
Update Friendly Name of Hosted Number Order
レスポンス

返却されるレスポンスはGETリクエストの送信時に返却されるものと同一です。

コードサンプルを読み込んでいます...
Language
形式:
  • JSON
curl -XPOST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19 \
  -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
  -d "VerificationType=phone-call" \
  -d "Status=pending-verification"
{
    "status": "pending-verification",
    "date_updated": "2018-01-21T22:31:43Z",
    "verification_code": "310001",
    "incoming_phone_number_sid": "PN876a18805574a952ffb73907b24205f0",
    "failure_reason": "",
    "verification_attempts": 1,
    "verification_type": "phone-call",
    "capabilities": {
        "voice": false,
        "mms": false,
        "sms": true
    },
    "sid": "HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "phone_number": "+18444905863",
    "call_delay": 0,
    "signing_document_sid": null,
    "verification_document_sid": "RI2ad9942e6daa7d8e87a154f6f675f3f8",
    "verification_call_sids": [
        "CA83f7aa47a1760188e892fe8c2ba86749"
    ],
    "extension": null,
    "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "friendly_name": "My_Sms_Hosted_Number_Order",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "date_created": "2018-01-21T21:40:55Z"
}
Prove Ownership with Phone Call
コードサンプルを読み込んでいます...
Language
形式:
  • JSON
curl -XPOST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19 \
  -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
  -d "VerificationType=phone-bill" \
  -d "VerificationDocumentSid=RI2ad9942e6daa7d8e87a154f6f675f3f8"
{
    "status": "received",
    "date_updated": "2018-01-21T22:16:11Z",
    "verification_code": null,
    "incoming_phone_number_sid": "PN876a18805574a952ffb73907b24205f0",
    "failure_reason": "",
    "verification_attempts": 0,
    "verification_type": "phone-bill",
    "capabilities": {
        "mms": false,
        "voice": false,
        "sms": true
    },
    "sid": "HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "phone_number": "+18444905863",
    "call_delay": 0,
    "signing_document_sid": null,
    "verification_document_sid": "RI2ad9942e6daa7d8e87a154f6f675f3f8",
    "verification_call_sids": [],
    "extension": null,
    "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "friendly_name": "My_Sms_Hosted_Number_Order",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "date_created": "2018-01-21T21:40:55Z"
}
Prove Ownership with Phone Bill
Ownership Verification

Ownership Verification is a security measure to host the number with Twilio for SMS to ensure the authenticity of the request.

HTTP DELETE

Cancels the HostedNumberOrder, and consequently, deletes the corresponding IncomingPhoneNumber. Note that you can only issue the DELETE request when the HostedNumberOrder status is in received, pending-verification, verified or pending-loa. Beyond that, you can off-board the Twilio platform by issuing a DELETE request to the corresponding IncomingPhoneNumbers.

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers
      .hostedNumberOrders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
      .remove()
      .then(hosted_number_order => console.log(hosted_number_order.sid))
      .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        HostedNumberOrderResource.Delete(pathSid: "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$twilio->preview->hostedNumbers->hostedNumberOrders("HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                               ->delete();
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.preview.hosted_numbers
               .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
               .delete
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

client.preview.hosted_numbers \
              .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
              .delete()
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder.deleter(
                "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .delete();
    }
}
curl -X DELETE https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
null
Hosted Number Orderを削除する
レスポンス

リクエストが成功すると、レスポンスBodyのないHTTP 204が返されます。

HostedNumberOrdersリストリソース

The HostedNumberOrders list resource represents the list of active and completed or failed Hosted Number Orders for the account.

リソースURI

preview.twilio.com/HostedNumbers/HostedNumberOrders/

リストフィルター

名前 概要
FriendlyName

Optional. A human readable description of this resource, up to 64 characters. (📇 PII MTL: 30 days)

IncomingPhoneNumberSid

Optional. A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. (🏢 not PII)

PhoneNumber

Optional. An E164 formatted phone number hosted by this HostedNumberOrder. (🏢 not PII)

Status

Optional. The Status of this HostedNumberOrder. One of received, pending-verification, verified, pending-loa, carrier-processing, testing, completed, failed, or action-required. (🏢 not PII)

UniqueName

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. (📇 PII MTL: 30 days)

HTTP GET

Retrieves a list of all Hosted Number Orders for an account.

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers.hostedNumberOrders
              .each(hostedNumberOrders => console.log(hostedNumberOrders.sid));
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrders = HostedNumberOrderResource.Read();

        foreach(var record in hostedNumberOrders)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hostedNumberOrders = $twilio->preview->hostedNumbers->hostedNumberOrders
                                                     ->read();

foreach ($hostedNumberOrders as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_orders = @client.preview.hosted_numbers.hosted_number_orders.list

hosted_number_orders.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_orders = client.preview.hosted_numbers.hosted_number_orders \
                                                    .list()

for record in hosted_number_orders:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<HostedNumberOrder> hostedNumberOrders = 
            HostedNumberOrder.reader()
            .read();

        for(HostedNumberOrder record : hostedNumberOrders) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://preview.twilio.com/HostedNumbers/HostedNumberOrders' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "meta": {
    "first_page_url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders?PageSize=50&Page=0",
    "key": "items",
    "next_page_url": null,
    "page": 0,
    "page_size": 50,
    "previous_page_url": null,
    "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders?PageSize=50&Page=0"
  },
  "items": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "call_delay": 15,
      "capabilities": {
        "sms": true,
        "voice": false
      },
      "cc_emails": [
        "aaa@twilio.com",
        "bbb@twilio.com"
      ],
      "date_created": "2017-03-28T20:06:39Z",
      "date_updated": "2017-03-28T20:06:39Z",
      "email": "test@twilio.com",
      "extension": "1234",
      "failure_reason": "",
      "friendly_name": "friendly_name",
      "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "phone_number": "+15017122661",
      "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "received",
      "unique_name": "foobar",
      "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "verification_attempts": 0,
      "verification_call_sids": [
        "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
      ],
      "verification_code": "8794",
      "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "verification_type": "phone-call"
    }
  ]
}
Read Hosted Number Order
レスポンス

上記のインスタンスレスポンスの一覧です。

HTTP POST

Creates a new Hosted Number Order for the specified capability. Currently, only SMS is a supported capability.

パラメーター

名前 概要
PhoneNumber

Required. The number to host in +E.164 format (🏢 not PII)

SmsCapability

Required. Used to specify that the SMS capability will be hosted on Twilio's platform. (🏢 not PII)

AccountSid

Optional. 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. (🏢 not PII)

AddressSid

Optional. Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. (🏢 not PII)

CcEmails

Optional. Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. (📇 PII MTL: 30 days)

Email

Optional. Optional. Email of the owner of this phone number that is being hosted. (📇 PII MTL: 30 days)

FriendlyName

Optional. A 64 character string that is a human readable text that describes this resource. (📇 PII MTL: 30 days)

SmsApplicationSid

Optional. 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. (🏢 not PII)

SmsFallbackMethod

Optional. 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. (🏢 not PII)

SmsFallbackUrl

Optional. 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. (🏢 not PII)

SmsMethod

Optional. 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. (🏢 not PII)

SmsUrl

Optional. The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. (🏢 not PII)

StatusCallbackMethod

Optional. Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. (🏢 not PII)

Status Callback URL

Optional. Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. (🏢 not PII)

UniqueName

Optional. 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. (📇 PII MTL: 30 days)

VerificationDocumentSid

Optional. 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. (🏢 not PII)

VerificationType

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

コードサンプルを読み込んでいます...
Language
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers.hostedNumberOrders
      .create({phoneNumber: '+15017122661', smsCapability: true})
      .then(hosted_number_order => console.log(hosted_number_order.sid))
      .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrder = HostedNumberOrderResource.Create(
            phoneNumber: new Twilio.Types.PhoneNumber("+15017122661"),
            smsCapability: true
        );

        Console.WriteLine(hostedNumberOrder.Sid);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hosted_number_order = $twilio->preview->hostedNumbers->hostedNumberOrders
                                                      ->create("+15017122661",
                                                               True
                                                      );

print($hosted_number_order->sid);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_order = @client.preview.hosted_numbers.hosted_number_orders
                                     .create(
                                        phone_number: '+15017122661',
                                        sms_capability: true
                                      )

puts hosted_number_order.sid
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_order = client.preview.hosted_numbers.hosted_number_orders \
                                    .create(
                                         phone_number='+15017122661',
                                         sms_capability=True
                                     )

print(hosted_number_order.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder hostedNumberOrder = HostedNumberOrder.creator(
                new com.twilio.type.PhoneNumber("+15017122661"),
                true)
            .create();

        System.out.println(hostedNumberOrder.getSid());
    }
}
curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders \
--data-urlencode "PhoneNumber=+15017122661" \
--data-urlencode "SmsCapability=True" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_delay": 0,
  "capabilities": {
    "sms": true,
    "voice": false
  },
  "cc_emails": [],
  "date_created": "2017-03-28T20:06:39Z",
  "date_updated": "2017-03-28T20:06:39Z",
  "email": "test@twilio.com",
  "extension": null,
  "failure_reason": "",
  "friendly_name": null,
  "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "phone_number": "+15017122661",
  "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "received",
  "unique_name": null,
  "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_attempts": 0,
  "verification_call_sids": null,
  "verification_code": null,
  "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_type": "phone-call"
}
Create Hosted Number Order
レスポンス

返されるレスポンスは、HostedNumberOrdersインスタンスリソースへのGETリクエストの送信時に返されるものと同一です。

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。

コードサンプルを読み込んでいます...
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers
  .hostedNumberOrders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch()
  .then(hosted_number_order => console.log(hosted_number_order.friendlyName))
  .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrder = HostedNumberOrderResource.Fetch(
            pathSid: "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(hostedNumberOrder.FriendlyName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hosted_number_order = $twilio->preview->hostedNumbers->hostedNumberOrders("HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                      ->fetch();

print($hosted_number_order->friendlyName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_order = @client.preview.hosted_numbers
  .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch

puts hosted_number_order.friendly_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_order = client.preview.hosted_numbers \
    .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
    .fetch()

print(hosted_number_order.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder hostedNumberOrder = HostedNumberOrder.fetcher(
                "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .fetch();

        System.out.println(hostedNumberOrder.getFriendlyName());
    }
}
curl -X GET 'https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_delay": 15,
  "capabilities": {
    "sms": true,
    "voice": false
  },
  "cc_emails": [
    "aaa@twilio.com",
    "bbb@twilio.com"
  ],
  "date_created": "2017-03-28T20:06:39Z",
  "date_updated": "2017-03-28T20:06:39Z",
  "email": "test@twilio.com",
  "extension": "5105",
  "failure_reason": "",
  "friendly_name": "friendly_name",
  "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "phone_number": "+15017122661",
  "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "received",
  "unique_name": "foobar",
  "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_attempts": 0,
  "verification_call_sids": [
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
  ],
  "verification_code": "8794",
  "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_type": "phone-call"
}
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers
  .hostedNumberOrders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .update({friendlyName: 'friendlyName'})
  .then(hosted_number_order => console.log(hosted_number_order.friendlyName))
  .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrder = HostedNumberOrderResource.Update(
            friendlyName: "FriendlyName",
            pathSid: "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(hostedNumberOrder.FriendlyName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hosted_number_order = $twilio->preview->hostedNumbers->hostedNumberOrders("HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                      ->update(array(
                                                                   'friendlyName' => "friendlyName"
                                                               )
                                                      );

print($hosted_number_order->friendlyName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_order = @client.preview.hosted_numbers
  .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .update(friendly_name: 'friendly_name')

puts hosted_number_order.friendly_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_order = client.preview.hosted_numbers \
    .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
    .update(friendly_name='friendly_name')

print(hosted_number_order.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder hostedNumberOrder = HostedNumberOrder.updater(
                "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .setFriendlyName("friendlyName").update();

        System.out.println(hostedNumberOrder.getFriendlyName());
    }
}
curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
--data-urlencode "FriendlyName=FriendlyName" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_delay": 15,
  "capabilities": {
    "sms": true,
    "voice": false
  },
  "cc_emails": [
    "test1@twilio.com",
    "test2@twilio.com"
  ],
  "date_created": "2017-03-28T20:06:39Z",
  "date_updated": "2017-03-28T20:06:39Z",
  "email": "test+hosted@twilio.com",
  "extension": "1234",
  "failure_reason": "",
  "friendly_name": "new friendly name",
  "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "phone_number": "+15017122661",
  "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "pending-loa",
  "unique_name": "new unique name",
  "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_attempts": 1,
  "verification_call_sids": [
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
  ],
  "verification_code": "8794",
  "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_type": "phone-call"
}
形式:
  • JSON
curl -XPOST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19 \
  -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
  -d "VerificationType=phone-call" \
  -d "Status=pending-verification"
{
    "status": "pending-verification",
    "date_updated": "2018-01-21T22:31:43Z",
    "verification_code": "310001",
    "incoming_phone_number_sid": "PN876a18805574a952ffb73907b24205f0",
    "failure_reason": "",
    "verification_attempts": 1,
    "verification_type": "phone-call",
    "capabilities": {
        "voice": false,
        "mms": false,
        "sms": true
    },
    "sid": "HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "phone_number": "+18444905863",
    "call_delay": 0,
    "signing_document_sid": null,
    "verification_document_sid": "RI2ad9942e6daa7d8e87a154f6f675f3f8",
    "verification_call_sids": [
        "CA83f7aa47a1760188e892fe8c2ba86749"
    ],
    "extension": null,
    "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "friendly_name": "My_Sms_Hosted_Number_Order",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "date_created": "2018-01-21T21:40:55Z"
}
形式:
  • JSON
curl -XPOST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19 \
  -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
  -d "VerificationType=phone-bill" \
  -d "VerificationDocumentSid=RI2ad9942e6daa7d8e87a154f6f675f3f8"
{
    "status": "received",
    "date_updated": "2018-01-21T22:16:11Z",
    "verification_code": null,
    "incoming_phone_number_sid": "PN876a18805574a952ffb73907b24205f0",
    "failure_reason": "",
    "verification_attempts": 0,
    "verification_type": "phone-bill",
    "capabilities": {
        "mms": false,
        "voice": false,
        "sms": true
    },
    "sid": "HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "phone_number": "+18444905863",
    "call_delay": 0,
    "signing_document_sid": null,
    "verification_document_sid": "RI2ad9942e6daa7d8e87a154f6f675f3f8",
    "verification_call_sids": [],
    "extension": null,
    "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR36f3f0c7c8d5d9210114fdcd8b6bcf19",
    "friendly_name": "My_Sms_Hosted_Number_Order",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "date_created": "2018-01-21T21:40:55Z"
}
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers
      .hostedNumberOrders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
      .remove()
      .then(hosted_number_order => console.log(hosted_number_order.sid))
      .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        HostedNumberOrderResource.Delete(pathSid: "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$twilio->preview->hostedNumbers->hostedNumberOrders("HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                               ->delete();
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.preview.hosted_numbers
               .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
               .delete
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

client.preview.hosted_numbers \
              .hosted_number_orders('HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
              .delete()
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder.deleter(
                "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .delete();
    }
}
curl -X DELETE https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
null
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers.hostedNumberOrders
              .each(hostedNumberOrders => console.log(hostedNumberOrders.sid));
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrders = HostedNumberOrderResource.Read();

        foreach(var record in hostedNumberOrders)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hostedNumberOrders = $twilio->preview->hostedNumbers->hostedNumberOrders
                                                     ->read();

foreach ($hostedNumberOrders as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_orders = @client.preview.hosted_numbers.hosted_number_orders.list

hosted_number_orders.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_orders = client.preview.hosted_numbers.hosted_number_orders \
                                                    .list()

for record in hosted_number_orders:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<HostedNumberOrder> hostedNumberOrders = 
            HostedNumberOrder.reader()
            .read();

        for(HostedNumberOrder record : hostedNumberOrders) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://preview.twilio.com/HostedNumbers/HostedNumberOrders' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "meta": {
    "first_page_url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders?PageSize=50&Page=0",
    "key": "items",
    "next_page_url": null,
    "page": 0,
    "page_size": 50,
    "previous_page_url": null,
    "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders?PageSize=50&Page=0"
  },
  "items": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "call_delay": 15,
      "capabilities": {
        "sms": true,
        "voice": false
      },
      "cc_emails": [
        "aaa@twilio.com",
        "bbb@twilio.com"
      ],
      "date_created": "2017-03-28T20:06:39Z",
      "date_updated": "2017-03-28T20:06:39Z",
      "email": "test@twilio.com",
      "extension": "1234",
      "failure_reason": "",
      "friendly_name": "friendly_name",
      "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "phone_number": "+15017122661",
      "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "received",
      "unique_name": "foobar",
      "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "verification_attempts": 0,
      "verification_call_sids": [
        "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
      ],
      "verification_code": "8794",
      "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "verification_type": "phone-call"
    }
  ]
}
SDKバージョン:
  • 5.x
レスポンス形式:
  • JSON
SDKバージョン:
  • 7.x
SDKバージョン:
  • 3.x
SDKバージョン:
  • 5.x
SDKバージョン:
  • 6.x
SDKバージョン:
  • 5.x
形式:
  • JSON
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.preview.hosted_numbers.hostedNumberOrders
      .create({phoneNumber: '+15017122661', smsCapability: true})
      .then(hosted_number_order => console.log(hosted_number_order.sid))
      .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Preview.HostedNumbers;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var hostedNumberOrder = HostedNumberOrderResource.Create(
            phoneNumber: new Twilio.Types.PhoneNumber("+15017122661"),
            smsCapability: true
        );

        Console.WriteLine(hostedNumberOrder.Sid);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$hosted_number_order = $twilio->preview->hostedNumbers->hostedNumberOrders
                                                      ->create("+15017122661",
                                                               True
                                                      );

print($hosted_number_order->sid);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

hosted_number_order = @client.preview.hosted_numbers.hosted_number_orders
                                     .create(
                                        phone_number: '+15017122661',
                                        sms_capability: true
                                      )

puts hosted_number_order.sid
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

hosted_number_order = client.preview.hosted_numbers.hosted_number_orders \
                                    .create(
                                         phone_number='+15017122661',
                                         sms_capability=True
                                     )

print(hosted_number_order.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.preview.hostedNumbers.HostedNumberOrder;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        HostedNumberOrder hostedNumberOrder = HostedNumberOrder.creator(
                new com.twilio.type.PhoneNumber("+15017122661"),
                true)
            .create();

        System.out.println(hostedNumberOrder.getSid());
    }
}
curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders \
--data-urlencode "PhoneNumber=+15017122661" \
--data-urlencode "SmsCapability=True" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_delay": 0,
  "capabilities": {
    "sms": true,
    "voice": false
  },
  "cc_emails": [],
  "date_created": "2017-03-28T20:06:39Z",
  "date_updated": "2017-03-28T20:06:39Z",
  "email": "test@twilio.com",
  "extension": null,
  "failure_reason": "",
  "friendly_name": null,
  "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "phone_number": "+15017122661",
  "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "signing_document_sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "received",
  "unique_name": null,
  "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_attempts": 0,
  "verification_call_sids": null,
  "verification_code": null,
  "verification_document_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "verification_type": "phone-call"
}