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

EndUser Resource



EndUser Properties

enduser-properties page anchor
Property nameTypePIIDescription
sidSID<IT>
Not PII

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

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

account_sidSID<AC>

The SID of the Account that created the End User resource.

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

friendly_namestring

The string that you assigned to describe the resource.


typestring

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


attributesobject
PII 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_updatedstring<date-time>

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


urlstring<uri>

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

Request body parameters

request-body-parameters page anchor
Property nameTypeRequiredPIIDescription
FriendlyNamestringrequired

The string that you assigned to describe the resource.


Typestringrequired

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


AttributesobjectOptional

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

Create an EndUser

create-an-enduser page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function createEndUser() {
_19
const endUser = await client.trusthub.v1.endUsers.create({
_19
friendlyName: "FriendlyName",
_19
type: "Type",
_19
});
_19
_19
console.log(endUser.sid);
_19
}
_19
_19
createEndUser();

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "FriendlyName",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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": "Type"
_17
}


Fetch an EndUser resource

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

Property nameTypeRequiredPIIDescription
SidSID<IT>required

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

Pattern: ^IT[0-9a-fA-F]{32}$Min length: 34Max length: 34
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 fetchEndUser() {
_18
const endUser = await client.trusthub.v1
_18
.endUsers("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.fetch();
_18
_18
console.log(endUser.sid);
_18
}
_18
_18
fetchEndUser();

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "auth_rep_1",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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

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.

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

Output

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


Update an EndUser resource

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

Property nameTypeRequiredPIIDescription
SidSID<IT>required

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

Pattern: ^IT[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
FriendlyNamestringOptional

The string that you assigned to describe the resource.


AttributesobjectOptional

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

_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 updateEndUser() {
_18
const endUser = await client.trusthub.v1
_18
.endUsers("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.update({ friendlyName: "FriendlyName" });
_18
_18
console.log(endUser.sid);
_18
}
_18
_18
updateEndUser();

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "FriendlyName",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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}

Property nameTypeRequiredPIIDescription
SidSID<IT>required

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

Pattern: ^IT[0-9a-fA-F]{32}$Min length: 34Max length: 34
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 deleteEndUser() {
_16
await client.trusthub.v1
_16
.endUsers("ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.remove();
_16
}
_16
_16
deleteEndUser();


Rate this page: