Skip to contentSkip to navigationSkip to topbar
On this page

SupportingDocument Resource



SupportingDocument Properties

supportingdocument-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<RD>

Optional

Not PII

The unique string created by Twilio to identify the Supporting Document resource.

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

account_sidSID<AC>

Optional

The SID of the Account that created the Document resource.

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

friendly_namestring

Optional

The string that you assigned to describe the resource.


mime_typestring

Optional

The image type uploaded in the Supporting Document container.


statusenum<string>

Optional

The verification status of the Supporting Document resource.

Possible values:
draftpending-reviewrejectedapprovedexpiredprovisionally-approved

typestring

Optional

The type of the Supporting Document.


attributesobject

Optional

PII MTL: 30 days

The set of parameters that are the attributes of the Supporting Documents resource which are listed in the Supporting Document Types.


date_updatedstring<date-time>

Optional

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>

Optional

The absolute URL of the Supporting Document resource.


Create a new Supporting Document.

create-a-new-supporting-document page anchor
POST https://trusthub.twilio.com/v1/SupportingDocuments

Request body parameters

request-body-parameters page anchor
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
FriendlyNamestringrequired

The string that you assigned to describe the resource.


Typestringrequired

The type of the Supporting Document.


Attributesobject

Optional

The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.

Create a SupportingDocumentLink to code sample: Create a SupportingDocument
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 createSupportingDocument() {
11
const supportingDocument =
12
await client.trusthub.v1.supportingDocuments.create({
13
friendlyName: "FriendlyName",
14
type: "Type",
15
});
16
17
console.log(supportingDocument.sid);
18
}
19
20
createSupportingDocument();

Output

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": null
14
}

Fetch specific Supporting Document Instance.

fetch-specific-supporting-document-instance page anchor
GET https://trusthub.twilio.com/v1/SupportingDocuments/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<RD>required

The unique string created by Twilio to identify the Supporting Document resource.

Pattern: ^RD[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 fetchSupportingDocument() {
11
const supportingDocument = await client.trusthub.v1
12
.supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.fetch();
14
15
console.log(supportingDocument.sid);
16
}
17
18
fetchSupportingDocument();

Output

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": null
14
}

Retrieve a list of all Supporting Document for an account.

retrieve-a-list-of-all-supporting-document-for-an-account page anchor
GET https://trusthub.twilio.com/v1/SupportingDocuments

Property nameTypeRequiredPIIDescription
PageSizeinteger

Optional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

Pageinteger

Optional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstring

Optional

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

Output

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
}

Update an existing Supporting Document.

update-an-existing-supporting-document page anchor
POST https://trusthub.twilio.com/v1/SupportingDocuments/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<RD>required

The unique string created by Twilio to identify the Supporting Document resource.

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

Optional

The string that you assigned to describe the resource.


Attributesobject

Optional

The 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/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 updateSupportingDocument() {
11
const supportingDocument = await client.trusthub.v1
12
.supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.update({ friendlyName: "FriendlyName" });
14
15
console.log(supportingDocument.sid);
16
}
17
18
updateSupportingDocument();

Output

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": null
14
}

Delete a specific Supporting Document.

delete-a-specific-supporting-document page anchor
DELETE https://trusthub.twilio.com/v1/SupportingDocuments/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<RD>required

The unique string created by Twilio to identify the Supporting Document resource.

Pattern: ^RD[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 deleteSupportingDocument() {
11
await client.trusthub.v1
12
.supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.remove();
14
}
15
16
deleteSupportingDocument();

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.