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

Supporting Document Types 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 Document Type resource of Twilio's Regulatory Compliance API informs you which type of document you create and what the values are. You will then create a new Supporting Document with the correct type and values.

Each Supporting Document Type may need different information to be compliant. Supporting Documents Assigned as Items to a Regulatory Bundle along with an End-User satisfy a Regulation(link takes you to an external page).


Supporting Document Types Response Properties

supporting-document-types-response-properties page anchor

The field of the Supporting Document Types resource response is in JSON. The type SID<OY> is a unique ID starting with letters OY. For more information about Twilio SIDs, please refer to Twilio's glossary on SIDs.

Resource properties
sidtype: SID<OY>Not PII

The unique string that identifies the Supporting Document Type resource.


friendly_nametype: stringNot PII

A human-readable description of the Supporting Document Type resource.


machine_nametype: stringNot PII

The machine-readable description of the Supporting Document Type resource.


fieldstype: arrayNot PII

The required information for creating a Supporting Document. The required fields will change as regulatory needs change and will differ for businesses and individuals.


urltype: string<URI>Not PII

The absolute URL of the Supporting Document Type resource.


Retrieve a list of Supporting Document Types

retrieve-a-list-of-supporting-document-types page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid}

Parameters

fetch-parameters page anchor
URI parameters
Sidtype: stringNot PII
Path Parameter

The unique string that identifies the Supporting Document Type resource.

Retrieve a list of Supporting Document Types

retrieve-a-list-of-supporting-document-types-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
.supportingDocumentTypes
_11
.list({limit: 20})
_11
.then(supportingDocumentTypes => supportingDocumentTypes.forEach(s => console.log(s.sid)));

Output

_26
{
_26
"supporting_document_types": [
_26
{
_26
"sid": "OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26
"friendly_name": "Passport",
_26
"machine_name": "passport",
_26
"fields": [
_26
{
_26
"friendly_name": "Last Name",
_26
"machine_name": "last_name",
_26
"constraint": "String"
_26
}
_26
],
_26
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes/OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_26
}
_26
],
_26
"meta": {
_26
"page": 0,
_26
"page_size": 50,
_26
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes?PageSize=50&Page=0",
_26
"previous_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes?PageSize=50&Page=0",
_26
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes?PageSize=50&Page=0",
_26
"next_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes?PageSize=50&Page=1",
_26
"key": "supporting_document_types"
_26
}
_26
}


Read a Supporting Document Type resource instance

read-a-supporting-document-type-resource-instance page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes

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.

Read a Supporting Document Type resource instance

read-a-supporting-document-type-resource-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
.supportingDocumentTypes('OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(supporting_document_type => console.log(supporting_document_type.sid));

Output

_13
{
_13
"sid": "OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"friendly_name": "Passport",
_13
"machine_name": "passport",
_13
"fields": [
_13
{
_13
"friendly_name": "Last Name",
_13
"machine_name": "last_name",
_13
"constraint": "String"
_13
}
_13
],
_13
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocumentTypes/OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_13
}


Rate this page: