REST API: Hosted Numbers

Hosted Numbers API is currently in Developer Preview

HostedNumberOrders Instance Resource

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

The HostedNumberOrders list resource represents an account's requests for hosted phone numbers. You can POST to the list resource to create a new request to host a phone number. Upon creation of a HostedNumberOrders resource, a corresponding IncomingPhoneNumbers resource will also be created.

Resource URI

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

Resource Properties

Property Description
Sid A 34 character string that uniquely identifies this HostedNumberOrder.
Accountsid A 34 character string that uniquely identifies the account.
IncomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource that represents the phone number being hosted.
AddressSid A 34 character string that uniquely identifies the Address resource that represents the address and name of the owner of this phone number.
SigningDocumentSid A 34 character string that uniquely identifies the Letter of Authorization (LOA) document the user needs to sign.
PhoneNumber Phone number to be hosted. This must be in E.164 format, e.g., +16175551212
Capabilities Set of booleans describing the capabilities hosted on Twilio's platform.
FriendlyName A 64 character string that is a human readable text that describes this resource.
UniqueName A 64 character string that uniquely identifies this HostedNumberOrder for this account.
Status Status of this resource. It can hold one of the values: 1. Received, 2. Pending LOA, 3. Carrier Processing, 4. Completed, 5. Action Required, 6. Failed. See section entitled HostedNumberOrders Status Values for more information on each of these statuses.
DateCreated The date this resource was created, given as GMT RFC 2822 format.
DateUpdated The date that this resource was updated, given as GMT RFC 2822 format.
Email Email address of the person who owns the phone number. Please note that this person must be the one who is authorized to and will sign the LOA.
CcEmails List of email address(es) of the person/people that the LOA will be carbon-copied to.
VerificationType The type of ownership verification required to move the number to a verified state. The verification methods are phone-call or phone-bill.
VerificationDocumentSid The Identity Document that shows proof of ownership with a Copy of a Phone Bill.

HostedNumberOrders Status Values

Status Description
received Twilio has received the HostedNumberOrder request and determined that the phone number in the request can be hosted on Twilio’s platform.
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.
verified Twilio has confirmed with a security token that the person answering the phone has verified their request for Hosted SMS
pending-loa LOA for the HostedNumberOrder has been generated, but the document has not yet been signed by the email recipient specified on the HostedNumberOrder.
carrier-processing LOA for the HostedNumberOrder has been signed, and the phone number has been submitted to Twilio’s underlying provider/carrier to enable the specified capabilities.
testing The phone number is undergoing capability testing for the capabilities specified in this order.
completed HostedNumberOrder onboarding has completed and the phone number is ready for use.
action-required HostedNumberOrder onboarding encountered a failure. An operations specialist will investigate the failure.
failed HostedNumberOrder was rejected by the current provider/carrier of the phone number. At this point, it is no longer possible to re-submit the same request.

HostedNumberOrders Status Callback

When a Hosted Number Order changes status, Twilio will make an asynchronous HTTP request to the StatusCallback URL if you provided one in your API request. By capturing this request, you can determine when the Hosted Number Order changes status.

The Hosted Number Orders status callback request passes these additional parameters:

Status Description
Status The new status of the Hosted Number Order
HostedNumberOrderSid The unique sid of the Hosted Number Order
PhoneNumber The +E.164 format of the Hosted Number Order

HTTP GET

Returns a single, existing Hosted Number Orders instance resource specified by the requested Hosted Number Orders instance resource SID.

Loading Code Samples...
Language
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRd1af6b015e256ca5635dc9eff5526f7f \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "address_sid": "AD24201ec22741185ec27f8c8eaae1b6aa",
    "capabilities": {
        "sms": true,
        "voice": false
    },
    "cc_emails": [],
    "date_created": "2017-01-05T03:23:40Z",
    "date_updated": "2017-04-28T21:36:25Z",
    "email": "first@last.com",
    "friendly_name": "+1 (917)-123-1234",
    "incoming_phone_number_sid": "PN122e5ca6abe3025f69010b3109d33fc1",
    "phone_number": "+19171231234",
    "sid": "HRd1af6b015e256ca5635dc9eff5526f7f",
    "signing_document_sid": null,
    "status": "received",
    "unique_name": null,
    "url": "https://preview.dev.twilio.com/HostedNumbers/HostedNumberOrders/HRd1af6b015e256ca5635dc9eff5526f7f"
}
Get Hosted Number Order Instance

HTTP POST

Tries to update a single, existing Hosted Number Orders instance resource’s properties and returns the updated resource representation if successful. The returned response is identical to that returned above when making a GET request.

HostedNumberOrders Instance POST Optional Parameters

Parameter Description
FriendlyName A 64 character string that is a human readable text that describes this resource.
UniqueName A 64 character string that uniquely identifies this HostedNumberOrder for this account.
Status User can only post to pending-verification or "pending-loa" statuses to transition the HostedNumberOrder to initiate a Verification call or generate the LOA document to sign.
VerificationType Initiates either a phone-call or phone-bill when moving a number to pending-verification
VerificationDocumentSid The Document SID used to verify proof of ownership with a copy of a phone bill.
VerificationCode A verification code that is given to the user via a phone call to the phone number that is being hosted.
Loading Code Samples...
Language
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRdeaf6b015e256ca5635dc9eff5526f7f \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
    -d "FriendlyName=Office Number" \
    -d "UniqueName=OfficeId123" \
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "address_sid": "AD24201ec22741185ec27f8c8eaae1b6aa",
    "capabilities": {
        "sms": true,
        "voice": false
    },
    "cc_emails": ["person1@example.com","person2@example.com"],
    "date_created": "2017-01-05T03:23:40Z",
    "date_updated": "2017-04-28T21:36:25Z",
    "email": "first@last.com",
    "friendly_name": "Office Number",
    "incoming_phone_number_sid": "PN122e5ca6abe3025f69010b3109d33fc1",
    "phone_number": "+19171231234",
    "sid": "HRd1af6b015e256ca5635dc9eff5526f7f",
    "signing_document_sid": null,
    "status": "pending-loa",
    "unique_name": "OfficeId123",
    "url": "https://preview.dev.twilio.com/HostedNumbers/HostedNumberOrders/HRd1af6b015e256ca5635dc9eff5526f7f"
}
Update Hosted Number Order Instance
Response

The returned response is identical to that returned when making a GET 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.

Loading Code Samples...
Language
Response Format:
  • JSON
$ curl -X DELETE https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Delete Hosted Number Order
Response

A successful request will result in an HTTP 204 with no response body.

HostedNumberOrders List Resource

The HostedNumberOrders list resource represents the list of active and completed HostedNumberOrders for the account.

Resource URI

preview.twilio.com/HostedNumbers/HostedNumberOrders/

List Filters

Parameter Description
Status Only retrieve the list of HostedNumberOrders in this status.
PhoneNumber Retrieve the HostedNumberOrders with this PhoneNumber.
IncomingPhoneNumberSid Retrieve the HostedNumberOrders with this IncomingPhoneNumberSid.
FriendlyName Retrieve the HostedNumberOrders with this FriendlyName.
UniqueName Retried the HostedNumberOrders with this UniqueName.

HTTP GET

Retrieves list of all HostedNumberOrders for account.

Loading Code Samples...
Language
Response Format:
  • json
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/HostedNumberOrders \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "items": [
        {
            "phone_number": "+14155555554",
            "status": "failed",
            "unique_name": "",
            "verification_attempts": 0,
            "date_updated": "2017-06-12T15:04:27Z",
            "cc_emails": [],
            "friendly_name": "Testing Hosted SMS at Signal",
            "capabilities": {
                "voice": false,
                "sms": true
            },
            "incoming_phone_number_sid": "PN8618150c097bc26c8bc3587a90a9b566",
            "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR0e4efad858b7d57689c56c05697194b4",
            "address_sid": "AD62997d85ea75544b2d64152be365e7a5",
            "sid": "HR0e4efad858b7d57689c56c05697194b4",
            "date_created": "2017-05-25T23:09:24Z",
            "account_sid": "AC88ee0ab4d9b05ff4a64ce23f7ee9edc7",
            "email": "hostedsms@twilio.com",
            "signing_document_sid": "PX747aa0fe281cf16e3f28adaca65edc30"
        },
        {
            "phone_number": "+14155555555",
            "status": "completed",
            "unique_name": "",
            "verification_attempts": 0,
            "date_updated": "2017-06-09T16:32:08Z",
            "cc_emails": [],
            "friendly_name": "Testing Hosted SMS at Signal",
            "capabilities": {
                "voice": false,
                "sms": true
            },
            "incoming_phone_number_sid": "PN6cc7174ebe58c596ff94ab77aebe4037",
            "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR197f38b33863e0f79d6518267181a439",
            "address_sid": "AD62997d85ea75544b2d64152be365e7a5",
            "sid": "HR197f38b33863e0f79d6518267181a439",
            "date_created": "2017-05-25T19:58:35Z",
            "account_sid": "AC88ee0ab4d9b05ff4a64ce23f7ee9edc7",
            "email": "hostedsms@twilio.com",
            "signing_document_sid": "PX7405c018e9c449c1b9cbb562239a5004"
        }
    ]
}
Retrieve List of all Hosted Number Orders
Response

List of the instance responses above.

HTTP POST

Creates a new HostedNumberOrder for the specified capability.

Required Parameters

Parameters Description
PhoneNumber The number to host in E164 format
SmsCapability Explicitly specify SMS as the capability to host on Twilio's platform.

Optional Parameters

Parameters Description
AccountSid 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.
FriendlyName A 64 character string that is a human readable text that describes this resource.
UniqueName A 64 character string that uniquely identifies this HostedNumberOrder for this account.
SmsUrl The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.
SmsMethod 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.
SmsFallbackUrl 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.
SmsFallbackMethod 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.
StatusCallbackUrl A URL that Twilio will request when the Hosted Number Order status changes.
StatusCallbackMethod The HTTP method Twilio should use when requesting the above URL. Defaults to GET.
Loading Code Samples...
Language
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders \
    -d "PhoneNumber=+19171231234" \
    -d "IsoCountry=US" \
    -d "SmsCapability=true"  \
    -d "FriendlyName=HostedNumberOrder1" \
    -d "StatusCallbackUrl=http://example.com/callback" \
    -d "StatusCallbackMethod=POST" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "capabilities": {
        "sms": true,
        "voice": false
    },
    "cc_emails": [],
    "date_created": "2017-01-05T03:23:40Z",
    "date_updated": "2017-04-28T21:36:25Z",
    "email": "owner@example.com",
    "friendly_name": "HostedNumberOrder1",
    "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "phone_number": "+19171231234",
    "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "signing_document_sid": null,
    "status": "received",
    "unique_name": null,
    "url": "https://preview.dev.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Create new Hosted Number Order
Response

The returned response is identical to that returned when making a GET to a HostedNumberOrders instance response.

AuthorizationDocuments Instance Resource

The AuthorizationDocuments instance resource represents a single request to host a customer's phone number(s) onto the Twilio platform for a given capability.

Resource URI

preview.twilio.com/HostedNumbers/AuthorizationDocuments/{AuthorizationDocumentSid}

Resource Properties

Property Description
AddressSid 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.
CcEmails A list of emails that this AuthorizationDocument will be carbon copied to.
DateCreated The date that this AuthorizationDocument was created, given in ISO 8601 format.
DateUpdated The date that this AuthorizationDocument was updated, given in ISO 8601 format.
Sid A 34 character string that uniquely identifies this AuthorizationDocument.
Status The Status of this AuthorizationDocument. One of opened, signing, signed, canceled, or failed.

AuthorizationDocument Status Values

Status Description
opened AuthorizationDocument is in open status and can be updated with numbers or information
signing AuthorizationDocument is in signing status and cannot be updated
signed AuthorizationDocument has been signed and cannot be updated
canceled AuthorizationDocument has been canceled and cannot be updated
failed AuthorizationDocument has failed and cannot be updated
Loading Code Samples...
Language
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "status": "signing",
    "date_updated": "2017-10-12T22:27:14Z",
    "cc_emails": [
        "hostedsms+test@twilio.com"
    ],
    "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead",
    "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
    "sid": "PXeb2bd370aa325bec073ed6f2a9427ead",
    "date_created": "2017-10-12T22:27:13Z",
    "email": "hostedsms@twilio.com"
}
Get AuthorizationDocument

HTTP GET

Returns a single, existing Authorization Documents instance resource specified by the requested Hosted Number Orders instance resource SID.

Loading Code Samples...
Language
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
    -d "CcEmails=person1@example.com&CcEmails=person2@example.com" \
    -d "Status=signing"
Your code here
Update AuthorizationDocument

HTTP POST

Tries to update a single, existing Authorization Documents instance resource’s properties and returns the updated resource representation if successful. The returned response is identical to that returned above when making a GET request.

Note: Authorization Documents can only be updated when in opened status. To edit, POST Status to opened.

AuthorizationDocuments Instance POST Optional Parameters

Parameter Description
AddressSid 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.
CcEmails List of email address(es) of the person/people that the LOA will be carbon-copied to.
Status The Status of this AuthorizationDocument. User can only update this to opened when AuthorizationDocument is in signing, or signing when AuthorizationDocument is in opened.
HostedNumberOrderSids A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
Loading Code Samples...
Language
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
    -d "Status=opened" \
    -d "HostedNumberOrderSids="
    
{
    "status": "opened",
    "date_updated": "2017-10-15T19:23:28Z",
    "cc_emails": [
        "admin@example.com",
        "builder@example.com",
    ],
    "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead",
    "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
    "sid": "PXeb2bd370aa325bec073ed6f2a9427ead",
    "date_created": "2017-10-12T22:27:13Z",
    "email": "ploomis@example.com"
}
Remove all HostedNumberOrderSids from an Authorization Document

Note: Creating a new instance from the list resource is implicit. Any HostedNumberOrderSids passed will be the full list of HNOs. If a HostedNumberOrderSid is in pending-loa and assigned to a SigningDocumentSid, an error in the response will be received. To remove all HostedNumberOrderSids from the Authorization Document, you can POST with an empty parameter.

Loading Code Samples...
Language
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/AuthorizationDocuments \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "items": [
        {
            "status": "signing",
            "date_updated": "2017-10-12T22:27:14Z",
            "cc_emails": [
                "ploomis+test@twilio.com"
            ],
            "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead",
            "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
            "sid": "PXeb2bd370aa325bec073ed6f2a9427ead",
            "date_created": "2017-10-12T22:27:13Z",
            "email": "ploomis@twilio.com"
        },
        {
            "status": "signing",
            "date_updated": "2017-09-25T15:51:47Z",
            "cc_emails": [],
            "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXd779ed2b3273397a45ef3d5ce2f6096f",
            "address_sid": "AD9098eed00e240e3f47b3ad27ac8eb3dd",
            "sid": "PXd779ed2b3273397a45ef3d5ce2f6096f",
            "date_created": "2017-09-25T15:51:46Z",
            "email": "ploomis+test@twilio.com"
        }
    ],
    "meta": {
        "page": 0,
        "page_size": 50,
        "first_page_url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "items"
    }
}
Get list of AuthorizationDocuments

AuthorizationDocuments List Resource

The AuthorizationDocuments list resource represents the list of active and inactive AuthorizationDocuments for the account.

Resource URI

preview.twilio.com/HostedNumbers/AuthorizationDocuments

List Filters

There are no list filters at this time.

HTTP GET

Retrieves list of all HostedNumberOrders for account.

Loading Code Samples...
Language
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
    -d "HostedNumberOrderSids=HR7e42fbbfb47d17baaae45d94c34ec4c3" \
    -d "HostedNumberOrderSids=HR18b3fc4bb26c368ceff1587ec26bf892" \
    -d "HostedNumberOrderSids=HR842cc9ce52ce257da378c2972f88fecc" \
    -d "HostedNumberOrderSids=HRc401d83d7d66901d2b65a4700457272d" \
    -d "AddressSid=AD1e20d20a7772e157c8ddbaba36aefef0" \ 
    -d "Email=owner@example.com" \
    -d "CcEmails=admin@example.com&CcEmails=builder@example.com" \
    
{
    "status": "signing",
    "date_updated": "2017-10-16T23:54:59Z",
    "cc_emails": [
        "admin@example.com",
        "builder@example.com"
    ],
    "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PX5b7889b420ec6bca465c068f5bc2b67e",
    "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
    "sid": "PX5b7889b420ec6bca465c068f5bc2b67e",
    "date_created": "2017-10-16T23:54:58Z",
    "email": "owner@example.com"
}
Create new Authorization Document

HTTP POST

Create an AuthorizationDocument for authorizing the hosting of phone number capabilities on Twilio's platform. The resource is explicit and all Hosted Number Orders added upon creation are the entire list of numbers. Once the POST to create a new Authorization Document has been created, the LOA will immediately be sent out. To update the Authorization Document, update the Status to opened.

Required Parameters

Parameters Description
HostedNumberOrders A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
AddressSid This is the reference to the Address resource whose address is associated with the phone number’s owner. This address will be referenced in the LOA.
Email The email of the owner of the phone number. Must be authorized to sign the LOA document.

Optional Parameters

Parameters Description
CCEmails List of emails that the LOA document will be carbon copied to.
Status The Status of this AuthorizationDocument. One of opened, signing, signed, canceled, or failed.

HTTP DELETE

There is no DELETE functionality for Authorization Documents List Resource.

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

1 / 1
Loading Code Samples...
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRd1af6b015e256ca5635dc9eff5526f7f \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "address_sid": "AD24201ec22741185ec27f8c8eaae1b6aa",
    "capabilities": {
        "sms": true,
        "voice": false
    },
    "cc_emails": [],
    "date_created": "2017-01-05T03:23:40Z",
    "date_updated": "2017-04-28T21:36:25Z",
    "email": "first@last.com",
    "friendly_name": "+1 (917)-123-1234",
    "incoming_phone_number_sid": "PN122e5ca6abe3025f69010b3109d33fc1",
    "phone_number": "+19171231234",
    "sid": "HRd1af6b015e256ca5635dc9eff5526f7f",
    "signing_document_sid": null,
    "status": "received",
    "unique_name": null,
    "url": "https://preview.dev.twilio.com/HostedNumbers/HostedNumberOrders/HRd1af6b015e256ca5635dc9eff5526f7f"
}
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRdeaf6b015e256ca5635dc9eff5526f7f \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
    -d "FriendlyName=Office Number" \
    -d "UniqueName=OfficeId123" \
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "address_sid": "AD24201ec22741185ec27f8c8eaae1b6aa",
    "capabilities": {
        "sms": true,
        "voice": false
    },
    "cc_emails": ["person1@example.com","person2@example.com"],
    "date_created": "2017-01-05T03:23:40Z",
    "date_updated": "2017-04-28T21:36:25Z",
    "email": "first@last.com",
    "friendly_name": "Office Number",
    "incoming_phone_number_sid": "PN122e5ca6abe3025f69010b3109d33fc1",
    "phone_number": "+19171231234",
    "sid": "HRd1af6b015e256ca5635dc9eff5526f7f",
    "signing_document_sid": null,
    "status": "pending-loa",
    "unique_name": "OfficeId123",
    "url": "https://preview.dev.twilio.com/HostedNumbers/HostedNumberOrders/HRd1af6b015e256ca5635dc9eff5526f7f"
}
Response Format:
  • JSON
$ curl -X DELETE https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Response Format:
  • json
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/HostedNumberOrders \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "items": [
        {
            "phone_number": "+14155555554",
            "status": "failed",
            "unique_name": "",
            "verification_attempts": 0,
            "date_updated": "2017-06-12T15:04:27Z",
            "cc_emails": [],
            "friendly_name": "Testing Hosted SMS at Signal",
            "capabilities": {
                "voice": false,
                "sms": true
            },
            "incoming_phone_number_sid": "PN8618150c097bc26c8bc3587a90a9b566",
            "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR0e4efad858b7d57689c56c05697194b4",
            "address_sid": "AD62997d85ea75544b2d64152be365e7a5",
            "sid": "HR0e4efad858b7d57689c56c05697194b4",
            "date_created": "2017-05-25T23:09:24Z",
            "account_sid": "AC88ee0ab4d9b05ff4a64ce23f7ee9edc7",
            "email": "hostedsms@twilio.com",
            "signing_document_sid": "PX747aa0fe281cf16e3f28adaca65edc30"
        },
        {
            "phone_number": "+14155555555",
            "status": "completed",
            "unique_name": "",
            "verification_attempts": 0,
            "date_updated": "2017-06-09T16:32:08Z",
            "cc_emails": [],
            "friendly_name": "Testing Hosted SMS at Signal",
            "capabilities": {
                "voice": false,
                "sms": true
            },
            "incoming_phone_number_sid": "PN6cc7174ebe58c596ff94ab77aebe4037",
            "url": "https://preview.twilio.com/HostedNumbers/HostedNumberOrders/HR197f38b33863e0f79d6518267181a439",
            "address_sid": "AD62997d85ea75544b2d64152be365e7a5",
            "sid": "HR197f38b33863e0f79d6518267181a439",
            "date_created": "2017-05-25T19:58:35Z",
            "account_sid": "AC88ee0ab4d9b05ff4a64ce23f7ee9edc7",
            "email": "hostedsms@twilio.com",
            "signing_document_sid": "PX7405c018e9c449c1b9cbb562239a5004"
        }
    ]
}
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/HostedNumberOrders \
    -d "PhoneNumber=+19171231234" \
    -d "IsoCountry=US" \
    -d "SmsCapability=true"  \
    -d "FriendlyName=HostedNumberOrder1" \
    -d "StatusCallbackUrl=http://example.com/callback" \
    -d "StatusCallbackMethod=POST" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "capabilities": {
        "sms": true,
        "voice": false
    },
    "cc_emails": [],
    "date_created": "2017-01-05T03:23:40Z",
    "date_updated": "2017-04-28T21:36:25Z",
    "email": "owner@example.com",
    "friendly_name": "HostedNumberOrder1",
    "incoming_phone_number_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "phone_number": "+19171231234",
    "sid": "HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "signing_document_sid": null,
    "status": "received",
    "unique_name": null,
    "url": "https://preview.dev.twilio.com/HostedNumbers/HostedNumberOrders/HRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "status": "signing",
    "date_updated": "2017-10-12T22:27:14Z",
    "cc_emails": [
        "hostedsms+test@twilio.com"
    ],
    "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead",
    "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
    "sid": "PXeb2bd370aa325bec073ed6f2a9427ead",
    "date_created": "2017-10-12T22:27:13Z",
    "email": "hostedsms@twilio.com"
}
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
    -d "CcEmails=person1@example.com&CcEmails=person2@example.com" \
    -d "Status=signing"
Your code here
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' \
    -d "Status=opened" \
    -d "HostedNumberOrderSids="
    
{
    "status": "opened",
    "date_updated": "2017-10-15T19:23:28Z",
    "cc_emails": [
        "admin@example.com",
        "builder@example.com",
    ],
    "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead",
    "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
    "sid": "PXeb2bd370aa325bec073ed6f2a9427ead",
    "date_created": "2017-10-12T22:27:13Z",
    "email": "ploomis@example.com"
}
Format:
  • JSON
$ curl -G https://preview.twilio.com/HostedNumbers/AuthorizationDocuments \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "items": [
        {
            "status": "signing",
            "date_updated": "2017-10-12T22:27:14Z",
            "cc_emails": [
                "ploomis+test@twilio.com"
            ],
            "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXeb2bd370aa325bec073ed6f2a9427ead",
            "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
            "sid": "PXeb2bd370aa325bec073ed6f2a9427ead",
            "date_created": "2017-10-12T22:27:13Z",
            "email": "ploomis@twilio.com"
        },
        {
            "status": "signing",
            "date_updated": "2017-09-25T15:51:47Z",
            "cc_emails": [],
            "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXd779ed2b3273397a45ef3d5ce2f6096f",
            "address_sid": "AD9098eed00e240e3f47b3ad27ac8eb3dd",
            "sid": "PXd779ed2b3273397a45ef3d5ce2f6096f",
            "date_created": "2017-09-25T15:51:46Z",
            "email": "ploomis+test@twilio.com"
        }
    ],
    "meta": {
        "page": 0,
        "page_size": 50,
        "first_page_url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "items"
    }
}
Format:
  • JSON
$ curl -X POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
    -d "HostedNumberOrderSids=HR7e42fbbfb47d17baaae45d94c34ec4c3" \
    -d "HostedNumberOrderSids=HR18b3fc4bb26c368ceff1587ec26bf892" \
    -d "HostedNumberOrderSids=HR842cc9ce52ce257da378c2972f88fecc" \
    -d "HostedNumberOrderSids=HRc401d83d7d66901d2b65a4700457272d" \
    -d "AddressSid=AD1e20d20a7772e157c8ddbaba36aefef0" \ 
    -d "Email=owner@example.com" \
    -d "CcEmails=admin@example.com&CcEmails=builder@example.com" \
    
{
    "status": "signing",
    "date_updated": "2017-10-16T23:54:59Z",
    "cc_emails": [
        "admin@example.com",
        "builder@example.com"
    ],
    "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PX5b7889b420ec6bca465c068f5bc2b67e",
    "address_sid": "AD1e20d20a7772e157c8ddbaba36aefef0",
    "sid": "PX5b7889b420ec6bca465c068f5bc2b67e",
    "date_created": "2017-10-16T23:54:58Z",
    "email": "owner@example.com"
}