Skip to contentSkip to navigationSkip to topbar
Rate this Page:

End-User 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 Twilio End-User Type resource of Twilio's Regulatory Compliance API informs you which type of end-user you can create and what the values are. Once you know which end-user type you want to create and the required values, you will create using the End-User resource. Each End-User Type has a different set of values required to be compliant.

You will Assign Items to an End-User of a Regulatory Bundle with Supporting Documents. For applications that manage many End-Users, you will need to ensure that you assign the End-User instance to the correct Bundle instance to be in compliance with regulations.


End-User Types Response Properties

end-user-types-response-properties page anchor

The output JSON response details the types and values of the End-User Type resource. 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.

The field of the End-User 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 End-User Type resource.


friendly_nametype: stringNot PII

A human-readable description that is assigned to describe the End-User Type resource. Examples can include first name, last name, email, business name, etc


machine_nametype: stringNot PII

A machine-readable description of the End-User Type resource. Examples can include first_name, last_name, email, business_name, etc.


fieldstype: arrayNot PII

The required information for creating an End-User. 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 End-User Type resource.


Fetch an End-User Type Instance

fetch-an-end-user-type-instance page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/EndUserTypes/{Sid}

Parameters

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

The unique string that identifies the End-User Type resource.

Fetch an End-User Type Instance

fetch-an-end-user-type-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
.endUserTypes('OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(end_user_type => console.log(end_user_type.sid));

Output

_18
{
_18
"sid": "OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"friendly_name": "friendly_name",
_18
"machine_name": "machine_name",
_18
"fields": [
_18
{
_18
"friendly_name": "Business Purpose",
_18
"machine_name": "business_purpose",
_18
"constraint": "String"
_18
},
_18
{
_18
"friendly_name": "Last Name",
_18
"machine_name": "last_name",
_18
"constraint": "String"
_18
}
_18
],
_18
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUserTypes/OYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_18
}


Retrieve a list of End-User Types

retrieve-a-list-of-end-user-types page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/EndUserTypes

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 End-User Types

retrieve-a-list-of-end-user-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
.endUserTypes
_11
.list({limit: 20})
_11
.then(endUserTypes => endUserTypes.forEach(e => console.log(e.sid)));

Output

_12
{
_12
"end_user_types": [],
_12
"meta": {
_12
"page": 0,
_12
"page_size": 50,
_12
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUserTypes?PageSize=50&Page=0",
_12
"previous_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUserTypes?PageSize=50&Page=0",
_12
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUserTypes?PageSize=50&Page=0",
_12
"next_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUserTypes?PageSize=50&Page=1",
_12
"key": "end_user_types"
_12
}
_12
}


Rate this Page: