Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Authorization Document Resource


(error)

Danger

The Hosted Phone Numbers API is currently in development and not intended for use by new customers. This documentation exists to support customers who are already using the API. A new version of this API will be released as a generally available (GA) product in the near future. New customers should wait for the Hosted Phone Numbers GA release.

An Authorization Document is a resource representing a legally binding document between Twilio and a customer to Authorize Twilio to run messaging traffic on a given set of Phone Numbers.

Hosted Number Orders can be assigned to an Authorization Document detailing which Address a Hosted Number Order is activated with. Once the Authorization Document has been signed, the Hosted Number Orders will then be registered to Twilio for routing capability.


AuthorizationDocument Properties

authorizationdocument-properties page anchor
Resource properties
sidtype: SID<PX>Not PII

A 34 character string that uniquely identifies this AuthorizationDocument.


address_sidtype: SID<AD>Not PII

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


statustype: enum<STRING>Not PII

Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled Status Values(link takes you to an external page) for more information on each of these statuses.

Possible values:
openedsigningsignedcanceledfailed

emailtype: stringPII MTL: 30 days

Email that this AuthorizationDocument will be sent to for signing.


cc_emailstype: string[]PII MTL: 30 days

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


date_createdtype: string<DATE TIME>Not PII

The date this resource was created, given as GMT RFC 2822(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date that this resource was updated, given as GMT RFC 2822(link takes you to an external page) format.


urltype: string<URI>Not PII

linkstype: object<URI MAP>Not PII

StatusDescription
openedDocument is open and mutable.
signingDocument has been sent out to the Email for signature and is immutable.
signedDocument has been signed by the Email recipient and is immutable.
canceledDocument has been canceled by the Email recipient and is immutable.
failedDocument has failed with an error and is immutable.

Create an AuthorizationDocument resource

create-an-authorizationdocument-resource page anchor
POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments

Create an Authorization Document for authorizing the hosting of phone numbers' capability on Twilio's platform.

The resource is explicit and all Hosted Number Orders added upon creation are the entire list of numbers that are assigned to the Authorization Document. Once the POST to create a new Authorization Document has been created, the LOA will immediately be sent out for signature.

Parameters

create-parameters page anchor
Request body parameters
HostedNumberOrderSidstype: string[]Not PII
Required

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


AddressSidtype: SID<AD>Not PII
Required

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


Emailtype: stringPII MTL: 30 days
Required

Email that this AuthorizationDocument will be sent to for signing.


ContactTitletype: stringNot PII
Required

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


ContactPhoneNumbertype: stringNot PII
Required

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


CcEmailstype: string[]PII MTL: 30 days

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

Create an AuthorizationDocument

create-an-authorizationdocument page anchor
Node.js
Python
C#
Java
PHP
Ruby
curl

_17
// Download the helper library from https://www.twilio.com/docs/node/install
_17
// Find your Account SID and Auth Token at twilio.com/console
_17
// and set the environment variables. See http://twil.io/secure
_17
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_17
const authToken = process.env.TWILIO_AUTH_TOKEN;
_17
const client = require('twilio')(accountSid, authToken);
_17
_17
client.preview.hosted_numbers
_17
.authorizationDocuments
_17
.create({
_17
hostedNumberOrderSids: ['hosted_number_order_sids'],
_17
addressSid: 'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
_17
email: 'email',
_17
contactTitle: 'contact_title',
_17
contactPhoneNumber: 'contact_phone_number'
_17
})
_17
.then(authorization_document => console.log(authorization_document.sid));

Output

_16
{
_16
"address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"cc_emails": [
_16
"test1@twilio.com",
_16
"test2@twilio.com"
_16
],
_16
"date_created": "2017-03-28T20:06:39Z",
_16
"date_updated": "2017-03-28T20:06:39Z",
_16
"email": "test+hosted@twilio.com",
_16
"links": {
_16
"dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_16
},
_16
"sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"status": "signing",
_16
"url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_16
}


Fetch an AuthorizationDocument resource

fetch-an-authorizationdocument-resource page anchor
GET https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/{Sid}

URI parameters
Sidtype: SID<PX>Not PII
Path Parameter

A 34 character string that uniquely identifies this AuthorizationDocument.

Fetch an AuthorizationDocument

fetch-an-authorizationdocument page anchor
Node.js
Python
C#
Java
PHP
Ruby
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.preview.hosted_numbers
_11
.authorizationDocuments('PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(authorization_document => console.log(authorization_document.sid));

Output

_16
{
_16
"address_sid": "AD11111111111111111111111111111111",
_16
"cc_emails": [
_16
"aaa@twilio.com",
_16
"bbb@twilio.com"
_16
],
_16
"date_created": "2017-03-28T20:06:39Z",
_16
"date_updated": "2017-03-28T20:06:39Z",
_16
"email": "test@twilio.com",
_16
"links": {
_16
"dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_16
},
_16
"sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"status": "signing",
_16
"url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_16
}


Read multiple AuthorizationDocument resources

read-multiple-authorizationdocument-resources page anchor
GET https://preview.twilio.com/HostedNumbers/AuthorizationDocuments

URI parameters
Emailtype: stringPII MTL: 30 days
Query Parameter

Email that this AuthorizationDocument will be sent to for signing.


Statustype: enum<STRING>Not PII
Query Parameter

Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled Status Values(link takes you to an external page) for more information on each of these statuses.

Possible values:
openedsigningsignedcanceledfailed

PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

List multiple AuthorizationDocuments

list-multiple-authorizationdocuments page anchor
Node.js
Python
C#
Java
PHP
Ruby
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.preview.hosted_numbers
_11
.authorizationDocuments
_11
.list({limit: 20})
_11
.then(authorizationDocuments => authorizationDocuments.forEach(a => console.log(a.sid)));

Output

_29
{
_29
"meta": {
_29
"first_page_url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0",
_29
"key": "items",
_29
"next_page_url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=1",
_29
"page": 0,
_29
"page_size": 50,
_29
"previous_page_url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0",
_29
"url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0"
_29
},
_29
"items": [
_29
{
_29
"address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"cc_emails": [
_29
"test1@twilio.com",
_29
"test2@twilio.com"
_29
],
_29
"date_created": "2017-03-28T20:06:39Z",
_29
"date_updated": "2017-03-28T20:06:39Z",
_29
"email": "test+hosted@twilio.com",
_29
"links": {
_29
"dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_29
},
_29
"sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"status": "signing",
_29
"url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_29
}
_29
]
_29
}


Update an AuthorizationDocument resource

update-an-authorizationdocument-resource page anchor
POST https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/{Sid}

Requests to update a single, existing Authorization Documents instance resource's properties and returns the updated resource representation if successful.

(warning)

Warning

Authorization Documents can only be updated when in opened status. To update the Authorization Document, update the Status to opened.

URI parameters
Sidtype: SID<PX>Not PII
Path Parameter

A 34 character string that uniquely identifies this AuthorizationDocument.


Request body parameters
HostedNumberOrderSidstype: string[]Not PII

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


AddressSidtype: SID<AD>Not PII

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


Emailtype: stringPII MTL: 30 days

Email that this AuthorizationDocument will be sent to for signing.


CcEmailstype: string[]PII MTL: 30 days

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


Statustype: enum<STRING>Not PII

Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled Status Values(link takes you to an external page) for more information on each of these statuses.

Possible values:
openedsigningsignedcanceledfailed

ContactTitletype: stringNot PII

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


ContactPhoneNumbertype: stringNot PII

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

Update an AuthorizationDocument

update-an-authorizationdocument page anchor
Node.js
Python
C#
Java
PHP
Ruby
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.preview.hosted_numbers
_11
.authorizationDocuments('PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.update({hostedNumberOrderSids: ['hosted_number_order_sids']})
_11
.then(authorization_document => console.log(authorization_document.sid));

Output

_16
{
_16
"address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"cc_emails": [
_16
"test1@twilio.com",
_16
"test2@twilio.com"
_16
],
_16
"date_created": "2017-03-28T20:06:39Z",
_16
"date_updated": "2017-03-28T20:06:39Z",
_16
"email": "test+hosted@twilio.com",
_16
"links": {
_16
"dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_16
},
_16
"sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"status": "signing",
_16
"url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_16
}


Rate this page: