# A2P 10DLC - Vettings subresource

> \[!WARNING]
>
> This API reference page supplements the [A2P 10DLC government and nonprofit onboarding guide](/docs/messaging/compliance/a2p-10dlc/onboarding-for-government-and-non-profit-agencies). Don't use this API resource without following the appropriate guide, or you might experience **delays in registration and unintended fees**.

Vettings is a subresource of [BrandRegistrations](/docs/messaging/api/brand-registration-resource) and represents the association between a [Campaign Verify](https://www.campaignverify.org/) token and a BrandRegistration resource.

## Vetting Properties

```json
{"type":"object","refName":"messaging.v1.brand_registrations.brand_vetting","modelName":"messaging_v1_brand_registrations_brand_vetting","properties":{"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Account](/docs/iam/api/account) that created the vetting record."},"brand_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string to identify Brand Registration."},"brand_vetting_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^VT[0-9a-fA-F]{32}$","nullable":true,"description":"The Twilio SID of the third-party vetting record."},"date_updated":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"vetting_id":{"type":"string","nullable":true,"description":"The unique identifier of the vetting from the third-party provider."},"vetting_class":{"type":"string","nullable":true,"description":"The type of vetting that has been conducted. One of “STANDARD” (Aegis) or “POLITICAL” (Campaign Verify)."},"vetting_status":{"type":"string","nullable":true,"description":"The status of the import vetting attempt. One of “PENDING,” “SUCCESS,” or “FAILED”."},"vetting_provider":{"type":"string","enum":["campaign-verify","aegis"],"description":"The third-party provider that has conducted the vetting. One of “CampaignVerify” (Campaign Verify tokens) or “AEGIS” (Secondary Vetting).","refName":"brand_vetting_enum_vetting_provider","modelName":"brand_vetting_enum_vetting_provider"},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Brand Vetting resource."}}}
```

## Create a Vetting

`POST https://messaging.twilio.com/v1/a2p/BrandRegistrations/{BrandSid}/Vettings`

Create a Vetting subresource. 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

```json
[{"name":"BrandSid","in":"path","description":"The SID of the Brand Registration resource of the vettings to create .","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateBrandVettingRequest","required":["VettingProvider"],"properties":{"VettingProvider":{"type":"string","enum":["campaign-verify","aegis"],"description":"The third-party provider that has conducted the vetting. One of “CampaignVerify” (Campaign Verify tokens) or “AEGIS” (Secondary Vetting).","refName":"brand_vetting_enum_vetting_provider","modelName":"brand_vetting_enum_vetting_provider"},"VettingId":{"type":"string","description":"The unique ID of the vetting"}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"VettingProvider\": \"campaign-verify\",\n  \"VettingId\": \"cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY\"\n}","meta":"","code":"{\n  \"VettingProvider\": \"campaign-verify\",\n  \"VettingId\": \"cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"VettingProvider\"","#7EE787"],[":","#C9D1D9"]," ",["\"campaign-verify\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"VettingId\"","#7EE787"],[":","#C9D1D9"]," ",["\"cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}},"create202Response":{"value":{"lang":"json","value":"{\n  \"VettingProvider\": \"campaign-verify\",\n  \"VettingId\": \"cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY\"\n}","meta":"","code":"{\n  \"VettingProvider\": \"campaign-verify\",\n  \"VettingId\": \"cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"VettingProvider\"","#7EE787"],[":","#C9D1D9"]," ",["\"campaign-verify\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"VettingId\"","#7EE787"],[":","#C9D1D9"]," ",["\"cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Create a Vettings for a 527 political organization

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createBrandVetting() {
  const brandVetting = await client.messaging.v1
    .brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .brandVettings.create({
      vettingId:
        "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY",
      vettingProvider: "campaign-verify",
    });

  console.log(brandVetting.accountSid);
}

createBrandVetting();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

brand_vetting = client.messaging.v1.brand_registrations(
    "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).brand_vettings.create(
    vetting_id="cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY",
    vetting_provider="campaign-verify",
)

print(brand_vetting.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Messaging.V1.BrandRegistration;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var brandVetting = await BrandVettingResource.CreateAsync(
            vettingId: "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY",
            vettingProvider: BrandVettingResource.VettingProviderEnum.CampaignVerify,
            pathBrandSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(brandVetting.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.messaging.v1.brandregistration.BrandVetting;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        BrandVetting brandVetting =
            BrandVetting.creator("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", BrandVetting.VettingProvider.CAMPAIGN_VERIFY)
                .setVettingId("cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-"
                              + "LdQuPveFhEyY")
                .create();

        System.out.println(brandVetting.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	messaging "github.com/twilio/twilio-go/rest/messaging/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &messaging.CreateBrandVettingParams{}
	params.SetVettingId("cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY")
	params.SetVettingProvider("campaign-verify")

	resp, err := client.MessagingV1.CreateBrandVetting("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.AccountSid != nil {
			fmt.Println(*resp.AccountSid)
		} else {
			fmt.Println(resp.AccountSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$brand_vetting = $twilio->messaging->v1
    ->brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->brandVettings->create(
        "campaign-verify", // VettingProvider
        [
            "vettingId" =>
                "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY",
        ]
    );

print $brand_vetting->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

brand_vetting = @client
                .messaging
                .v1
                .brand_registrations('BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                .brand_vettings
                .create(
                  vetting_id: 'cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY',
                  vetting_provider: 'campaign-verify'
                )

puts brand_vetting.account_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:messaging:v1:a2p:brand-registrations:vettings:create \
   --brand-sid BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --vetting-id "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY" \
   --vetting-provider campaign-verify
```

```bash
curl -X POST "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Vettings" \
--data-urlencode "VettingId=cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY" \
--data-urlencode "VettingProvider=campaign-verify" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
  "brand_sid": "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "brand_vetting_sid": "VT12445353",
  "vetting_provider": "campaign-verify",
  "vetting_id": "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-2e6d5ebac66d|EXAMPLEjEd8xSlaAgRXAXXBUNBT2AgL-LdQuPveFhEyY",
  "vetting_class": "POLITICAL",
  "vetting_status": "IN_PROGRESS",
  "date_created": "2021-01-27T14:18:35Z",
  "date_updated": "2021-01-27T14:18:35Z",
  "url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings/VT12445353"
}
```

> \[!WARNING]
>
> Don't create a [UsAppToPerson resource](/docs/messaging/api/usapptoperson-resource) until the `vetting_status` is `SUCCESS`.
>
> You can check the `vetting_status` with a [`GET` request](#retrieve-a-vetting).
>
> If the `vetting_status` is `SUCCESS`, the Campaign Verify token is successfully associated with your Brand. This allows you to use the `POLITICAL` special use case.

## Retrieve a Vetting

`GET https://messaging.twilio.com/v1/a2p/BrandRegistrations/{BrandSid}/Vettings/{BrandVettingSid}`

Retrieve a Vetting using a `BrandVettingSid`.

You can use this request to check the `vetting_status`.

### Path parameters

```json
[{"name":"BrandSid","in":"path","description":"The SID of the Brand Registration resource of the vettings to read .","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$"},"required":true},{"name":"BrandVettingSid","in":"path","description":"The Twilio SID of the third-party vetting record.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^VT[0-9a-fA-F]{32}$"},"required":true}]
```

Retrieve a Vetting

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchBrandVetting() {
  const brandVetting = await client.messaging.v1
    .brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .brandVettings("VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .fetch();

  console.log(brandVetting.accountSid);
}

fetchBrandVetting();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

brand_vetting = (
    client.messaging.v1.brand_registrations(
        "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    )
    .brand_vettings("VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .fetch()
)

print(brand_vetting.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Messaging.V1.BrandRegistration;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var brandVetting = await BrandVettingResource.FetchAsync(
            pathBrandSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathBrandVettingSid: "VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(brandVetting.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.messaging.v1.brandregistration.BrandVetting;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        BrandVetting brandVetting =
            BrandVetting.fetcher("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch();

        System.out.println(brandVetting.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.MessagingV1.FetchBrandVetting("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		"VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.AccountSid != nil {
			fmt.Println(*resp.AccountSid)
		} else {
			fmt.Println(resp.AccountSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$brand_vetting = $twilio->messaging->v1
    ->brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->brandVettings("VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->fetch();

print $brand_vetting->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

brand_vetting = @client
                .messaging
                .v1
                .brand_registrations('BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                .brand_vettings('VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                .fetch

puts brand_vetting.account_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:messaging:v1:a2p:brand-registrations:vettings:fetch \
   --brand-sid BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --brand-vetting-sid VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Vettings/VTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

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

## Retrieve a list of Vettings

`GET https://messaging.twilio.com/v1/a2p/BrandRegistrations/{BrandSid}/Vettings`

This request returns all Vettings associated with a [BrandRegistrations resource](/docs/messaging/api/brand-registration-resource).

### Path parameters

```json
[{"name":"BrandSid","in":"path","description":"The SID of the Brand Registration resource of the vettings to read .","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$"},"required":true}]
```

### Query parameters

```json
[{"name":"VettingProvider","in":"query","description":"The third-party provider of the vettings to read","schema":{"type":"string","enum":["campaign-verify","aegis"],"description":"The third-party provider that has conducted the vetting. One of “CampaignVerify” (Campaign Verify tokens) or “AEGIS” (Secondary Vetting).","refName":"brand_vetting_enum_vetting_provider","modelName":"brand_vetting_enum_vetting_provider"}}]
```

Retrieve a list of Vettings for a BrandRegistration

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listBrandVetting() {
  const brandVettings = await client.messaging.v1
    .brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .brandVettings.list({ limit: 20 });

  brandVettings.forEach((b) => console.log(b.accountSid));
}

listBrandVetting();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

brand_vettings = client.messaging.v1.brand_registrations(
    "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).brand_vettings.list(limit=20)

for record in brand_vettings:
    print(record.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Messaging.V1.BrandRegistration;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var brandVettings = await BrandVettingResource.ReadAsync(
            pathBrandSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", limit: 20);

        foreach (var record in brandVettings) {
            Console.WriteLine(record.AccountSid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.messaging.v1.brandregistration.BrandVetting;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<BrandVetting> brandVettings =
            BrandVetting.reader("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").limit(20).read();

        for (BrandVetting record : brandVettings) {
            System.out.println(record.getAccountSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	messaging "github.com/twilio/twilio-go/rest/messaging/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &messaging.ListBrandVettingParams{}
	params.SetLimit(20)

	resp, err := client.MessagingV1.ListBrandVetting("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].AccountSid != nil {
				fmt.Println(*resp[record].AccountSid)
			} else {
				fmt.Println(resp[record].AccountSid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$brandVettings = $twilio->messaging->v1
    ->brandRegistrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->brandVettings->read([], 20);

foreach ($brandVettings as $record) {
    print $record->accountSid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

brand_vettings = @client
                 .messaging
                 .v1
                 .brand_registrations('BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                 .brand_vettings
                 .list(limit: 20)

brand_vettings.each do |record|
   puts record.account_sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:messaging:v1:a2p:brand-registrations:vettings:list \
   --brand-sid BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Vettings?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings",
    "previous_page_url": null,
    "next_page_url": null,
    "key": "data",
    "url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings"
  },
  "data": [
    {
      "account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
      "brand_sid": "BN0044409f7e067e279523808d267e2d85",
      "brand_vetting_sid": "VT12445353",
      "vetting_provider": "campaign-verify",
      "vetting_id": "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY",
      "vetting_class": "POLITICAL",
      "vetting_status": "IN_PROGRESS",
      "date_created": "2021-01-27T14:18:35Z",
      "date_updated": "2021-01-27T14:18:35Z",
      "url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings/VT12445353"
    }
  ]
}
```
