Skip to contentSkip to navigationSkip to topbar
On this page

EndUserType resource



EndUserType Properties

endusertype-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<OY>Optional
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_namestringOptional

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_namestringOptional

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


fieldsarrayOptional

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>Optional

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 EndUserTypeLink to code sample: Fetch an EndUserType
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchEndUserType() {
11
const endUserType = await client.trusthub.v1.endUserTypes("Sid").fetch();
12
13
console.log(endUserType.sid);
14
}
15
16
fetchEndUserType();

Output

1
{
2
"url": "https://trusthub.twilio.com/v1/EndUserTypes/OYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"fields": [
4
{
5
"machine_name": "last_name",
6
"friendly_name": "Last Name",
7
"constraint": "String"
8
},
9
{
10
"machine_name": "email",
11
"friendly_name": "Email",
12
"constraint": "String"
13
},
14
{
15
"machine_name": "first_name",
16
"friendly_name": "First Name",
17
"constraint": "String"
18
},
19
{
20
"machine_name": "business_title",
21
"friendly_name": "Business Title",
22
"constraint": "String"
23
},
24
{
25
"machine_name": "phone_number",
26
"friendly_name": "Phone Number",
27
"constraint": "String"
28
},
29
{
30
"machine_name": "job_position",
31
"friendly_name": "Job Position",
32
"constraint": "String"
33
}
34
],
35
"machine_name": "authorized_representative_1",
36
"friendly_name": "Authorized Representative one",
37
"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.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listEndUserType() {
11
const endUserTypes = await client.trusthub.v1.endUserTypes.list({
12
limit: 20,
13
});
14
15
endUserTypes.forEach((e) => console.log(e.sid));
16
}
17
18
listEndUserType();

Output

1
{
2
"end_user_types": [],
3
"meta": {
4
"page": 0,
5
"page_size": 50,
6
"first_page_url": "https://trusthub.twilio.com/v1/EndUserTypes?PageSize=50&Page=0",
7
"previous_page_url": null,
8
"url": "https://trusthub.twilio.com/v1/EndUserTypes?PageSize=50&Page=0",
9
"next_page_url": null,
10
"key": "end_user_types"
11
}
12
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.