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

Policies Resource



Policies Properties

policies-properties page anchor
Property nameTypePIIDescription
sidSID<RN>
Not PII

The unique string that identifies the Policy resource.

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

friendly_namestring

A human-readable description that is assigned to describe the Policy resource. Examples can include Primary Customer profile policy


requirementsobject

The SID of an object that holds the policy information


urlstring<uri>

The absolute URL of the Policy resource.


Fetch specific Policy Instance.

fetch-specific-policy-instance page anchor
GET https://trusthub.twilio.com/v1/Policies/{Sid}

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
SidSID<RN>required

The unique string that identifies the Policy resource.

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

Fetch a Policies

fetch-a-policies 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 fetchPolicies() {
_18
const policy = await client.trusthub.v1
_18
.policies("RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.fetch();
_18
_18
console.log(policy.sid);
_18
}
_18
_18
fetchPolicies();

Output

_76
{
_76
"url": "https://trusthub.twilio.com/v1/Policies/RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_76
"requirements": {
_76
"end_user": [
_76
{
_76
"url": "/EndUserTypes/customer_profile_business_information",
_76
"fields": [
_76
"business_type",
_76
"business_registration_number",
_76
"business_name",
_76
"business_registration_identifier",
_76
"business_identity",
_76
"business_industry",
_76
"website_url",
_76
"business_regions_of_operation",
_76
"social_media_profile_urls"
_76
],
_76
"type": "customer_profile_business_information",
_76
"name": "Business Information",
_76
"requirement_name": "customer_profile_business_information"
_76
},
_76
{
_76
"url": "/EndUserTypes/authorized_representative_1",
_76
"fields": [
_76
"first_name",
_76
"last_name",
_76
"email",
_76
"phone_number",
_76
"business_title",
_76
"job_position"
_76
],
_76
"type": "authorized_representative_1",
_76
"name": "Authorized Representative 1",
_76
"requirement_name": "authorized_representative_1"
_76
},
_76
{
_76
"url": "/EndUserTypes/authorized_representative_2",
_76
"fields": [
_76
"first_name",
_76
"last_name",
_76
"email",
_76
"phone_number",
_76
"business_title",
_76
"job_position"
_76
],
_76
"type": "authorized_representative_2",
_76
"name": "Authorized Representative 2",
_76
"requirement_name": "authorized_representative_2"
_76
}
_76
],
_76
"supporting_trust_products": [],
_76
"supporting_document": [
_76
[
_76
{
_76
"description": "Customer Profile HQ Physical Address",
_76
"type": "document",
_76
"name": "Physical Business Address",
_76
"accepted_documents": [
_76
{
_76
"url": "/SupportingDocumentTypes/customer_profile_address",
_76
"fields": [
_76
"address_sids"
_76
],
_76
"type": "customer_profile_address",
_76
"name": "Physical Business Address"
_76
}
_76
],
_76
"requirement_name": "customer_profile_address"
_76
}
_76
]
_76
],
_76
"supporting_customer_profiles": []
_76
},
_76
"friendly_name": "Primary Customer Profile of type Business",
_76
"sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_76
}


Retrieve a list of all Policys.

retrieve-a-list-of-all-policys page anchor
GET https://trusthub.twilio.com/v1/Policies

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

Output

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


Rate this page: