SupportingDocument Resource
The unique string created by Twilio to identify the Supporting Document resource.
^RD[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of the Account that created the Document resource.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The verification status of the Supporting Document resource.
DRAFTPENDING_REVIEWREJECTEDAPPROVEDEXPIREDPROVISIONALLY_APPROVEDThe set of parameters that are the attributes of the Supporting Documents resource which are listed in the Supporting Document Types.
The date and time in GMT when the resource was created specified in ISO 8601 format.
The date and time in GMT when the resource was last updated specified in ISO 8601 format.
The absolute URL of the Supporting Document resource.
POST https://trusthub.twilio.com/v1/SupportingDocuments
application/x-www-form-urlencodedThe set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function createSupportingDocument() {14const supportingDocument =15await client.trusthub.v1.supportingDocuments.create({16friendlyName: "FriendlyName",17type: "Type",18});1920console.log(supportingDocument.sid);21}2223createSupportingDocument();
Response
1{2"status": "DRAFT",3"date_updated": "2021-02-11T17:23:00Z",4"friendly_name": "FriendlyName",5"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"date_created": "2021-02-11T17:23:00Z",8"sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",9"attributes": {10"address_sids": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"11},12"type": "Type",13"mime_type": null14}
GET https://trusthub.twilio.com/v1/SupportingDocuments/{Sid}
The unique string created by Twilio to identify the Supporting Document resource.
^RD[0-9a-fA-F]{32}$Min length: 34Max length: 341// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function fetchSupportingDocument() {14const supportingDocument = await client.trusthub.v115.supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")16.fetch();1718console.log(supportingDocument.sid);19}2021fetchSupportingDocument();
Response
1{2"status": "DRAFT",3"date_updated": "2021-02-11T17:23:00Z",4"friendly_name": "Business-profile-physical-address",5"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"date_created": "2021-02-11T17:23:00Z",8"sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",9"attributes": {10"address_sids": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"11},12"type": "customer_profile_address",13"mime_type": null14}
GET https://trusthub.twilio.com/v1/SupportingDocuments
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1Maximum: 1000The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function listSupportingDocument() {14const supportingDocuments = await client.trusthub.v1.supportingDocuments.list(15{ limit: 20 },16);1718supportingDocuments.forEach((s) => console.log(s.sid));19}2021listSupportingDocument();
Response
1{2"results": [],3"meta": {4"page": 0,5"page_size": 50,6"first_page_url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",7"previous_page_url": null,8"url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",9"next_page_url": null,10"key": "results"11}12}
POST https://trusthub.twilio.com/v1/SupportingDocuments/{Sid}
The unique string created by Twilio to identify the Supporting Document resource.
^RD[0-9a-fA-F]{32}$Min length: 34Max length: 34application/x-www-form-urlencodedThe set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function updateSupportingDocument() {14const supportingDocument = await client.trusthub.v115.supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")16.update({ friendlyName: "FriendlyName" });1718console.log(supportingDocument.sid);19}2021updateSupportingDocument();
Response
1{2"status": "DRAFT",3"date_updated": "2021-02-11T17:23:00Z",4"friendly_name": "FriendlyName",5"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"date_created": "2021-02-11T17:23:00Z",8"sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",9"attributes": {10"address_sids": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"11},12"type": "customer_profile_address",13"mime_type": null14}
DELETE https://trusthub.twilio.com/v1/SupportingDocuments/{Sid}
The unique string created by Twilio to identify the Supporting Document resource.
^RD[0-9a-fA-F]{32}$Min length: 34Max length: 341// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function deleteSupportingDocument() {14await client.trusthub.v115.supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")16.remove();17}1819deleteSupportingDocument();