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

CustomerProfileEntityAssignment Resource



EntityAssignment Properties

entityassignment-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<BV>Optional
Not PII

The unique string that we created to identify the Item Assignment resource.

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

customer_profile_sidSID<BU>Optional

The unique string that we created to identify the CustomerProfile resource.

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

account_sidSID<AC>Optional

The SID of the Account that created the Item Assignment resource.

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

object_sidSIDOptional

The SID of an object bag that holds information of the different items.

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

urlstring<uri>Optional

The absolute URL of the Identity resource.


Create a new Assigned Item.

create-a-new-assigned-item page anchor
POST https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
CustomerProfileSidSID<BU>required

The unique string that we created to identify the CustomerProfile resource.

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
ObjectSidSIDrequired

The SID of an object bag that holds information of the different items.

Pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$Min length: 34Max length: 34
Create an EntityAssignmentLink to code sample: Create an EntityAssignment
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 createCustomerProfileEntityAssignment() {
11
const customerProfilesEntityAssignment = await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

Fetch specific Assigned Item Instance.

fetch-specific-assigned-item-instance page anchor
GET https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}

Property nameTypeRequiredPIIDescription
CustomerProfileSidSID<BU>required

The unique string that we created to identify the CustomerProfile resource.

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

SidSID<BV>required

The unique string that we created to identify the Identity resource.

Pattern: ^BV[0-9a-fA-F]{32}$Min length: 34Max length: 34
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 fetchCustomerProfileEntityAssignment() {
11
const customerProfilesEntityAssignment = await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesEntityAssignments("BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
14
.fetch();
15
16
console.log(customerProfilesEntityAssignment.sid);
17
}
18
19
fetchCustomerProfileEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

Retrieve a list of all Assigned Items for an account.

retrieve-a-list-of-all-assigned-items-for-an-account page anchor
GET https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments

Property nameTypeRequiredPIIDescription
CustomerProfileSidSID<BU>required

The unique string that we created to identify the CustomerProfile resource.

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

A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document.


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 listCustomerProfileEntityAssignment() {
11
const customerProfilesEntityAssignments = await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesEntityAssignments.list({ limit: 20 });
14
15
customerProfilesEntityAssignments.forEach((c) => console.log(c.sid));
16
}
17
18
listCustomerProfileEntityAssignment();

Output

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

Remove an Assignment Item Instance.

remove-an-assignment-item-instance page anchor
DELETE https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}

Property nameTypeRequiredPIIDescription
CustomerProfileSidSID<BU>required

The unique string that we created to identify the CustomerProfile resource.

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

SidSID<BV>required

The unique string that we created to identify the Identity resource.

Pattern: ^BV[0-9a-fA-F]{32}$Min length: 34Max length: 34
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 deleteCustomerProfileEntityAssignment() {
11
await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesEntityAssignments("BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
14
.remove();
15
}
16
17
deleteCustomerProfileEntityAssignment();

Rate this page: