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

EndUserType resource



EndUserType Properties

endusertype-properties page anchor
Property nameTypePIIDescription
sidSID<OY>
Not PII

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

Pattern: ^OY[0-9a-fA-F]{32}$Min length: 34Max length: 34

friendly_namestring

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_namestring

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


fieldsarray

The required information for creating an End-User. The required fields will change as regulatory needs change and will differ for businesses and individuals.


urlstring<uri>

The absolute URL of the End-User Type resource.


Fetch a specific End-User Type Instance.

fetch-a-specific-end-user-type-instance page anchor
GET https://trusthub.twilio.com/v1/EndUserTypes/{Sid}

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
Sidstringrequired

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

Fetch an EndUserType

fetch-an-endusertype 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
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_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
_16
async function fetchEndUserType() {
_16
const endUserType = await client.trusthub.v1.endUserTypes("Sid").fetch();
_16
_16
console.log(endUserType.sid);
_16
}
_16
_16
fetchEndUserType();

Output

_38
{
_38
"url": "https://trusthub.twilio.com/v1/EndUserTypes/OYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_38
"fields": [
_38
{
_38
"machine_name": "last_name",
_38
"friendly_name": "Last Name",
_38
"constraint": "String"
_38
},
_38
{
_38
"machine_name": "email",
_38
"friendly_name": "Email",
_38
"constraint": "String"
_38
},
_38
{
_38
"machine_name": "first_name",
_38
"friendly_name": "First Name",
_38
"constraint": "String"
_38
},
_38
{
_38
"machine_name": "business_title",
_38
"friendly_name": "Business Title",
_38
"constraint": "String"
_38
},
_38
{
_38
"machine_name": "phone_number",
_38
"friendly_name": "Phone Number",
_38
"constraint": "String"
_38
},
_38
{
_38
"machine_name": "job_position",
_38
"friendly_name": "Job Position",
_38
"constraint": "String"
_38
}
_38
],
_38
"machine_name": "authorized_representative_1",
_38
"friendly_name": "Authorized Representative one",
_38
"sid": "Sid"
_38
}


Retrieve a list of all End-User Types.

retrieve-a-list-of-all-end-user-types page anchor
GET https://trusthub.twilio.com/v1/EndUserTypes

Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

List multiple EndUserTypes

list-multiple-endusertypes page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_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
_18
async function listEndUserType() {
_18
const endUserTypes = await client.trusthub.v1.endUserTypes.list({
_18
limit: 20,
_18
});
_18
_18
endUserTypes.forEach((e) => console.log(e.sid));
_18
}
_18
_18
listEndUserType();

Output

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


Rate this page: