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

TrustProduct Resource



TrustProduct Properties

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

The unique string that we created to identify the Trust Product resource.

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

account_sidSID<AC>

The SID of the Account that created the Trust Product resource.

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

policy_sidSID<RN>

The unique string of the policy that is associated with the Trust Product 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 Trust Product resource.

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

emailstring

The email address that will receive updates when the Trust Product 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 Trust Product resource.


linksobject<uri-map>

The URLs of the Assigned Items of the Trust Product resource.


errorsarray

The error codes associated with the rejection of the Trust Product.


Create a TrustProduct resource

create-a-trustproduct-resource page anchor
POST https://trusthub.twilio.com/v1/TrustProducts

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 Trust Product resource changes status.


PolicySidSID<RN>required

The unique string of a policy that is associated to the Trust Product 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 TrustProduct

create-a-trustproduct 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 createTrustProduct() {
_20
const trustProduct = await client.trusthub.v1.trustProducts.create({
_20
email: "Email",
_20
friendlyName: "FriendlyName",
_20
policySid: "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
});
_20
_20
console.log(trustProduct.sid);
_20
}
_20
_20
createTrustProduct();

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/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"errors": null
_19
}


Fetch a TrustProduct resource

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

Property nameTypeRequiredPIIDescription
SidSID<BU>required

The unique string that we created to identify the Trust Product 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 fetchTrustProduct() {
_18
const trustProduct = await client.trusthub.v1
_18
.trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.fetch();
_18
_18
console.log(trustProduct.sid);
_18
}
_18
_18
fetchTrustProduct();

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/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
"links": {
_23
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_23
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_23
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_23
},
_23
"errors": [
_23
{
_23
"code": 18601
_23
}
_23
]
_23
}


Read multiple TrustProduct resources

read-multiple-trustproduct-resources page anchor
GET https://trusthub.twilio.com/v1/TrustProducts

Property nameTypeRequiredPIIDescription
Statusenum<string>Optional

The verification status of the Trust Product 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 Trust Product 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 TrustProducts

list-multiple-trustproducts 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 listTrustProduct() {
_18
const trustProducts = await client.trusthub.v1.trustProducts.list({
_18
limit: 20,
_18
});
_18
_18
trustProducts.forEach((t) => console.log(t.sid));
_18
}
_18
_18
listTrustProduct();

Output

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


Update a TrustProduct resource

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

Property nameTypeRequiredPIIDescription
SidSID<BU>required

The unique string that we created to identify the Trust Product resource.

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

The verification status of the Trust Product resource. If the current verification status of the Trust Product is draft, you may set the verification status to pending-review to submit the TrustProduct 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 Trust Product resource changes status.

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 updateTrustProduct() {
_18
const trustProduct = await client.trusthub.v1
_18
.trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.update({ status: "pending-review" });
_18
_18
console.log(trustProduct.sid);
_18
}
_18
_18
updateTrustProduct();

Output

_19
{
_19
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"friendly_name": "friendly_name",
_19
"status": "pending-review",
_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/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"errors": null
_19
}


Delete a TrustProduct resource

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

Property nameTypeRequiredPIIDescription
SidSID<BU>required

The unique string that we created to identify the Trust Product resource.

Pattern: ^BU[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 deleteTrustProduct() {
_16
await client.trusthub.v1
_16
.trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.remove();
_16
}
_16
_16
deleteTrustProduct();


Rate this page: