End-Users 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 Twilio End-User REST API allows you to create End-Users to follow Regulations . The End-User is the entity that answers the phone call or receives the message of a phone number. An entity can be either an individual
or a business
. You can find more information about the possible End-Users by referencing End-User Type resource .
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.
The fields of the End-User resource response is in JSON. The type SID<IT> is a unique ID starting with letters IT. 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 End User resource.
The string that you assigned to describe the resource.
The type of end user of the Bundle resource - can be individual
or business
.
Possible values:
individual
business
The set of parameters that are the attributes of the End Users resource which are listed in the End User Types.
date_created
type: string<DATE TIME> Not PIIdate_updated
type: string<DATE TIME> Not PIIThe absolute URL of the End User resource.
POST https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers
To provision or port a phone number to Twilio, you will need to create a new End-User of a phone number.
The End-User is the individual or business who answers the phone call or receives the message.
You will need to assign the End-User to a Regulatory Bundle and that Regulatory Bundle assigned to a Phone Number .
Request body parameters Required
The string that you assigned to describe the resource.
Required
The type of end user of the Bundle resource - can be individual
or business
.
Possible values:
individual
business
The set of parameters that are the attributes of the End User resource which are derived End User Types.
_15 // Download the helper library from https://www.twilio.com/docs/node/install
_15 // Find your Account SID and Auth Token at twilio.com/console
_15 // and set the environment variables. See http://twil.io/secure
_15 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_15 const authToken = process.env.TWILIO_AUTH_TOKEN;
_15 const client = require('twilio')(accountSid, authToken);
_15 client.numbers.v2.regulatoryCompliance
_15 .create({attributes: {
_15 business_name: 'Twilio',
_15 business_description: 'Communications Platform as a Service'
_15 }, friendlyName: 'Twilio, Inc.', type: 'business'})
_15 .then(end_user => console.log(end_user.sid));
_14 "sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14 "friendly_name": "Twilio, Inc.",
_14 "business_name": "Twilio",
_14 "business_description": "Communications Platform as a Service"
_14 "date_created": "2019-07-30T21:57:45Z",
_14 "date_updated": "2019-07-30T21:57:45Z",
_14 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Note: the EndUserType
must be either individual
or business
.
GET https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/{Sid}
URI parameters Path Parameter
The unique string created by Twilio to identify the End User 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 .endUsers('ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(end_user => console.log(end_user.sid));
_12 "sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12 "friendly_name": "friendly_name",
_12 "type": "individual",
_12 "email": "foobar@twilio.com"
_12 "date_created": "2019-07-30T21:57:45Z",
_12 "date_updated": "2019-07-30T21:57:45Z",
_12 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GET https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers
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(endUsers => endUsers.forEach(e => console.log(e.sid)));
_25 "sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_25 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_25 "friendly_name": "friendly_name",
_25 "type": "individual",
_25 "email": "foobar@twilio.com"
_25 "date_created": "2019-07-30T21:57:45Z",
_25 "date_updated": "2019-07-30T21:57:45Z",
_25 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_25 "first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers?PageSize=50&Page=0",
_25 "previous_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers?PageSize=50&Page=0",
_25 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers?PageSize=50&Page=0",
_25 "next_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers?PageSize=50&Page=1",
POST https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/{Sid}
URI parameters Path Parameter
The unique string created by Twilio to identify the End User resource.
Request body parameters The string that you assigned to describe the resource.
The set of parameters that are the attributes of the End User resource which are derived End User Types.
_14 // Download the helper library from https://www.twilio.com/docs/node/install
_14 // Find your Account SID and Auth Token at twilio.com/console
_14 // and set the environment variables. See http://twil.io/secure
_14 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14 const authToken = process.env.TWILIO_AUTH_TOKEN;
_14 const client = require('twilio')(accountSid, authToken);
_14 client.numbers.v2.regulatoryCompliance
_14 .endUsers('ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14 .update({attributes: {
_14 email: 'foobar@twilio.com',
_14 }, friendlyName: 'Twilio'})
_14 .then(end_user => console.log(end_user.friendlyName));
_13 "sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13 "friendly_name": "Twilio",
_13 "type": "individual",
_13 "email": "foobar@twilio.com",
_13 "date_created": "2019-07-30T21:57:45Z",
_13 "date_updated": "2019-07-30T21:57:45Z",
_13 "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DELETE https://numbers.twilio.com/v2/RegulatoryCompliance/EndUsers/{Sid}
URI parameters Path Parameter
The unique string created by Twilio to identify the End User 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.endUsers('').remove();