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

CustomerProfile Resource



CustomerProfile Properties

customerprofile-properties page anchor
Property nameTypePIIDescription
sidSID<BU>
Not PII

The unique string that we created to identify the Customer-Profile resource.

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

account_sidSID<AC>

The SID of the Account that created the Customer-Profile resource.

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

policy_sidSID<RN>

The unique string of a policy that is associated to the Customer-Profile resource.

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

friendly_namestring

The string that you assigned to describe the resource.


statusenum<string>

The verification status of the Customer-Profile resource.

Possible values:
draftpending-reviewin-reviewtwilio-rejectedtwilio-approved

emailstring

The email address that will receive updates when the Customer-Profile resource changes status.


status_callbackstring<uri>

The URL we call to inform your application of status changes.


date_createdstring<date-time>

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


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 Customer-Profile resource.


linksobject<uri-map>

The URLs of the Assigned Items of the Customer-Profile resource.


errorsarray

The error codes associated with the rejection of the Customer-Profile.


Create a CustomerProfile resource

create-a-customerprofile-resource page anchor
POST https://trusthub.twilio.com/v1/CustomerProfiles

Request body parameters

request-body-parameters page anchor
Property nameTypeRequiredPIIDescription
FriendlyNamestringrequired

The string that you assigned to describe the resource.


Emailstringrequired

The email address that will receive updates when the Customer-Profile resource changes status.


PolicySidSID<RN>required

The unique string of a policy that is associated to the Customer-Profile resource.

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

StatusCallbackstring<uri>Optional

The URL we call to inform your application of status changes.

Create a CustomerProfile

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

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

Output

_19
{
_19
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"friendly_name": "FriendlyName",
_19
"status": "draft",
_19
"email": "Email",
_19
"status_callback": "http://www.example.com",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"errors": null
_19
}


Fetch a CustomerProfile resource

fetch-a-customerprofile-resource page anchor
GET https://trusthub.twilio.com/v1/CustomerProfiles/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<BU>required

The unique string that we created to identify the Customer-Profile resource.

Pattern: ^BU[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 fetchCustomerProfile() {
_18
const customerProfile = await client.trusthub.v1
_18
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.fetch();
_18
_18
console.log(customerProfile.sid);
_18
}
_18
_18
fetchCustomerProfile();

Output

_23
{
_23
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"friendly_name": "friendly_name",
_23
"status": "draft",
_23
"valid_until": null,
_23
"email": "email",
_23
"status_callback": "http://www.example.com",
_23
"date_created": "2019-07-30T22:29:24Z",
_23
"date_updated": "2019-07-31T01:09:00Z",
_23
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"links": {
_23
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_23
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_23
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_23
},
_23
"errors": [
_23
{
_23
"code": 18601
_23
}
_23
]
_23
}


Read multiple CustomerProfile resources

read-multiple-customerprofile-resources page anchor
GET https://trusthub.twilio.com/v1/CustomerProfiles

Property nameTypeRequiredPIIDescription
Statusenum<string>Optional

The verification status of the Customer-Profile resource.

Possible values:
draftpending-reviewin-reviewtwilio-rejectedtwilio-approved

FriendlyNamestringOptional

The string that you assigned to describe the resource.


PolicySidSID<RN>Optional

The unique string of a policy that is associated to the Customer-Profile resource.

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

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 CustomerProfiles

list-multiple-customerprofiles 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 listCustomerProfile() {
_18
const customerProfiles = await client.trusthub.v1.customerProfiles.list({
_18
limit: 20,
_18
});
_18
_18
customerProfiles.forEach((c) => console.log(c.sid));
_18
}
_18
_18
listCustomerProfile();

Output

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


Update a CustomerProfile resource

update-a-customerprofile-resource page anchor
POST https://trusthub.twilio.com/v1/CustomerProfiles/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<BU>required

The unique string that we created to identify the Customer-Profile resource.

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
Statusenum<string>Optional

The verification status of the Customer-Profile resource. If the current verification status of the Customer-Profile is draft, you may set the verification status to pending-review to submit the Customer-Profile for Twilio review. No other values for status are permissible when updating a resource via this API endpoint as the other states are maintained by Twilio.

Possible values:
draftpending-reviewin-reviewtwilio-rejectedtwilio-approved

StatusCallbackstring<uri>Optional

The URL we call to inform your application of status changes.


FriendlyNamestringOptional

The string that you assigned to describe the resource.


EmailstringOptional

The email address that will receive updates when the Customer-Profile resource changes status.

Update a CustomerProfile

update-a-customerprofile 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 updateCustomerProfile() {
_18
const customerProfile = await client.trusthub.v1
_18
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.update({ status: "twilio-approved" });
_18
_18
console.log(customerProfile.sid);
_18
}
_18
_18
updateCustomerProfile();

Output

_19
{
_19
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"friendly_name": "friendly_name",
_19
"status": "twilio-approved",
_19
"email": "email",
_19
"status_callback": "http://www.example.com",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"errors": null
_19
}


Delete a CustomerProfile resource

delete-a-customerprofile-resource page anchor
DELETE https://trusthub.twilio.com/v1/CustomerProfiles/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<BU>required

The unique string that we created to identify the Customer-Profile resource.

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

Delete a CustomerProfile

delete-a-customerprofile 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 deleteCustomerProfile() {
_16
await client.trusthub.v1
_16
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.remove();
_16
}
_16
_16
deleteCustomerProfile();


Rate this page: