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

EndUser Resource



EndUser Properties

enduser-properties page anchor
Resource properties
sidtype: SID<IT>Not PII

The unique string created by Twilio to identify the End User resource.


friendly_nametype: stringNot PII

The string that you assigned to describe the resource.


typetype: stringNot PII

The type of end user of the Bundle resource - can be individual or business.


attributestype: objectPII MTL: 30 days

The set of parameters that are the attributes of the End Users resource which are listed in the End User Types.


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The absolute URL of the End User resource.


Create an EndUser resource

create-an-enduser-resource page anchor
POST https://trusthub.twilio.com/v1/EndUsers

Parameters

create-parameters page anchor
Request body parameters
FriendlyNametype: stringNot PII
Required

The string that you assigned to describe the resource.


Typetype: stringNot PII
Required

The type of end user of the Bundle resource - can be individual or business.


Attributestype: objectPII MTL: 30 days

The set of parameters that are the attributes of the End User resource which are derived End User Types.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
client.trusthub.v1.endUsers
_10
.create({friendlyName: 'friendly_name', type: 'type'})
_10
.then(end_user => console.log(end_user.sid));

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"friendly_name": "auth_rep_1",
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"date_created": "2021-02-16T20:40:57Z",
_17
"attributes": {
_17
"phone_number": "+11234567890",
_17
"job_position": "CEO",
_17
"first_name": "rep1",
_17
"last_name": "test",
_17
"business_title": "ceo",
_17
"email": "foobar@test.com"
_17
},
_17
"type": "authorized_representative_1"
_17
}


Fetch an EndUser resource

fetch-an-enduser-resource page anchor
GET https://trusthub.twilio.com/v1/EndUsers/{Sid}

URI parameters
Sidtype: SID<IT>Not PII
Path Parameter

The unique string created by Twilio to identify the End User resource.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
client.trusthub.v1.endUsers('ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(end_user => console.log(end_user.friendlyName));

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"friendly_name": "auth_rep_1",
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"date_created": "2021-02-16T20:40:57Z",
_17
"attributes": {
_17
"phone_number": "+11234567890",
_17
"job_position": "CEO",
_17
"first_name": "rep1",
_17
"last_name": "test",
_17
"business_title": "ceo",
_17
"email": "foobar@test.com"
_17
},
_17
"type": "authorized_representative_1"
_17
}


Read multiple EndUser resources

read-multiple-enduser-resources page anchor
GET https://trusthub.twilio.com/v1/EndUsers

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.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
client.trusthub.v1.endUsers
_10
.list({limit: 20})
_10
.then(endUsers => endUsers.forEach(e => console.log(e.sid)));

Output

_30
{
_30
"results": [
_30
{
_30
"date_updated": "2021-02-16T20:40:57Z",
_30
"sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"friendly_name": "auth_rep_1",
_30
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"url": "https://trusthub.twilio.com/v1/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"date_created": "2021-02-16T20:40:57Z",
_30
"attributes": {
_30
"phone_number": "+11234567890",
_30
"job_position": "CEO",
_30
"first_name": "rep1",
_30
"last_name": "test",
_30
"business_title": "ceo",
_30
"email": "foobar@test.com"
_30
},
_30
"type": "authorized_representative_1"
_30
}
_30
],
_30
"meta": {
_30
"page": 0,
_30
"page_size": 50,
_30
"first_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
_30
"previous_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
_30
"url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
_30
"next_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=1",
_30
"key": "results"
_30
}
_30
}


Update an EndUser resource

update-an-enduser-resource page anchor
POST https://trusthub.twilio.com/v1/EndUsers/{Sid}

URI parameters
Sidtype: SID<IT>Not PII
Path Parameter

The unique string created by Twilio to identify the End User resource.


Request body parameters
FriendlyNametype: stringNot PII

The string that you assigned to describe the resource.


Attributestype: objectPII MTL: 30 days

The set of parameters that are the attributes of the End User resource which are derived End User Types.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
client.trusthub.v1.endUsers('ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.update({friendlyName: 'friendly_name'})
_10
.then(end_user => console.log(end_user.friendlyName));

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"friendly_name": "friendly_name",
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"date_created": "2021-02-16T20:40:57Z",
_17
"attributes": {
_17
"phone_number": "+11234567890",
_17
"job_position": "CEO",
_17
"first_name": "rep1",
_17
"last_name": "test",
_17
"business_title": "ceo",
_17
"email": "foobar@test.com"
_17
},
_17
"type": "authorized_representative_1"
_17
}


Delete an EndUser resource

delete-an-enduser-resource page anchor
DELETE https://trusthub.twilio.com/v1/EndUsers/{Sid}

URI parameters
Sidtype: SID<IT>Not PII
Path Parameter

The unique string created by Twilio to identify the End User resource.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
client.trusthub.v1.endUsers('ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();


Rate this page: