Supporting Documents Resource
Warning The v2 Regulatory Compliance APIs are currently in Public Beta. No breaking changes in the API contract will occur when the API moves from Public Beta to GA.
The Supporting Documents resource of Twilio's Regulatory Compliance APIs allows you to create new Supporting Documents with metadata to fulfill Regulations . Each Supporting Document Type may need different information to be compliant, so be sure to pass all of the correct values when creating a new Supporting Document Type.
A collection of Supporting Documents Assigned as Items to a Regulatory Bundle along with an End-User satisfies a Regulation(link takes you to an external page) .
The field of the Supporting Documents resource responds is in JSON. The type SID<RD> is a unique ID starting with letters RD that reference a unique Supporting Document instance. For more information about Twilio SIDs, please refer to Twilio's glossary on SIDs .
Resource properties The unique string created by Twilio to identify the Supporting Document resource.
The string that you assigned to describe the resource.
The image type uploaded in the Supporting Document container.
The verification status of the Supporting Document resource.
Possible values:
draft
pending-review
rejected
approved
expired
provisionally-approved
The failure reason of the Supporting Document Resource.
The type of the Supporting Document.
The set of parameters that are the attributes of the Supporting Documents resource which are listed in the Supporting Document Types.
date_created
type: string<DATE TIME> Not PIIdate_updated
type: string<DATE TIME> Not PIIThe absolute URL of the Supporting Document resource.
The following statuses encompass the Bundle lifecycle.
Status Description draft The draft status of the Supporting Document allows users to edit the Supporting Document file and metadata. pending-review When the user has finished the draft and submits the Supporting Document for review, the status moves from draft
to pending-review
, awaiting Twilio's. rejected Twilio has reviewed the Supporting Document and has determined the Supporting Document does not comply with the regulations. approved Twilio has reviewed the Supporting Document and has determined the Supporting Document does not comply with the regulations. expired The document has expired and is no longer valid to provision phone numbers. An updated document must be created and added to a new or existing Bundle.
POST https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments
To provision or port in a phone number to Twilio, you will need to create one or many Supporting Documents that also may need an image as proof.
A Supporting Document is a container that holds metadata of a legal document. Each Supporting Document Type requires a different value during the create
operation.
The Regulation may need the End-User to upload an image as proof for the Supporting Document. Formats accepted are JPEG , PNG , and PDF , with a file size limit of 5 MB.
Request body parameters Required
The string that you assigned to describe the resource.
Required
The type of the Supporting Document.
The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.
_16 // Download the helper library from https://www.twilio.com/docs/node/install
_16 // Find your Account SID and Auth Token at twilio.com/console
_16 // and set the environment variables. See http://twil.io/secure
_16 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16 const authToken = process.env.TWILIO_AUTH_TOKEN;
_16 const client = require('twilio')(accountSid, authToken);
_16 client.numbers.v2.regulatoryCompliance
_16 .create({attributes: {
_16 'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
_16 'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
_16 }, friendlyName: 'BusinessRegistration', type: 'business_registration'})
_16 .then(supporting_document => console.log(supporting_document.sid));
_18 "sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18 "friendly_name": "BusinessRegistration",
_18 "mime_type": "mime_type",
_18 "failure_reason": null,
_18 "type": "business_registration",
_18 "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18 "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_18 "date_created": "2019-07-31T02:11:52Z",
_18 "date_updated": "2019-07-31T02:11:52Z",
_18 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_16 ATTRIBUTES=$(cat << EOF
_16 "address_sids": ["ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
_16 "document_number": "312454",
_16 "business_name": "Twilio",
_16 "issue_date": "2019-11-15"
_16 curl -X POST https://numbers-upload.twilio.com/v2/RegulatoryCompliance/SupportingDocuments \
_16 -F "Attributes=$ATTRIBUTES" \
_16 -F "FriendlyName=Twilio GmbH" \
_16 -F "Type=business_registration" \
_16 -F "File=@twilio_business_registration.png" \
_16 -u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
_17 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17 "business_name": "Twilio",
_17 "document_number": "312454",
_17 "issue_date": "2019-11-15",
_17 "registered_seat_of_business": "San Francisco, CA, USA"
_17 "date_created": "2019-10-17T17:06:47Z",
_17 "date_updated": "2019-10-17T17:06:47Z",
_17 "friendly_name": "Twilio GmbH",
_17 "mime_type": "image/png",
_17 "sid": "RDd6340f49f352d06b77e7017d93591483",
_17 "type": "business_registration",
_17 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Documents/RDd6340f49f352d06b77e7017d93591483"
GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}
URI parameters Path Parameter
The unique string created by Twilio to identify the Supporting Document resource.
_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.numbers.v2.regulatoryCompliance
_11 .supportingDocuments('RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(supporting_document => console.log(supporting_document.sid));
_16 "sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "friendly_name": "friendly_name",
_16 "mime_type": "mime_type",
_16 "failure_reason": null,
_16 "date_created": "2019-07-31T02:11:52Z",
_16 "date_updated": "2019-07-31T02:11:52Z",
_16 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments
URI parameters Query Parameter
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Query Parameter
The page index. This value is simply for client state.
Query Parameter
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.numbers.v2.regulatoryCompliance
_11 .then(supportingDocuments => supportingDocuments.forEach(s => console.log(s.sid)));
_29 "sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29 "friendly_name": "friendly_name",
_29 "mime_type": "mime_type",
_29 "failure_reason": null,
_29 "date_created": "2019-07-31T02:11:52Z",
_29 "date_updated": "2019-07-31T02:11:52Z",
_29 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_29 "first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=0",
_29 "previous_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=0",
_29 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=0",
_29 "next_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=1",
POST https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}
URI parameters Path Parameter
The unique string created by Twilio to identify the Supporting Document resource.
Request body parameters The string that you assigned to describe the resource.
The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.
_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.numbers.v2.regulatoryCompliance
_11 .supportingDocuments('RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .update({friendlyName: 'My new Friendly Name'})
_11 .then(supporting_document => console.log(supporting_document.friendlyName));
_16 "sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "friendly_name": "My new Friendly Name",
_16 "mime_type": "mime_type",
_16 "failure_reason": null,
_16 "date_created": "2019-07-31T02:11:52Z",
_16 "date_updated": "2019-07-31T02:11:52Z",
_16 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DELETE https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}
The DELETE
operation is allowed for Supporting Documents with status of DRAFT
, APPROVED
, or REJECTED
and have no active Long Code phone number assignments.
URI parameters Path Parameter
The unique string created by Twilio to identify the Supporting Document resource.
_10 // Download the helper library from https://www.twilio.com/docs/node/install
_10 // Find your Account SID and Auth Token at twilio.com/console
_10 // and set the environment variables. See http://twil.io/secure
_10 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10 const authToken = process.env.TWILIO_AUTH_TOKEN;
_10 const client = require('twilio')(accountSid, authToken);
_10 client.numbers.v2.regulatoryCompliance.supportingDocuments('').remove();