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

Supporting Documents Resource


(warning)

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).


Supporting Documents Response Properties

supporting-documents-response-properties page anchor

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
sidtype: SID<RD>Not PII

The unique string created by Twilio to identify the Supporting Document resource.


account_sidtype: SID<AC>Not PII

The SID of the Account(link takes you to an external page) that created the Document resource.


friendly_nametype: stringNot PII

The string that you assigned to describe the resource.


mime_typetype: stringNot PII

The image type uploaded in the Supporting Document container.


statustype: enum<STRING>Not PII

The verification status of the Supporting Document resource.

Possible values:
draftpending-reviewrejectedapprovedexpiredprovisionally-approved

failure_reasontype: stringNot PII

The failure reason of the Supporting Document Resource.


typetype: stringNot PII

The type of the Supporting Document.


attributestype: objectPII MTL: 30 days

The set of parameters that are the attributes of the Supporting Documents resource which are listed in the Supporting Document Types.


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The absolute URL of the Supporting Document resource.

Supporting Document Statuses

supporting-document-statuses page anchor

The following statuses encompass the Bundle lifecycle.

StatusDescription
draftThe draft status of the Supporting Document allows users to edit the Supporting Document file and metadata.
pending-reviewWhen the user has finished the draft and submits the Supporting Document for review, the status moves from draft to pending-review, awaiting Twilio's.
rejectedTwilio has reviewed the Supporting Document and has determined the Supporting Document does not comply with the regulations.
approvedTwilio has reviewed the Supporting Document and has determined the Supporting Document does not comply with the regulations.
expiredThe 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.

Create a Supporting Document

create-a-supporting-document page anchor
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.

Parameters

create-parameters page anchor
Request body parameters
FriendlyNametype: stringNot PII
Required

The string that you assigned to describe the resource.


Typetype: stringNot PII
Required

The type of the Supporting Document.


Attributestype: objectPII MTL: 30 days

The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.

Create a Supporting Document

create-a-supporting-document-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_16
client.numbers.v2.regulatoryCompliance
_16
.supportingDocuments
_16
.create({attributes: {
_16
address_sids: [
_16
'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
_16
'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
_16
]
_16
}, friendlyName: 'BusinessRegistration', type: 'business_registration'})
_16
.then(supporting_document => console.log(supporting_document.sid));

Output

_18
{
_18
"sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"friendly_name": "BusinessRegistration",
_18
"mime_type": "mime_type",
_18
"status": "draft",
_18
"failure_reason": null,
_18
"type": "business_registration",
_18
"attributes": {
_18
"address_sids": [
_18
"ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_18
]
_18
},
_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"
_18
}

Create a Supporting Document and upload a file

create-a-supporting-document-and-upload-a-file page anchor
curl

_16
ATTRIBUTES=$(cat << EOF
_16
{
_16
"address_sids": ["ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
_16
"document_number": "312454",
_16
"business_name": "Twilio",
_16
"issue_date": "2019-11-15"
_16
}
_16
EOF
_16
)
_16
_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

Output

_17
{
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"attributes": {
_17
"business_name": "Twilio",
_17
"document_number": "312454",
_17
"issue_date": "2019-11-15",
_17
"registered_seat_of_business": "San Francisco, CA, USA"
_17
},
_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
"status": "draft",
_17
"type": "business_registration",
_17
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Documents/RDd6340f49f352d06b77e7017d93591483"
_17
}


Fetch a Supporting Document instance

fetch-a-supporting-document-instance page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}

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

The unique string created by Twilio to identify the Supporting Document resource.

Fetch a Supporting Document instance

fetch-a-supporting-document-instance-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
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.numbers.v2.regulatoryCompliance
_11
.supportingDocuments('RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(supporting_document => console.log(supporting_document.sid));

Output

_16
{
_16
"sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"friendly_name": "friendly_name",
_16
"mime_type": "mime_type",
_16
"status": "draft",
_16
"failure_reason": null,
_16
"type": "type",
_16
"attributes": {
_16
"first_name": "foo",
_16
"last_name": "bar"
_16
},
_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"
_16
}


Retrieve a list of Supporting Documents

retrieve-a-list-of-supporting-documents page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments

URI parameters
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.

Retrieve a list of Supporting Documents

retrieve-a-list-of-supporting-documents-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
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.numbers.v2.regulatoryCompliance
_11
.supportingDocuments
_11
.list({limit: 20})
_11
.then(supportingDocuments => supportingDocuments.forEach(s => console.log(s.sid)));

Output

_29
{
_29
"results": [
_29
{
_29
"sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"friendly_name": "friendly_name",
_29
"mime_type": "mime_type",
_29
"status": "draft",
_29
"failure_reason": null,
_29
"type": "type",
_29
"attributes": {
_29
"first_name": "foo",
_29
"last_name": "bar"
_29
},
_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
}
_29
],
_29
"meta": {
_29
"page": 0,
_29
"page_size": 50,
_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",
_29
"key": "results"
_29
}
_29
}


Update a Supporting Document Instance

update-a-supporting-document-instance page anchor
POST https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}

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

The unique string created by Twilio to identify the Supporting Document resource.


Request body parameters
FriendlyNametype: stringNot PII

The string that you assigned to describe the resource.


Attributestype: objectPII MTL: 30 days

The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.

Update a Supporting Document instance

update-a-supporting-document-instance-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
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.numbers.v2.regulatoryCompliance
_11
.supportingDocuments('RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.update({friendlyName: 'My new Friendly Name'})
_11
.then(supporting_document => console.log(supporting_document.friendlyName));

Output

_16
{
_16
"sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"friendly_name": "My new Friendly Name",
_16
"mime_type": "mime_type",
_16
"status": "draft",
_16
"failure_reason": null,
_16
"type": "type",
_16
"attributes": {
_16
"first_name": "foo",
_16
"last_name": "bar"
_16
},
_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"
_16
}


Delete a Supporting Document instance

delete-a-supporting-document-instance page anchor
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
Sidtype: SID<RD>Not PII
Path Parameter

The unique string created by Twilio to identify the Supporting Document resource.

Delete a Supporting Document instance

delete-a-supporting-document-instance-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
client.numbers.v2.regulatoryCompliance.supportingDocuments('').remove();


Rate this page: