Authorization Document Resource
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.
Resource properties sid
type: SID<PX>
A 34 character string that uniquely identifies this AuthorizationDocument.
Pattern:
^PX[0-9a-fA-F]{32}$
address_sid
type: SID<AD>
A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
Pattern:
^AD[0-9a-fA-F]{32}$
status
type: enum<string>
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:
opened
signing
signed
canceled
failed
email
type: string
Email that this AuthorizationDocument will be sent to for signing.
cc_emails
type: array[string]
Email recipients who will be informed when an Authorization Document has been sent and signed.
date_created
type: string<date-time>
date_updated
type: string<date-time>
links
type: object<uri-map>
Status Description opened Document is open and mutable. signing Document has been sent out to the Email for signature and is immutable. signed Document has been signed by the Email recipient and is immutable. canceled Document has been canceled by the Email recipient and is immutable. failed Document has failed with an error and is immutable.
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.
Request body parameters HostedNumberOrderSids
type: array[string] Required
A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
AddressSid
type: SID<AD> Required
A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
Pattern:
^AD[0-9a-fA-F]{32}$
Email
type: string Required
Email that this AuthorizationDocument will be sent to for signing.
ContactTitle
type: string Required
The title of the person authorized to sign the Authorization Document for this phone number.
ContactPhoneNumber
type: string Required
The contact phone number of the person authorized to sign the Authorization Document.
CcEmails
type: array[string]
Email recipients who will be informed when an Authorization Document has been sent and signed.
_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 client.preview.hosted_numbers
_17 .authorizationDocuments
_17 hostedNumberOrderSids: ['hosted_number_order_sids'],
_17 addressSid: 'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
_17 contactTitle: 'contact_title',
_17 contactPhoneNumber: 'contact_phone_number'
_17 .then(authorization_document => console.log(authorization_document.sid));
_16 "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "date_created": "2017-03-28T20:06:39Z",
_16 "date_updated": "2017-03-28T20:06:39Z",
_16 "email": "test+hosted@twilio.com",
_16 "dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_16 "sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GET https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/{Sid}
URI parameters Sid
type: SID<PX>
A 34 character string that uniquely identifies this AuthorizationDocument.
Pattern:
^PX[0-9a-fA-F]{32}$
_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 client.preview.hosted_numbers
_11 .authorizationDocuments('PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(authorization_document => console.log(authorization_document.sid));
_16 "address_sid": "AD11111111111111111111111111111111",
_16 "date_created": "2017-03-28T20:06:39Z",
_16 "date_updated": "2017-03-28T20:06:39Z",
_16 "email": "test@twilio.com",
_16 "dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_16 "sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GET https://preview.twilio.com/HostedNumbers/AuthorizationDocuments
URI parameters Email
type: string
Email that this AuthorizationDocument will be sent to for signing.
Status
type: enum<string>
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:
opened
signing
signed
canceled
failed
PageSize
type: integer
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Page
type: integer
The page index. This value is simply for client state.
PageToken
type: string
The page token. This is provided by the API.
_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 client.preview.hosted_numbers
_11 .authorizationDocuments
_11 .then(authorizationDocuments => authorizationDocuments.forEach(a => console.log(a.sid)));
_29 "first_page_url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=0",
_29 "next_page_url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments?PageSize=50&Page=1",
_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 "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29 "date_created": "2017-03-28T20:06:39Z",
_29 "date_updated": "2017-03-28T20:06:39Z",
_29 "email": "test+hosted@twilio.com",
_29 "dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_29 "sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29 "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
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 Authorization Documents can only be updated when in opened status. To update the Authorization Document, update the Status to opened
.
URI parameters Sid
type: SID<PX>
A 34 character string that uniquely identifies this AuthorizationDocument.
Pattern:
^PX[0-9a-fA-F]{32}$
Request body parameters HostedNumberOrderSids
type: array[string]
A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
AddressSid
type: SID<AD>
A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
Pattern:
^AD[0-9a-fA-F]{32}$
Email
type: string
Email that this AuthorizationDocument will be sent to for signing.
CcEmails
type: array[string]
Email recipients who will be informed when an Authorization Document has been sent and signed
Status
type: enum<string>
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:
opened
signing
signed
canceled
failed
ContactTitle
type: string
The title of the person authorized to sign the Authorization Document for this phone number.
ContactPhoneNumber
type: string
The contact phone number of the person authorized to sign the Authorization Document.
_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 client.preview.hosted_numbers
_11 .authorizationDocuments('PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .update({hostedNumberOrderSids: ['hosted_number_order_sids']})
_11 .then(authorization_document => console.log(authorization_document.sid));
_16 "address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "date_created": "2017-03-28T20:06:39Z",
_16 "date_updated": "2017-03-28T20:06:39Z",
_16 "email": "test+hosted@twilio.com",
_16 "dependent_hosted_number_orders": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentHostedNumberOrders"
_16 "sid": "PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "url": "https://preview.twilio.com/HostedNumbers/AuthorizationDocuments/PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"