Skip to contentSkip to navigationSkip to topbar
On this page

A2P 10DLC - BrandVetting Resource


(warning)

Warning

This API Reference page is meant to supplement the A2P 10DLC Government and Nonprofit Onboarding Guide.

Do not attempt to use this API resource without following the appropriate guide, or you may incur delays in registration and unintended fees.

The BrandVetting resource represents the association between a Campaign Verify(link takes you to an external page) token and a BrandRegistration resource.

The BrandVetting resource is a subresource of the BrandRegistration resource.


Vetting Properties

vetting-properties page anchor
Property nameTypeRequiredDescriptionChild properties
account_sidSID<AC>Optional
Not PII

The SID of the Account that created the vetting record.

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

brand_sidSID<BN>Optional

The unique string to identify Brand Registration.

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

brand_vetting_sidSID<VT>Optional

The Twilio SID of the third-party vetting record.

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

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.


date_createdstring<date-time>Optional

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


vetting_idstringOptional

The unique identifier of the vetting from the third-party provider.


vetting_classstringOptional

The type of vetting that has been conducted. One of “STANDARD” (Aegis) or “POLITICAL” (Campaign Verify).


vetting_statusstringOptional

The status of the import vetting attempt. One of “PENDING,” “SUCCESS,” or “FAILED”.


vetting_providerenum<string>Optional

The third-party provider that has conducted the vetting. One of “CampaignVerify” (Campaign Verify tokens) or “AEGIS” (Secondary Vetting).

Possible values:
campaign-verify

urlstring<uri>Optional

The absolute URL of the Brand Vetting resource.


Create a BrandVetting resource

create-a-brandvetting-resource page anchor
POST https://messaging.twilio.com/v1/a2p/BrandRegistrations/{BrandSid}/Vettings

This API request creates a BrandVetting resource. This associates a BrandRegistration resource and a Campaign Verify token.

The VettingProvider is campaign-verify, and the Campaign Verify token is provided in the VettingId parameter.

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
BrandSidSID<BN>required

The SID of the Brand Registration resource of the vettings to create .

Pattern: ^BN[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
VettingProviderenum<string>required

The third-party provider of the vettings to create .

Possible values:
campaign-verify

VettingIdstringOptional

The unique ID of the vetting

Create a BrandVetting resource for a 527 political organizationLink to code sample: Create a BrandVetting resource for a 527 political organization
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 createBrandVetting() {
11
const brandVetting = await client.messaging.v1
12
.brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.brandVettings.create({
14
vettingId:
15
"cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY",
16
vettingProvider: "campaign-verify",
17
});
18
19
console.log(brandVetting.accountSid);
20
}
21
22
createBrandVetting();

Output

1
{
2
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
3
"brand_sid": "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
4
"brand_vetting_sid": "VT12445353",
5
"vetting_provider": "campaign-verify",
6
"vetting_id": "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY",
7
"vetting_class": "POLITICAL",
8
"vetting_status": "IN_PROGRESS",
9
"date_created": "2021-01-27T14:18:35Z",
10
"date_updated": "2021-01-27T14:18:35Z",
11
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings/VT12445353"
12
}
(warning)

Warning

Don't create a UsAppToPerson resource until the BrandVetting resource's vetting_status is SUCCESS.

You can check the vetting_status of the BrandVetting resource using the Fetch request below.

Once the BrandVetting status is SUCCESS, the Campaign Verify token has been successfully associated with your Brand. This allows you to use the POLITICAL special use case.


Fetch a specific BrandVetting resource

fetch-a-specific-brandvetting-resource page anchor
GET https://messaging.twilio.com/v1/a2p/BrandRegistrations/{BrandSid}/Vettings/{BrandVettingSid}

This API request fetches an individual BrandVetting resource using a BrandVettingSid .

You can use this request to check the vetting_status of a BrandVetting resource.

Property nameTypeRequiredPIIDescription
BrandSidSID<BN>required

The SID of the Brand Registration resource of the vettings to read .

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

BrandVettingSidSID<VT>required

The Twilio SID of the third-party vetting record.

Pattern: ^VT[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 fetchBrandVetting() {
11
const brandVetting = await client.messaging.v1
12
.brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.brandVettings("VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
14
.fetch();
15
16
console.log(brandVetting.accountSid);
17
}
18
19
fetchBrandVetting();

Output

1
{
2
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
3
"brand_sid": "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
4
"brand_vetting_sid": "VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5
"vetting_provider": "campaign-verify",
6
"vetting_id": "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY",
7
"vetting_class": "POLITICAL",
8
"vetting_status": "IN_PROGRESS",
9
"date_created": "2021-01-27T14:18:35Z",
10
"date_updated": "2021-01-27T14:18:35Z",
11
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings/VT12445353"
12
}

List all BrandVetting resources

list-all-brandvetting-resources page anchor
GET https://messaging.twilio.com/v1/a2p/BrandRegistrations/{BrandSid}/Vettings

This request returns all BrandVetting resources associated with a BrandRegistration resource.

Property nameTypeRequiredPIIDescription
BrandSidSID<BN>required

The SID of the Brand Registration resource of the vettings to read .

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

The third-party provider of the vettings to read

Possible values:
campaign-verify

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 all BrandVetting resources for a specific BrandRegistration resourceLink to code sample: List all BrandVetting resources for a specific BrandRegistration resource
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 listBrandVetting() {
11
const brandVettings = await client.messaging.v1
12
.brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.brandVettings.list({ limit: 20 });
14
15
brandVettings.forEach((b) => console.log(b.accountSid));
16
}
17
18
listBrandVetting();

Output

1
{
2
"meta": {
3
"page": 0,
4
"page_size": 50,
5
"first_page_url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings?PageSize=50&Page=0",
6
"previous_page_url": null,
7
"next_page_url": null,
8
"key": "data",
9
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings?PageSize=50&Page=0"
10
},
11
"data": [
12
{
13
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
14
"brand_sid": "BN0044409f7e067e279523808d267e2d85",
15
"brand_vetting_sid": "VT12445353",
16
"vetting_provider": "campaign-verify",
17
"vetting_id": "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY",
18
"vetting_class": "POLITICAL",
19
"vetting_status": "IN_PROGRESS",
20
"date_created": "2021-01-27T14:18:35Z",
21
"date_updated": "2021-01-27T14:18:35Z",
22
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings/VT12445353"
23
}
24
]
25
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.