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 .
Property name Type PII Description
The unique string created by Twilio to identify the Supporting Document resource.
Pattern: ^RD[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Document resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
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 string<date-time> date_updated string<date-time> The 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.
Property name Type Required PII Description
FriendlyName string required The string that you assigned to describe the resource.
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.
_26 // Download the helper library from https://www.twilio.com/docs/node/install
_26 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_26 // Find your Account SID and Auth Token at twilio.com/console
_26 // and set the environment variables. See http://twil.io/secure
_26 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_26 const authToken = process.env.TWILIO_AUTH_TOKEN;
_26 const client = twilio(accountSid, authToken);
_26 async function createSupportingDocument() {
_26 const supportingDocument =
_26 await client.numbers.v2.regulatoryCompliance.supportingDocuments.create({
_26 "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26 "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26 friendlyName: "BusinessRegistration",
_26 type: "business_registration",
_26 console.log(supportingDocument.sid);
_26 createSupportingDocument();
_16 "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_16 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_16 "friendly_name": "BusinessRegistration",
_16 "mime_type": "mime_type",
_16 "failure_reason": null,
_16 "type": "business_registration",
_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/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_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}
Property name Type Required PII Description
The unique string created by Twilio to identify the Supporting Document resource.
Pattern: ^RD[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_18 // Download the helper library from https://www.twilio.com/docs/node/install
_18 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18 // Find your Account SID and Auth Token at twilio.com/console
_18 // and set the environment variables. See http://twil.io/secure
_18 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18 const authToken = process.env.TWILIO_AUTH_TOKEN;
_18 const client = twilio(accountSid, authToken);
_18 async function fetchSupportingDocument() {
_18 const supportingDocument = await client.numbers.v2.regulatoryCompliance
_18 .supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18 console.log(supportingDocument.sid);
_18 fetchSupportingDocument();
_16 "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_16 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments
Property name Type Required PII Description
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum: 1
Maximum: 1000
The page index. This value is simply for client state.
Minimum: 0
The page token. This is provided by the API.
_19 // Download the helper library from https://www.twilio.com/docs/node/install
_19 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19 // Find your Account SID and Auth Token at twilio.com/console
_19 // and set the environment variables. See http://twil.io/secure
_19 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19 const authToken = process.env.TWILIO_AUTH_TOKEN;
_19 const client = twilio(accountSid, authToken);
_19 async function listSupportingDocument() {
_19 const supportingDocuments =
_19 await client.numbers.v2.regulatoryCompliance.supportingDocuments.list({
_19 supportingDocuments.forEach((s) => console.log(s.sid));
_19 listSupportingDocument();
_12 "first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=0",
_12 "previous_page_url": null,
_12 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=0",
_12 "next_page_url": null,
POST https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}
Property name Type Required PII Description
The unique string created by Twilio to identify the Supporting Document resource.
Pattern: ^RD[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property name Type Required PII Description
FriendlyName string Optional 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.
_18 // Download the helper library from https://www.twilio.com/docs/node/install
_18 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18 // Find your Account SID and Auth Token at twilio.com/console
_18 // and set the environment variables. See http://twil.io/secure
_18 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18 const authToken = process.env.TWILIO_AUTH_TOKEN;
_18 const client = twilio(accountSid, authToken);
_18 async function updateSupportingDocument() {
_18 const supportingDocument = await client.numbers.v2.regulatoryCompliance
_18 .supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18 .update({ friendlyName: "My new Friendly Name" });
_18 console.log(supportingDocument.sid);
_18 updateSupportingDocument();
_16 "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_16 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
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.
Property name Type Required PII Description
The unique string created by Twilio to identify the Supporting Document resource.
Pattern: ^RD[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_16 // Download the helper library from https://www.twilio.com/docs/node/install
_16 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_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 = twilio(accountSid, authToken);
_16 async function deleteSupportingDocument() {
_16 await client.numbers.v2.regulatoryCompliance
_16 .supportingDocuments("RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_16 deleteSupportingDocument();