# SHAKEN/STIR Onboarding with the Trust Hub REST API (ISVs/Resellers with Single, Top-Level Project)

> \[!NOTE]
>
> For general information on the Trust Hub API, go to the [Trust Hub API Docs](/docs/trust-hub/trusthub-rest-api).

This page walks **ISVs/Resellers with one top-level project** through creating a SHAKEN/STIR Trust Product with the Trust Hub REST API.

**Not an ISV/Reseller with one top-level project?** Find the appropriate onboarding instructions below:

* [Direct Customer (no Subaccounts)](/docs/voice/trusted-calling-with-shakenstir/shakenstir-onboarding/shaken-stir-trust-hub-api-direct-customer)
* [Direct Customer using Subaccounts](/docs/voice/trusted-calling-with-shakenstir/shakenstir-onboarding/shaken-stir-trust-hub-api-direct-customer-subaccounts)
* [ISV/Reseller using Subaccounts](/docs/voice/trusted-calling-with-shakenstir/shakenstir-onboarding/shaken-stir-trust-hub-api-isvs-subaccounts)

## Overview:

**There are three main sections in this guide:**

* **Create Primary Business Profile in the Console**
* **Create Secondary Business Profile, Add Phone Numbers**

  * Create Secondary Business Profile, Connect to Primary Business Profile
  * Create a Supporting Document, Connect to Secondary Business Profile
  * Create Business Information, Connect to Secondary Business Profile
  * Create Authorized Representative, Connect to Secondary Business Profile
  * Add Phone Numbers to Secondary Business Profile
  * Submit Secondary Business Profile for Vetting
* **Create Trust Product, Add Phone Numbers, and Submit for Vetting**

![Create a Primary Business Profile under your Parent Account. Add Phone Numbers from Subaccounts to the Business Profile.](./SHAKEN_STIR_-_ISV_single_top_level_project.width-1600.png)

## Create a Primary Business Profile in your Parent Account in the Console's Trust Hub and submit for vetting.

* In your Console, navigate to [Trust Hub -> Customer Profiles](https://www.twilio.com/console/trust-hub/customer-profiles) to create your profile.
* You will only need to do this one time.
* For more information on Business Profiles and vetting, go to the [Trust Hub Docs](/docs/trust-hub).

## Create Secondary Business Profile

### 1. Create a Secondary Business Profile for your customer

* You will want to save the `sid` from the response. This is your **Secondary Business Profile SID**, and you will need it for the next step.
* Do not change the `PolicySID` in the API call below. This is a static value that will be the same across all accounts.

Create a Secondary Business Profile for your Customer

```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 createCustomerProfile() {
  const customerProfile = await client.trusthub.v1.customerProfiles.create({
    email: "EMAIL@EXAMPLE.COM",
    friendlyName: "YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
    policySid: "RNdfbf3fae0e1107f8aded0e7cead80bf5",
  });

  console.log(customerProfile.sid);
}

createCustomerProfile();
```

```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)

customer_profile = client.trusthub.v1.customer_profiles.create(
    friendly_name="YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
    email="EMAIL@EXAMPLE.COM",
    policy_sid="RNdfbf3fae0e1107f8aded0e7cead80bf5",
)

print(customer_profile.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
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 customerProfiles = await CustomerProfilesResource.CreateAsync(
            friendlyName: "YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
            email: "EMAIL@EXAMPLE.COM",
            policySid: "RNdfbf3fae0e1107f8aded0e7cead80bf5");

        Console.WriteLine(customerProfiles.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.CustomerProfiles;

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);
        CustomerProfiles customerProfiles = CustomerProfiles
                                                .creator("YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
                                                    "EMAIL@EXAMPLE.COM",
                                                    "RNdfbf3fae0e1107f8aded0e7cead80bf5")
                                                .create();

        System.out.println(customerProfiles.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateCustomerProfileParams{}
	params.SetFriendlyName("YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE")
	params.SetEmail("EMAIL@EXAMPLE.COM")
	params.SetPolicySid("RNdfbf3fae0e1107f8aded0e7cead80bf5")

	resp, err := client.TrusthubV1.CreateCustomerProfile(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$customer_profile = $twilio->trusthub->v1->customerProfiles->create(
    "YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE", // FriendlyName
    "EMAIL@EXAMPLE.COM", // Email
    "RNdfbf3fae0e1107f8aded0e7cead80bf5" // PolicySid
);

print $customer_profile->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profile = @client
                   .trusthub
                   .v1
                   .customer_profiles
                   .create(
                     friendly_name: 'YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE',
                     email: 'EMAIL@EXAMPLE.COM',
                     policy_sid: 'RNdfbf3fae0e1107f8aded0e7cead80bf5'
                   )

puts customer_profile.sid
```

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

twilio api:trusthub:v1:customer-profiles:create \
   --friendly-name YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE \
   --email EMAIL@EXAMPLE.COM \
   --policy-sid RNdfbf3fae0e1107f8aded0e7cead80bf5
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/CustomerProfiles" \
--data-urlencode "FriendlyName=YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE" \
--data-urlencode "Email=EMAIL@EXAMPLE.COM" \
--data-urlencode "PolicySid=RNdfbf3fae0e1107f8aded0e7cead80bf5" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "policy_sid": "RNdfbf3fae0e1107f8aded0e7cead80bf5",
  "friendly_name": "YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
  "status": "draft",
  "email": "EMAIL@EXAMPLE.COM",
  "status_callback": "http://www.example.com",
  "valid_until": null,
  "date_created": "2019-07-30T22:29:24Z",
  "date_updated": "2019-07-31T01:09:00Z",
  "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
    "customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
    "customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
  },
  "errors": null
}
```

### 2. Connect the Secondary Business Profile to your Primary Business Profile

* You'll need your **Secondary Business Profile's SID**, which was returned in the previous step.
* You'll need your **Business Profile's SID**.
* To retrieve these SIDs via the API, see the [Additional API Calls section](#additional-api-calls) below. You can also find them [in the Console under Trust Hub](https://www.twilio.com/console/trust-hub).

Connect the Secondary Business Profile to your Primary Business Profile

```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 createCustomerProfileEntityAssignment() {
  const customerProfilesEntityAssignment = await client.trusthub.v1
    .customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    .customerProfilesEntityAssignments.create({
      objectSid: "YOUR_PRIMARY_BUSINESS_PROFILE_SID",
    });

  console.log(customerProfilesEntityAssignment.sid);
}

createCustomerProfileEntityAssignment();
```

```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)

customer_profiles_entity_assignment = client.trusthub.v1.customer_profiles(
    "YOUR_SECONDARY_BUSINESS_PROFILE_SID"
).customer_profiles_entity_assignments.create(
    object_sid="YOUR_PRIMARY_BUSINESS_PROFILE_SID"
)

print(customer_profiles_entity_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.CustomerProfiles;
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 customerProfilesEntityAssignments =
            await CustomerProfilesEntityAssignmentsResource.CreateAsync(
                objectSid: "YOUR_PRIMARY_BUSINESS_PROFILE_SID",
                pathCustomerProfileSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID");

        Console.WriteLine(customerProfilesEntityAssignments.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.customerprofiles.CustomerProfilesEntityAssignments;

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);
        CustomerProfilesEntityAssignments customerProfilesEntityAssignments =
            CustomerProfilesEntityAssignments
                .creator("YOUR_SECONDARY_BUSINESS_PROFILE_SID", "YOUR_PRIMARY_BUSINESS_PROFILE_SID")
                .create();

        System.out.println(customerProfilesEntityAssignments.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateCustomerProfileEntityAssignmentParams{}
	params.SetObjectSid("YOUR_PRIMARY_BUSINESS_PROFILE_SID")

	resp, err := client.TrusthubV1.CreateCustomerProfileEntityAssignment("YOUR_SECONDARY_BUSINESS_PROFILE_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$customer_profiles_entity_assignment = $twilio->trusthub->v1
    ->customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    ->customerProfilesEntityAssignments->create(
        "YOUR_PRIMARY_BUSINESS_PROFILE_SID" // ObjectSid
    );

print $customer_profiles_entity_assignment->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profiles_entity_assignment = @client
                                      .trusthub
                                      .v1
                                      .customer_profiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
                                      .customer_profiles_entity_assignments
                                      .create(
                                        object_sid: 'YOUR_PRIMARY_BUSINESS_PROFILE_SID'
                                      )

puts customer_profiles_entity_assignment.sid
```

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

twilio api:trusthub:v1:customer-profiles:entity-assignments:create \
   --customer-profile-sid YOUR_SECONDARY_BUSINESS_PROFILE_SID \
   --object-sid YOUR_PRIMARY_BUSINESS_PROFILE_SID
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/CustomerProfiles/YOUR_SECONDARY_BUSINESS_PROFILE_SID/EntityAssignments" \
--data-urlencode "ObjectSid=YOUR_PRIMARY_BUSINESS_PROFILE_SID" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "customer_profile_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "object_sid": "YOUR_PRIMARY_BUSINESS_PROFILE_SID",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

### 3. Create a Supporting Document

* You will need the **Address SID** for the Secondary Business.

  * If you already created an address for your Secondary Business, you can find it [in the Console under Trust Hub](https://www.twilio.com/console/trust-hub).
  * If you prefer to use an API to create an Address or retrieve Address SIDs, see the [Additional API Calls section](#additional-api-calls) below. For more detailed Address API Info, go to the [REST API: Addresses page](/docs/usage/api/address).
* This will return the SID for the Supporting Document. You will need this for the next step.

  * The **Supporting Document SID** will start with "RD"

***

Create a Supporting Document

```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 createSupportingDocument() {
  const supportingDocument =
    await client.trusthub.v1.supportingDocuments.create({
      attributes: {
        address_sids: "YOUR_CUSTOMER_ADDRESS_SID",
      },
      friendlyName: "YOUR_CUSTOMER_FRIENDLY_NAME",
      type: "customer_profile_address",
    });

  console.log(supportingDocument.sid);
}

createSupportingDocument();
```

```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)

supporting_document = client.trusthub.v1.supporting_documents.create(
    attributes={"address_sids": "YOUR_CUSTOMER_ADDRESS_SID"},
    friendly_name="YOUR_CUSTOMER_FRIENDLY_NAME",
    type="customer_profile_address",
)

print(supporting_document.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
using System.Threading.Tasks;
using System.Collections.Generic;

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 supportingDocument = await SupportingDocumentResource.CreateAsync(
            attributes: new Dictionary<
                string,
                Object>() { { "address_sids", "YOUR_CUSTOMER_ADDRESS_SID" } },
            friendlyName: "YOUR_CUSTOMER_FRIENDLY_NAME",
            type: "customer_profile_address");

        Console.WriteLine(supportingDocument.Sid);
    }
}
```

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

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.SupportingDocument;

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);
        SupportingDocument supportingDocument =
            SupportingDocument.creator("YOUR_CUSTOMER_FRIENDLY_NAME", "customer_profile_address")
                .setAttributes(new HashMap<String, Object>() {
                    {
                        put("address_sids", "YOUR_CUSTOMER_ADDRESS_SID");
                    }
                })
                .create();

        System.out.println(supportingDocument.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateSupportingDocumentParams{}
	params.SetAttributes(map[string]interface{}{
		"address_sids": "YOUR_CUSTOMER_ADDRESS_SID",
	})
	params.SetFriendlyName("YOUR_CUSTOMER_FRIENDLY_NAME")
	params.SetType("customer_profile_address")

	resp, err := client.TrusthubV1.CreateSupportingDocument(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$supporting_document = $twilio->trusthub->v1->supportingDocuments->create(
    "YOUR_CUSTOMER_FRIENDLY_NAME", // FriendlyName
    "customer_profile_address", // Type
    [
        "attributes" => [
            "address_sids" => "YOUR_CUSTOMER_ADDRESS_SID",
        ],
    ]
);

print $supporting_document->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

supporting_document = @client
                      .trusthub
                      .v1
                      .supporting_documents
                      .create(
                        attributes: {
                          'address_sids' => 'YOUR_CUSTOMER_ADDRESS_SID'
                        },
                        friendly_name: 'YOUR_CUSTOMER_FRIENDLY_NAME',
                        type: 'customer_profile_address'
                      )

puts supporting_document.sid
```

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

twilio api:trusthub:v1:supporting-documents:create \
   --attributes "{\"address_sids\":\"YOUR_CUSTOMER_ADDRESS_SID\"}" \
   --friendly-name YOUR_CUSTOMER_FRIENDLY_NAME \
   --type customer_profile_address
```

```bash
ATTRIBUTES_OBJ=$(cat << EOF
{
  "address_sids": "YOUR_CUSTOMER_ADDRESS_SID"
}
EOF
)
curl -X POST "https://trusthub.twilio.com/v1/SupportingDocuments" \
--data-urlencode "Attributes=$ATTRIBUTES_OBJ" \
--data-urlencode "FriendlyName=YOUR_CUSTOMER_FRIENDLY_NAME" \
--data-urlencode "Type=customer_profile_address" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "status": "DRAFT",
  "date_updated": "2021-02-11T17:23:00Z",
  "friendly_name": "YOUR_CUSTOMER_FRIENDLY_NAME",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2021-02-11T17:23:00Z",
  "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attributes": {
    "address_sids": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "type": "customer_profile_address",
  "mime_type": null
}
```

### 4. Connect the Supporting Document to your Secondary Business Profile

* You will need your **Secondary Business Profile SID** used earlier.
* You will need the **Supporting Document SID**, which was returned in the previous step.

  * If you need to retrieve the Supporting Document SID via API, see the [Additional API Calls section](#additional-api-calls) below.

Connect the Supporting Document to your Secondary Business Profile

```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 createCustomerProfileEntityAssignment() {
  const customerProfilesEntityAssignment = await client.trusthub.v1
    .customerProfiles("YOUR_SECONDARY_CUSTOMER_PROFILE_SID")
    .customerProfilesEntityAssignments.create({
      objectSid: "YOUR_SUPPORTING_DOCUMENT_SID",
    });

  console.log(customerProfilesEntityAssignment.sid);
}

createCustomerProfileEntityAssignment();
```

```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)

customer_profiles_entity_assignment = client.trusthub.v1.customer_profiles(
    "YOUR_SECONDARY_CUSTOMER_PROFILE_SID"
).customer_profiles_entity_assignments.create(
    object_sid="YOUR_SUPPORTING_DOCUMENT_SID"
)

print(customer_profiles_entity_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.CustomerProfiles;
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 customerProfilesEntityAssignments =
            await CustomerProfilesEntityAssignmentsResource.CreateAsync(
                objectSid: "YOUR_SUPPORTING_DOCUMENT_SID",
                pathCustomerProfileSid: "YOUR_SECONDARY_CUSTOMER_PROFILE_SID");

        Console.WriteLine(customerProfilesEntityAssignments.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.customerprofiles.CustomerProfilesEntityAssignments;

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);
        CustomerProfilesEntityAssignments customerProfilesEntityAssignments =
            CustomerProfilesEntityAssignments
                .creator("YOUR_SECONDARY_CUSTOMER_PROFILE_SID", "YOUR_SUPPORTING_DOCUMENT_SID")
                .create();

        System.out.println(customerProfilesEntityAssignments.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateCustomerProfileEntityAssignmentParams{}
	params.SetObjectSid("YOUR_SUPPORTING_DOCUMENT_SID")

	resp, err := client.TrusthubV1.CreateCustomerProfileEntityAssignment("YOUR_SECONDARY_CUSTOMER_PROFILE_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$customer_profiles_entity_assignment = $twilio->trusthub->v1
    ->customerProfiles("YOUR_SECONDARY_CUSTOMER_PROFILE_SID")
    ->customerProfilesEntityAssignments->create(
        "YOUR_SUPPORTING_DOCUMENT_SID" // ObjectSid
    );

print $customer_profiles_entity_assignment->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profiles_entity_assignment = @client
                                      .trusthub
                                      .v1
                                      .customer_profiles('YOUR_SECONDARY_CUSTOMER_PROFILE_SID')
                                      .customer_profiles_entity_assignments
                                      .create(
                                        object_sid: 'YOUR_SUPPORTING_DOCUMENT_SID'
                                      )

puts customer_profiles_entity_assignment.sid
```

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

twilio api:trusthub:v1:customer-profiles:entity-assignments:create \
   --customer-profile-sid YOUR_SECONDARY_CUSTOMER_PROFILE_SID \
   --object-sid YOUR_SUPPORTING_DOCUMENT_SID
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/CustomerProfiles/YOUR_SECONDARY_CUSTOMER_PROFILE_SID/EntityAssignments" \
--data-urlencode "ObjectSid=YOUR_SUPPORTING_DOCUMENT_SID" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "customer_profile_sid": "YOUR_SECONDARY_CUSTOMER_PROFILE_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "object_sid": "YOUR_SUPPORTING_DOCUMENT_SID",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

### 5. Create Business Information for the Secondary Business Profile

You will need the following information about your Secondary Business:

| **Parameter**                                           | **Definition/Possible Values**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `business_name`<br /><br /> required                    | **Definition:** Your Secondary Business' legal business name<br /><br /> **Possible Values:** \[any `string`]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `business_identity`<br /><br /> required                | **Definition:** Your Secondary Business' structure.<br /><br /> **Possible Values:**<br /><br /> `direct_customer`<br /><br /> `isv_reseller_or_partner`<br /><br /> `unknown`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `business_type`<br /><br /> required                    | **Definition:** Business type for your Secondary Business<br /><br /> **Possible Values:**<br /><br /> `Sole Proprietorship`<br /><br /> `Partnership`<br /><br /> `Limited Liability Corporation`<br /><br /> `Corporation`<br /><br /> `Co-operative`<br /><br /> `Non-profit`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `business_industry`<br /><br /> required                | **Definition:** Industry of Secondary Business<br /><br /> **Possible Values:**<br /><br /> `AUTOMOTIVE`<br /><br /> `AGRICULTURE`<br /><br /> `BANKING`<br /><br /> `CONSUMER`<br /><br /> `EDUCATION`<br /><br /> `ENGINEERING`<br /><br /> `ENERGY`<br /><br /> `OIL_AND_GAS`<br /><br /> `FAST_MOVING_CONSUMER_GOODS`<br /><br /> `FINANCIAL`<br /><br /> `FINTECH`<br /><br /> `FOOD_AND_BEVERAGE`<br /><br /> `GOVERNMENT`<br /><br /> `HEALTHCARE`<br /><br /> `HOSPITALITY`<br /><br /> `INSURANCE`<br /><br /> `LEGAL`<br /><br /> `MANUFACTURING`<br /><br /> `MEDIA`<br /><br /> `ONLINE`<br /><br /> `RAW_MATERIALS`<br /><br /> `REAL_ESTATE`<br /><br /> `RELIGION`<br /><br /> `RETAIL`<br /><br /> `JEWELRY`<br /><br /> `TECHNOLOGY`<br /><br /> `TELECOMMUNICATIONS`<br /><br /> `TRANSPORTATION`<br /><br /> `TRAVEL`<br /><br /> `ELECTRONICS`<br /><br /> `NOT_FOR_PROFIT` |
| `business_registration_identifier`<br /><br /> required | **Definition:** The official method used to register the Secondary Business' identity.<br /><br /> **Possible Values:**<br /><br /> `USA: DUNS Number (Dun & Bradstreet)`<br /><br /> `USA: Employer Identification Number (EIN)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `business_registration_number`<br /><br /> required     | **Definition**: The number used to identify your Secondary Business of the type chosen for your `business_registration_identifier`<br /><br /> **Possible Values:** `[numerical string for USA types]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `business_regions_of_operation`<br /><br /> required    | **Definition:** Regions your Secondary Business<br /><br /> `AFRICA`<br /><br /> `ASIA`<br /><br /> `EUROPE`<br /><br /> `LATIN_AMERICA`<br /><br /> `USA_AND_CANADA`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `website_url`<br /><br /> required                      | **Definition:** The URL for the Secondary Business' website<br /><br /> **Possible Values:** `[any valid URL string]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `social_media_profile_urls`<br /><br /> optional        | **Definition:** The URL(s) for the Secondary Business' social media accounts (i.e. LinkedIn, Facebook, Twitter)<br /><br /> **Possible Values:** `[any valid URL string]`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

> \[!CAUTION]
>
> Updates are coming to Twilio's Starter Brand registration based on changes from [The Campaign Registry (TCR)](https://www.campaignregistry.com/) and mobile carriers. We will provide updates on how this change may impact US A2P 10DLC registration as soon as they are available. Brands with EINs will no longer be able to use Twilio's Starter Brand registration going forward.
>
> In the meantime, if you are registering on behalf of an organization with an EIN/Tax ID, [please complete a Standard registration](/docs/messaging/compliance/a2p-10dlc/onboarding-isv).

* Do not change the `Type` value. It must be `customer_profile_business_information` in order to create the correct resource.
* You'll need the **Business Information SID** returned from this API call for the next step.

Create Business Information for Secondary Business Profile

```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 createEndUser() {
  const endUser = await client.trusthub.v1.endUsers.create({
    attributes: {
      business_name: "YOUR_SECONDARY_BUSINESS_NAME",
      business_identity: "YOUR_SECONDARY_BUSINESS_IDENTITY",
      business_type: "YOUR_SECONDARY_BUSINESS_TYPE",
      business_industry: "YOUR_SECONDARY_BUSINESS_INDUSTRY",
      business_registration_identifier: "YOUR_SECONDARY_BUSINESS_IDENTIFIER",
      business_registration_number:
        "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER",
      business_regions_of_operation:
        "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION",
      website_url: "YOUR_SECONDARY_BUSINESS_URL",
      social_media_profile_urls: "",
    },
    friendlyName: "YOUR_CUSTOMER_FRIENDLY_NAME",
    type: "customer_profile_business_information",
  });

  console.log(endUser.sid);
}

createEndUser();
```

```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)

end_user = client.trusthub.v1.end_users.create(
    type="customer_profile_business_information",
    friendly_name="YOUR_CUSTOMER_FRIENDLY_NAME",
    attributes={
        "business_name": "YOUR_SECONDARY_BUSINESS_NAME",
        "business_identity": "YOUR_SECONDARY_BUSINESS_IDENTITY",
        "business_type": "YOUR_SECONDARY_BUSINESS_TYPE",
        "business_industry": "YOUR_SECONDARY_BUSINESS_INDUSTRY",
        "business_registration_identifier": "YOUR_SECONDARY_BUSINESS_IDENTIFIER",
        "business_registration_number": "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER",
        "business_regions_of_operation": "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION",
        "website_url": "YOUR_SECONDARY_BUSINESS_URL",
        "social_media_profile_urls": "",
    },
)

print(end_user.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
using System.Threading.Tasks;
using System.Collections.Generic;

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 endUser = await EndUserResource.CreateAsync(
            type: "customer_profile_business_information",
            friendlyName: "YOUR_CUSTOMER_FRIENDLY_NAME",
            attributes: new Dictionary<string, Object>() {
                { "business_name", "YOUR_SECONDARY_BUSINESS_NAME" },
                { "business_identity", "YOUR_SECONDARY_BUSINESS_IDENTITY" },
                { "business_type", "YOUR_SECONDARY_BUSINESS_TYPE" },
                { "business_industry", "YOUR_SECONDARY_BUSINESS_INDUSTRY" },
                { "business_registration_identifier", "YOUR_SECONDARY_BUSINESS_IDENTIFIER" },
                { "business_registration_number", "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER" },
                { "business_regions_of_operation", "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION" },
                { "website_url", "YOUR_SECONDARY_BUSINESS_URL" },
                { "social_media_profile_urls", "" }
            });

        Console.WriteLine(endUser.Sid);
    }
}
```

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

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.EndUser;

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);
        EndUser endUser =
            EndUser.creator("YOUR_CUSTOMER_FRIENDLY_NAME", "customer_profile_business_information")
                .setAttributes(new HashMap<String, Object>() {
                    {
                        put("business_name", "YOUR_SECONDARY_BUSINESS_NAME");
                        put("business_identity", "YOUR_SECONDARY_BUSINESS_IDENTITY");
                        put("business_type", "YOUR_SECONDARY_BUSINESS_TYPE");
                        put("business_industry", "YOUR_SECONDARY_BUSINESS_INDUSTRY");
                        put("business_registration_identifier", "YOUR_SECONDARY_BUSINESS_IDENTIFIER");
                        put("business_registration_number", "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER");
                        put("business_regions_of_operation", "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION");
                        put("website_url", "YOUR_SECONDARY_BUSINESS_URL");
                        put("social_media_profile_urls", "");
                    }
                })
                .create();

        System.out.println(endUser.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateEndUserParams{}
	params.SetType("customer_profile_business_information")
	params.SetFriendlyName("YOUR_CUSTOMER_FRIENDLY_NAME")
	params.SetAttributes(map[string]interface{}{
		"business_name":                    "YOUR_SECONDARY_BUSINESS_NAME",
		"business_identity":                "YOUR_SECONDARY_BUSINESS_IDENTITY",
		"business_type":                    "YOUR_SECONDARY_BUSINESS_TYPE",
		"business_industry":                "YOUR_SECONDARY_BUSINESS_INDUSTRY",
		"business_registration_identifier": "YOUR_SECONDARY_BUSINESS_IDENTIFIER",
		"business_registration_number":     "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER",
		"business_regions_of_operation":    "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION",
		"website_url":                      "YOUR_SECONDARY_BUSINESS_URL",
		"social_media_profile_urls":        "",
	})

	resp, err := client.TrusthubV1.CreateEndUser(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$end_user = $twilio->trusthub->v1->endUsers->create(
    "YOUR_CUSTOMER_FRIENDLY_NAME", // FriendlyName
    "customer_profile_business_information", // Type
    [
        "attributes" => [
            "business_name" => "YOUR_SECONDARY_BUSINESS_NAME",
            "business_identity" => "YOUR_SECONDARY_BUSINESS_IDENTITY",
            "business_type" => "YOUR_SECONDARY_BUSINESS_TYPE",
            "business_industry" => "YOUR_SECONDARY_BUSINESS_INDUSTRY",
            "business_registration_identifier" =>
                "YOUR_SECONDARY_BUSINESS_IDENTIFIER",
            "business_registration_number" =>
                "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER",
            "business_regions_of_operation" =>
                "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION",
            "website_url" => "YOUR_SECONDARY_BUSINESS_URL",
            "social_media_profile_urls" => "",
        ],
    ]
);

print $end_user->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

end_user = @client
           .trusthub
           .v1
           .end_users
           .create(
             type: 'customer_profile_business_information',
             friendly_name: 'YOUR_CUSTOMER_FRIENDLY_NAME',
             attributes: {
               'business_name' => 'YOUR_SECONDARY_BUSINESS_NAME',
               'business_identity' => 'YOUR_SECONDARY_BUSINESS_IDENTITY',
               'business_type' => 'YOUR_SECONDARY_BUSINESS_TYPE',
               'business_industry' => 'YOUR_SECONDARY_BUSINESS_INDUSTRY',
               'business_registration_identifier' => 'YOUR_SECONDARY_BUSINESS_IDENTIFIER',
               'business_registration_number' => 'YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER',
               'business_regions_of_operation' => 'YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION',
               'website_url' => 'YOUR_SECONDARY_BUSINESS_URL',
               'social_media_profile_urls' => ''
             }
           )

puts end_user.sid
```

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

twilio api:trusthub:v1:end-users:create \
   --type customer_profile_business_information \
   --friendly-name YOUR_CUSTOMER_FRIENDLY_NAME \
   --attributes "{\"business_name\":\"YOUR_SECONDARY_BUSINESS_NAME\",\"business_identity\":\"YOUR_SECONDARY_BUSINESS_IDENTITY\",\"business_type\":\"YOUR_SECONDARY_BUSINESS_TYPE\",\"business_industry\":\"YOUR_SECONDARY_BUSINESS_INDUSTRY\",\"business_registration_identifier\":\"YOUR_SECONDARY_BUSINESS_IDENTIFIER\",\"business_registration_number\":\"YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER\",\"business_regions_of_operation\":\"YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION\",\"website_url\":\"YOUR_SECONDARY_BUSINESS_URL\",\"social_media_profile_urls\":\"\"}"
```

```bash
ATTRIBUTES_OBJ=$(cat << EOF
{
  "business_name": "YOUR_SECONDARY_BUSINESS_NAME",
  "business_identity": "YOUR_SECONDARY_BUSINESS_IDENTITY",
  "business_type": "YOUR_SECONDARY_BUSINESS_TYPE",
  "business_industry": "YOUR_SECONDARY_BUSINESS_INDUSTRY",
  "business_registration_identifier": "YOUR_SECONDARY_BUSINESS_IDENTIFIER",
  "business_registration_number": "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER",
  "business_regions_of_operation": "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION",
  "website_url": "YOUR_SECONDARY_BUSINESS_URL",
  "social_media_profile_urls": ""
}
EOF
)
curl -X POST "https://trusthub.twilio.com/v1/EndUsers" \
--data-urlencode "Type=customer_profile_business_information" \
--data-urlencode "FriendlyName=YOUR_CUSTOMER_FRIENDLY_NAME" \
--data-urlencode "Attributes=$ATTRIBUTES_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "date_updated": "2021-02-16T20:40:57Z",
  "sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "YOUR_CUSTOMER_FRIENDLY_NAME",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2021-02-16T20:40:57Z",
  "attributes": {
    "phone_number": "+11234567890",
    "job_position": "CEO",
    "first_name": "rep1",
    "last_name": "test",
    "business_title": "ceo",
    "email": "foobar@test.com"
  },
  "type": "customer_profile_business_information"
}
```

### 6. Connect Business Information to Secondary Business Profile

* You will need the **Customer Profile Business Information SID**, which was returned in the last step.
* The **Customer Profile Business Information SID** will start with "IT".
* To find your Customer Profile Business Information SID via API, see the **Read all End Users** call in the [Additional API Calls section](#additional-api-calls).

Connect Business Information to Secondary Business Profile

```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 createCustomerProfileEntityAssignment() {
  const customerProfilesEntityAssignment = await client.trusthub.v1
    .customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    .customerProfilesEntityAssignments.create({
      objectSid: "YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID",
    });

  console.log(customerProfilesEntityAssignment.sid);
}

createCustomerProfileEntityAssignment();
```

```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)

customer_profiles_entity_assignment = client.trusthub.v1.customer_profiles(
    "YOUR_SECONDARY_BUSINESS_PROFILE_SID"
).customer_profiles_entity_assignments.create(
    object_sid="YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID"
)

print(customer_profiles_entity_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.CustomerProfiles;
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 customerProfilesEntityAssignments =
            await CustomerProfilesEntityAssignmentsResource.CreateAsync(
                objectSid: "YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID",
                pathCustomerProfileSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID");

        Console.WriteLine(customerProfilesEntityAssignments.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.customerprofiles.CustomerProfilesEntityAssignments;

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);
        CustomerProfilesEntityAssignments customerProfilesEntityAssignments =
            CustomerProfilesEntityAssignments
                .creator("YOUR_SECONDARY_BUSINESS_PROFILE_SID", "YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID")
                .create();

        System.out.println(customerProfilesEntityAssignments.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateCustomerProfileEntityAssignmentParams{}
	params.SetObjectSid("YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID")

	resp, err := client.TrusthubV1.CreateCustomerProfileEntityAssignment("YOUR_SECONDARY_BUSINESS_PROFILE_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$customer_profiles_entity_assignment = $twilio->trusthub->v1
    ->customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    ->customerProfilesEntityAssignments->create(
        "YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID" // ObjectSid
    );

print $customer_profiles_entity_assignment->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profiles_entity_assignment = @client
                                      .trusthub
                                      .v1
                                      .customer_profiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
                                      .customer_profiles_entity_assignments
                                      .create(
                                        object_sid: 'YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID'
                                      )

puts customer_profiles_entity_assignment.sid
```

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

twilio api:trusthub:v1:customer-profiles:entity-assignments:create \
   --customer-profile-sid YOUR_SECONDARY_BUSINESS_PROFILE_SID \
   --object-sid YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/CustomerProfiles/YOUR_SECONDARY_BUSINESS_PROFILE_SID/EntityAssignments" \
--data-urlencode "ObjectSid=YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "customer_profile_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "object_sid": "YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

### 7. Create an Authorized Representative for your Secondary Business Profile

* You must add one Authorized Representative as a contact for the Secondary Business.
* A second Authorized Representative is **optional**.

  * To add a second representative repeat this step with the second Authorized Representative's information, but you will need to **change the `Type` parameter to** `authorized_representative_2`
* Information you will need:

  * First Name
  * Last Name
  * Email
  * Phone Number
  * Business Title
  * Job Position

    * **Possible Values**: `Director`, `GM`, `VP`, `CEO`, `CFO`, `General Counsel`
* This call will return the **Authorized Representative's SID**. You will need this for the next step.

Create an Authorized Representative

```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 createEndUser() {
  const endUser = await client.trusthub.v1.endUsers.create({
    attributes: {
      first_name: "REPRESENTATIVE_FIRST_NAME",
      last_name: "REPRESENTATIVE_LAST_NAME",
      email: "EMAIL@EXAMPLE.COM",
      phone_number: "+1XXXXXXXXXX",
      business_title: "BUSINESS_TITLE",
      job_position: "JOB_POSITION",
    },
    friendlyName: "YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME",
    type: "authorized_representative_1",
  });

  console.log(endUser.sid);
}

createEndUser();
```

```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)

end_user = client.trusthub.v1.end_users.create(
    friendly_name="YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME",
    type="authorized_representative_1",
    attributes={
        "first_name": "REPRESENTATIVE_FIRST_NAME",
        "last_name": "REPRESENTATIVE_LAST_NAME",
        "email": "EMAIL@EXAMPLE.COM",
        "phone_number": "+1XXXXXXXXXX",
        "business_title": "BUSINESS_TITLE",
        "job_position": "JOB_POSITION",
    },
)

print(end_user.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
using System.Threading.Tasks;
using System.Collections.Generic;

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 endUser = await EndUserResource.CreateAsync(
            friendlyName: "YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME",
            type: "authorized_representative_1",
            attributes: new Dictionary<string, Object>() {
                { "first_name", "REPRESENTATIVE_FIRST_NAME" },
                { "last_name", "REPRESENTATIVE_LAST_NAME" },
                { "email", "EMAIL@EXAMPLE.COM" },
                { "phone_number", "+1XXXXXXXXXX" },
                { "business_title", "BUSINESS_TITLE" },
                { "job_position", "JOB_POSITION" }
            });

        Console.WriteLine(endUser.Sid);
    }
}
```

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

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.EndUser;

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);
        EndUser endUser = EndUser.creator("YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME", "authorized_representative_1")
                              .setAttributes(new HashMap<String, Object>() {
                                  {
                                      put("first_name", "REPRESENTATIVE_FIRST_NAME");
                                      put("last_name", "REPRESENTATIVE_LAST_NAME");
                                      put("email", "EMAIL@EXAMPLE.COM");
                                      put("phone_number", "+1XXXXXXXXXX");
                                      put("business_title", "BUSINESS_TITLE");
                                      put("job_position", "JOB_POSITION");
                                  }
                              })
                              .create();

        System.out.println(endUser.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateEndUserParams{}
	params.SetFriendlyName("YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME")
	params.SetType("authorized_representative_1")
	params.SetAttributes(map[string]interface{}{
		"first_name":     "REPRESENTATIVE_FIRST_NAME",
		"last_name":      "REPRESENTATIVE_LAST_NAME",
		"email":          "EMAIL@EXAMPLE.COM",
		"phone_number":   "+1XXXXXXXXXX",
		"business_title": "BUSINESS_TITLE",
		"job_position":   "JOB_POSITION",
	})

	resp, err := client.TrusthubV1.CreateEndUser(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$end_user = $twilio->trusthub->v1->endUsers->create(
    "YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME", // FriendlyName
    "authorized_representative_1", // Type
    [
        "attributes" => [
            "first_name" => "REPRESENTATIVE_FIRST_NAME",
            "last_name" => "REPRESENTATIVE_LAST_NAME",
            "email" => "EMAIL@EXAMPLE.COM",
            "phone_number" => "+1XXXXXXXXXX",
            "business_title" => "BUSINESS_TITLE",
            "job_position" => "JOB_POSITION",
        ],
    ]
);

print $end_user->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

end_user = @client
           .trusthub
           .v1
           .end_users
           .create(
             friendly_name: 'YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME',
             type: 'authorized_representative_1',
             attributes: {
               'first_name' => 'REPRESENTATIVE_FIRST_NAME',
               'last_name' => 'REPRESENTATIVE_LAST_NAME',
               'email' => 'EMAIL@EXAMPLE.COM',
               'phone_number' => '+1XXXXXXXXXX',
               'business_title' => 'BUSINESS_TITLE',
               'job_position' => 'JOB_POSITION'
             }
           )

puts end_user.sid
```

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

twilio api:trusthub:v1:end-users:create \
   --friendly-name YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME \
   --type authorized_representative_1 \
   --attributes "{\"first_name\":\"REPRESENTATIVE_FIRST_NAME\",\"last_name\":\"REPRESENTATIVE_LAST_NAME\",\"email\":\"EMAIL@EXAMPLE.COM\",\"phone_number\":\"+1XXXXXXXXXX\",\"business_title\":\"BUSINESS_TITLE\",\"job_position\":\"JOB_POSITION\"}"
```

```bash
ATTRIBUTES_OBJ=$(cat << EOF
{
  "first_name": "REPRESENTATIVE_FIRST_NAME",
  "last_name": "REPRESENTATIVE_LAST_NAME",
  "email": "EMAIL@EXAMPLE.COM",
  "phone_number": "+1XXXXXXXXXX",
  "business_title": "BUSINESS_TITLE",
  "job_position": "JOB_POSITION"
}
EOF
)
curl -X POST "https://trusthub.twilio.com/v1/EndUsers" \
--data-urlencode "FriendlyName=YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME" \
--data-urlencode "Type=authorized_representative_1" \
--data-urlencode "Attributes=$ATTRIBUTES_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "date_updated": "2021-02-16T20:40:57Z",
  "sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2021-02-16T20:40:57Z",
  "attributes": {
    "phone_number": "+11234567890",
    "job_position": "CEO",
    "first_name": "rep1",
    "last_name": "test",
    "business_title": "ceo",
    "email": "foobar@test.com"
  },
  "type": "authorized_representative_1"
}
```

### 8. Connect Authorized Representative to Secondary Business Profile

* You will need the **Authorized Representative's SID**, which was returned in the last API call.
* To find the SID via API, see the **Read all End Users** call in the [Additional API Calls section](#additional-api-calls) below.
* If you added a second Authorized Representative, you will need to repeat this call with that Representative's SID.

Connect Authorized Representative to Secondary Business Profile

```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 createCustomerProfileEntityAssignment() {
  const customerProfilesEntityAssignment = await client.trusthub.v1
    .customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    .customerProfilesEntityAssignments.create({
      objectSid: "YOUR_AUTHORIZED_REPRESENTATIVE_SID",
    });

  console.log(customerProfilesEntityAssignment.sid);
}

createCustomerProfileEntityAssignment();
```

```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)

customer_profiles_entity_assignment = client.trusthub.v1.customer_profiles(
    "YOUR_SECONDARY_BUSINESS_PROFILE_SID"
).customer_profiles_entity_assignments.create(
    object_sid="YOUR_AUTHORIZED_REPRESENTATIVE_SID"
)

print(customer_profiles_entity_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.CustomerProfiles;
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 customerProfilesEntityAssignments =
            await CustomerProfilesEntityAssignmentsResource.CreateAsync(
                objectSid: "YOUR_AUTHORIZED_REPRESENTATIVE_SID",
                pathCustomerProfileSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID");

        Console.WriteLine(customerProfilesEntityAssignments.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.customerprofiles.CustomerProfilesEntityAssignments;

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);
        CustomerProfilesEntityAssignments customerProfilesEntityAssignments =
            CustomerProfilesEntityAssignments
                .creator("YOUR_SECONDARY_BUSINESS_PROFILE_SID", "YOUR_AUTHORIZED_REPRESENTATIVE_SID")
                .create();

        System.out.println(customerProfilesEntityAssignments.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateCustomerProfileEntityAssignmentParams{}
	params.SetObjectSid("YOUR_AUTHORIZED_REPRESENTATIVE_SID")

	resp, err := client.TrusthubV1.CreateCustomerProfileEntityAssignment("YOUR_SECONDARY_BUSINESS_PROFILE_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$customer_profiles_entity_assignment = $twilio->trusthub->v1
    ->customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    ->customerProfilesEntityAssignments->create(
        "YOUR_AUTHORIZED_REPRESENTATIVE_SID" // ObjectSid
    );

print $customer_profiles_entity_assignment->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profiles_entity_assignment = @client
                                      .trusthub
                                      .v1
                                      .customer_profiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
                                      .customer_profiles_entity_assignments
                                      .create(
                                        object_sid: 'YOUR_AUTHORIZED_REPRESENTATIVE_SID'
                                      )

puts customer_profiles_entity_assignment.sid
```

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

twilio api:trusthub:v1:customer-profiles:entity-assignments:create \
   --customer-profile-sid YOUR_SECONDARY_BUSINESS_PROFILE_SID \
   --object-sid YOUR_AUTHORIZED_REPRESENTATIVE_SID
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/CustomerProfiles/YOUR_SECONDARY_BUSINESS_PROFILE_SID/EntityAssignments" \
--data-urlencode "ObjectSid=YOUR_AUTHORIZED_REPRESENTATIVE_SID" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "customer_profile_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "object_sid": "YOUR_AUTHORIZED_REPRESENTATIVE_SID",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

### 9. Add Phone Number(s) to Secondary Business Profile

* You will need your **Secondary Business Profile SID**.
* You'll also need your **Phone Number SID(s)**

  * To find your Phone Number SIDs in the Console, go to your **Dashboard**. In the **Project Info** section, click on **See all phone numbers**, then **click on a phone number** to find the SID.
  * To find your Phone Number SIDs via API, see the [Additional API Calls section](#additional-api-calls) below.
  * Phone Number SIDs begin with "**PN**".
  * In the API Call below, don't change the `ChannelEndpointType`. It needs to be `phone-number` to add a phone number to your Business Profile.

***

Add Phone Number to Secondary Business Profile

```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 createCustomerProfileChannelEndpointAssignment() {
  const customerProfilesChannelEndpointAssignment = await client.trusthub.v1
    .customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    .customerProfilesChannelEndpointAssignment.create({
      channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
      channelEndpointType: "phone-number",
    });

  console.log(customerProfilesChannelEndpointAssignment.sid);
}

createCustomerProfileChannelEndpointAssignment();
```

```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)

customer_profiles_channel_endpoint_assignment = (
    client.trusthub.v1.customer_profiles(
        "YOUR_SECONDARY_BUSINESS_PROFILE_SID"
    ).customer_profiles_channel_endpoint_assignment.create(
        channel_endpoint_type="phone-number",
        channel_endpoint_sid="YOUR_PHONE_NUMBER_SID",
    )
)

print(customer_profiles_channel_endpoint_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.CustomerProfiles;
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 customerProfilesChannelEndpointAssignment =
            await CustomerProfilesChannelEndpointAssignmentResource.CreateAsync(
                channelEndpointType: "phone-number",
                channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
                pathCustomerProfileSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID");

        Console.WriteLine(customerProfilesChannelEndpointAssignment.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.customerprofiles.CustomerProfilesChannelEndpointAssignment;

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);
        CustomerProfilesChannelEndpointAssignment customerProfilesChannelEndpointAssignment =
            CustomerProfilesChannelEndpointAssignment
                .creator("YOUR_SECONDARY_BUSINESS_PROFILE_SID", "phone-number", "YOUR_PHONE_NUMBER_SID")
                .create();

        System.out.println(customerProfilesChannelEndpointAssignment.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateCustomerProfileChannelEndpointAssignmentParams{}
	params.SetChannelEndpointType("phone-number")
	params.SetChannelEndpointSid("YOUR_PHONE_NUMBER_SID")

	resp, err := client.TrusthubV1.CreateCustomerProfileChannelEndpointAssignment("YOUR_SECONDARY_BUSINESS_PROFILE_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$customer_profiles_channel_endpoint_assignment = $twilio->trusthub->v1
    ->customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    ->customerProfilesChannelEndpointAssignment->create(
        "phone-number", // ChannelEndpointType
        "YOUR_PHONE_NUMBER_SID" // ChannelEndpointSid
    );

print $customer_profiles_channel_endpoint_assignment->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profiles_channel_endpoint_assignment = @client
                                                .trusthub
                                                .v1
                                                .customer_profiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
                                                .customer_profiles_channel_endpoint_assignment
                                                .create(
                                                  channel_endpoint_type: 'phone-number',
                                                  channel_endpoint_sid: 'YOUR_PHONE_NUMBER_SID'
                                                )

puts customer_profiles_channel_endpoint_assignment.sid
```

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

twilio api:trusthub:v1:customer-profiles:channel-endpoint-assignments:create \
   --customer-profile-sid YOUR_SECONDARY_BUSINESS_PROFILE_SID \
   --channel-endpoint-type phone-number \
   --channel-endpoint-sid YOUR_PHONE_NUMBER_SID
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/CustomerProfiles/YOUR_SECONDARY_BUSINESS_PROFILE_SID/ChannelEndpointAssignments" \
--data-urlencode "ChannelEndpointType=phone-number" \
--data-urlencode "ChannelEndpointSid=YOUR_PHONE_NUMBER_SID" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "customer_profile_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "channel_endpoint_sid": "YOUR_PHONE_NUMBER_SID",
  "channel_endpoint_type": "phone-number",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

### 10. Submit Secondary Business Profile

* You will need your **Secondary Business Profile SID**.
* Do not change the value of the `Status` parameter. `pending-review` is needed to properly submit your Secondary Business Profile

Submit Secondary Business Profile

```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 updateCustomerProfile() {
  const customerProfile = await client.trusthub.v1
    .customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    .update({ status: "pending-review" });

  console.log(customerProfile.sid);
}

updateCustomerProfile();
```

```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)

customer_profile = client.trusthub.v1.customer_profiles(
    "YOUR_SECONDARY_BUSINESS_PROFILE_SID"
).update(status="pending-review")

print(customer_profile.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
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 customerProfiles = await CustomerProfilesResource.UpdateAsync(
            status: CustomerProfilesResource.StatusEnum.PendingReview,
            pathSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID");

        Console.WriteLine(customerProfiles.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.CustomerProfiles;

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);
        CustomerProfiles customerProfiles = CustomerProfiles.updater("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
                                                .setStatus(CustomerProfiles.Status.PENDING_REVIEW)
                                                .update();

        System.out.println(customerProfiles.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.UpdateCustomerProfileParams{}
	params.SetStatus("pending-review")

	resp, err := client.TrusthubV1.UpdateCustomerProfile("YOUR_SECONDARY_BUSINESS_PROFILE_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$customer_profile = $twilio->trusthub->v1
    ->customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    ->update(["status" => "pending-review"]);

print $customer_profile->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profile = @client
                   .trusthub
                   .v1
                   .customer_profiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
                   .update(status: 'pending-review')

puts customer_profile.sid
```

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

twilio api:trusthub:v1:customer-profiles:update \
   --sid YOUR_SECONDARY_BUSINESS_PROFILE_SID \
   --status pending-review
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/CustomerProfiles/YOUR_SECONDARY_BUSINESS_PROFILE_SID" \
--data-urlencode "Status=pending-review" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "friendly_name",
  "status": "pending-review",
  "email": "email",
  "status_callback": "http://www.example.com",
  "valid_until": null,
  "date_created": "2019-07-30T22:29:24Z",
  "date_updated": "2019-07-31T01:09:00Z",
  "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
    "customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
    "customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
  },
  "errors": null
}
```

## Create Trust Product, Add Phone Numbers, and Submit for Vetting

### 1. Create a SHAKEN/STIR Trust Product

* **Note:** Do not change the **policy\_sid** from the example below. This is a static value that will stay the same across all accounts.
* The response will contain the **SID** for your Trust Product. You'll need this for the next step.

Create SHAKEN/STIR Trust Product

```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 createTrustProduct() {
  const trustProduct = await client.trusthub.v1.trustProducts.create({
    email: "EMAIL@EXAMPLE.COM",
    friendlyName: "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
    policySid: "RN7a97559effdf62d00f4298208492a5ea",
  });

  console.log(trustProduct.sid);
}

createTrustProduct();
```

```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)

trust_product = client.trusthub.v1.trust_products.create(
    friendly_name="FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
    email="EMAIL@EXAMPLE.COM",
    policy_sid="RN7a97559effdf62d00f4298208492a5ea",
)

print(trust_product.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
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 trustProducts = await TrustProductsResource.CreateAsync(
            friendlyName: "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
            email: "EMAIL@EXAMPLE.COM",
            policySid: "RN7a97559effdf62d00f4298208492a5ea");

        Console.WriteLine(trustProducts.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.TrustProducts;

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);
        TrustProducts trustProducts =
            TrustProducts
                .creator(
                    "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT", "EMAIL@EXAMPLE.COM", "RN7a97559effdf62d00f4298208492a5ea")
                .create();

        System.out.println(trustProducts.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateTrustProductParams{}
	params.SetFriendlyName("FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT")
	params.SetEmail("EMAIL@EXAMPLE.COM")
	params.SetPolicySid("RN7a97559effdf62d00f4298208492a5ea")

	resp, err := client.TrusthubV1.CreateTrustProduct(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$trust_product = $twilio->trusthub->v1->trustProducts->create(
    "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT", // FriendlyName
    "EMAIL@EXAMPLE.COM", // Email
    "RN7a97559effdf62d00f4298208492a5ea" // PolicySid
);

print $trust_product->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

trust_product = @client
                .trusthub
                .v1
                .trust_products
                .create(
                  friendly_name: 'FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT',
                  email: 'EMAIL@EXAMPLE.COM',
                  policy_sid: 'RN7a97559effdf62d00f4298208492a5ea'
                )

puts trust_product.sid
```

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

twilio api:trusthub:v1:trust-products:create \
   --friendly-name FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT \
   --email EMAIL@EXAMPLE.COM \
   --policy-sid RN7a97559effdf62d00f4298208492a5ea
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/TrustProducts" \
--data-urlencode "FriendlyName=FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT" \
--data-urlencode "Email=EMAIL@EXAMPLE.COM" \
--data-urlencode "PolicySid=RN7a97559effdf62d00f4298208492a5ea" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "policy_sid": "RN7a97559effdf62d00f4298208492a5ea",
  "friendly_name": "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
  "status": "draft",
  "email": "EMAIL@EXAMPLE.COM",
  "status_callback": "http://www.example.com",
  "valid_until": null,
  "date_created": "2019-07-30T22:29:24Z",
  "date_updated": "2019-07-31T01:09:00Z",
  "url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
    "trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
    "trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
  },
  "errors": null
}
```

### 2. Connect your SHAKEN/STIR Trust Product to your Secondary Business Profile

* You'll need your **Trust Product's SID**. This was returned by the previous API call.
* You'll need your **Secondary Business Profile's SID**.
* To retrieve these SIDs via the API, see the [Additional API Calls section](#additional-api-calls) below. You can also find them in the Console under Trust Hub.

Connect your SHAKEN/STIR Trust Product to your Secondary Business Profile

```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 createTrustProductEntityAssignment() {
  const trustProductsEntityAssignment = await client.trusthub.v1
    .trustProducts("YOUR_TRUST_PRODUCT_SID")
    .trustProductsEntityAssignments.create({
      objectSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
    });

  console.log(trustProductsEntityAssignment.sid);
}

createTrustProductEntityAssignment();
```

```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)

trust_products_entity_assignment = client.trusthub.v1.trust_products(
    "YOUR_TRUST_PRODUCT_SID"
).trust_products_entity_assignments.create(
    object_sid="YOUR_SECONDARY_BUSINESS_PROFILE_SID"
)

print(trust_products_entity_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.TrustProducts;
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 trustProductsEntityAssignments =
            await TrustProductsEntityAssignmentsResource.CreateAsync(
                objectSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
                pathTrustProductSid: "YOUR_TRUST_PRODUCT_SID");

        Console.WriteLine(trustProductsEntityAssignments.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.trustproducts.TrustProductsEntityAssignments;

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);
        TrustProductsEntityAssignments trustProductsEntityAssignments =
            TrustProductsEntityAssignments.creator("YOUR_TRUST_PRODUCT_SID", "YOUR_SECONDARY_BUSINESS_PROFILE_SID")
                .create();

        System.out.println(trustProductsEntityAssignments.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateTrustProductEntityAssignmentParams{}
	params.SetObjectSid("YOUR_SECONDARY_BUSINESS_PROFILE_SID")

	resp, err := client.TrusthubV1.CreateTrustProductEntityAssignment("YOUR_TRUST_PRODUCT_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$trust_products_entity_assignment = $twilio->trusthub->v1
    ->trustProducts("YOUR_TRUST_PRODUCT_SID")
    ->trustProductsEntityAssignments->create(
        "YOUR_SECONDARY_BUSINESS_PROFILE_SID" // ObjectSid
    );

print $trust_products_entity_assignment->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

trust_products_entity_assignment = @client
                                   .trusthub
                                   .v1
                                   .trust_products('YOUR_TRUST_PRODUCT_SID')
                                   .trust_products_entity_assignments
                                   .create(
                                     object_sid: 'YOUR_SECONDARY_BUSINESS_PROFILE_SID'
                                   )

puts trust_products_entity_assignment.sid
```

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

twilio api:trusthub:v1:trust-products:entity-assignments:create \
   --trust-product-sid YOUR_TRUST_PRODUCT_SID \
   --object-sid YOUR_SECONDARY_BUSINESS_PROFILE_SID
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/TrustProducts/YOUR_TRUST_PRODUCT_SID/EntityAssignments" \
--data-urlencode "ObjectSid=YOUR_SECONDARY_BUSINESS_PROFILE_SID" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "trust_product_sid": "YOUR_TRUST_PRODUCT_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "object_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

### 3. Assign phone numbers to your SHAKEN/STIR Trust Product

* You'll need the **Phone Number SID(s)** you assigned to your Business Profile earlier. (**Note:** Only those phone numbers already assigned to your **Secondary Business Profile** are eligible)
* You'll need your **Trust Product SID** that was used earlier.
* Don't change the `ChannelEndpointType`
* You can complete this step before or after submitting your SHAKEN/STIR Trust Product for vetting
* To check your Secondary Business Profile's phone numbers via API, see the [Additional API Calls section](#additional-api-calls) below.

Assign Phone Numbers to SHAKEN/STIR Trust Product

```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 createTrustProductChannelEndpointAssignment() {
  const trustProductsChannelEndpointAssignment = await client.trusthub.v1
    .trustProducts("YOUR_TRUST_PRODUCT_SID")
    .trustProductsChannelEndpointAssignment.create({
      channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
      channelEndpointType: "phone-number",
    });

  console.log(trustProductsChannelEndpointAssignment.sid);
}

createTrustProductChannelEndpointAssignment();
```

```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)

trust_products_channel_endpoint_assignment = client.trusthub.v1.trust_products(
    "YOUR_TRUST_PRODUCT_SID"
).trust_products_channel_endpoint_assignment.create(
    channel_endpoint_sid="YOUR_PHONE_NUMBER_SID",
    channel_endpoint_type="phone-number",
)

print(trust_products_channel_endpoint_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.TrustProducts;
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 trustProductsChannelEndpointAssignment =
            await TrustProductsChannelEndpointAssignmentResource.CreateAsync(
                channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
                channelEndpointType: "phone-number",
                pathTrustProductSid: "YOUR_TRUST_PRODUCT_SID");

        Console.WriteLine(trustProductsChannelEndpointAssignment.Sid);
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.trustproducts.TrustProductsChannelEndpointAssignment;

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);
        TrustProductsChannelEndpointAssignment trustProductsChannelEndpointAssignment =
            TrustProductsChannelEndpointAssignment
                .creator("YOUR_TRUST_PRODUCT_SID", "phone-number", "YOUR_PHONE_NUMBER_SID")
                .create();

        System.out.println(trustProductsChannelEndpointAssignment.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateTrustProductChannelEndpointAssignmentParams{}
	params.SetChannelEndpointSid("YOUR_PHONE_NUMBER_SID")
	params.SetChannelEndpointType("phone-number")

	resp, err := client.TrusthubV1.CreateTrustProductChannelEndpointAssignment("YOUR_TRUST_PRODUCT_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$trust_products_channel_endpoint_assignment = $twilio->trusthub->v1
    ->trustProducts("YOUR_TRUST_PRODUCT_SID")
    ->trustProductsChannelEndpointAssignment->create(
        "phone-number", // ChannelEndpointType
        "YOUR_PHONE_NUMBER_SID" // ChannelEndpointSid
    );

print $trust_products_channel_endpoint_assignment->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

trust_products_channel_endpoint_assignment = @client
                                             .trusthub
                                             .v1
                                             .trust_products('YOUR_TRUST_PRODUCT_SID')
                                             .trust_products_channel_endpoint_assignment
                                             .create(
                                               channel_endpoint_sid: 'YOUR_PHONE_NUMBER_SID',
                                               channel_endpoint_type: 'phone-number'
                                             )

puts trust_products_channel_endpoint_assignment.sid
```

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

twilio api:trusthub:v1:trust-products:channel-endpoint-assignments:create \
   --trust-product-sid YOUR_TRUST_PRODUCT_SID \
   --channel-endpoint-sid YOUR_PHONE_NUMBER_SID \
   --channel-endpoint-type phone-number
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/TrustProducts/YOUR_TRUST_PRODUCT_SID/ChannelEndpointAssignments" \
--data-urlencode "ChannelEndpointSid=YOUR_PHONE_NUMBER_SID" \
--data-urlencode "ChannelEndpointType=phone-number" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "trust_product_sid": "YOUR_TRUST_PRODUCT_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "channel_endpoint_sid": "YOUR_PHONE_NUMBER_SID",
  "channel_endpoint_type": "phone-number",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

### 4. Submit your SHAKEN/STIR Trust Product for vetting

* Once it reaches Twilio-Approved status, you will be able to sign outbound calls with "A" level attestation.

Submit SHAKEN/STIR Trust Product for 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 updateTrustProduct() {
  const trustProduct = await client.trusthub.v1
    .trustProducts("YOUR_TRUST_PRODUCT_SID")
    .update({
      status: "pending-review",
      statusCallback: "https://www.yourcallbackuri.com/webhook",
    });

  console.log(trustProduct.sid);
}

updateTrustProduct();
```

```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)

trust_product = client.trusthub.v1.trust_products(
    "YOUR_TRUST_PRODUCT_SID"
).update(
    status="pending-review",
    status_callback="https://www.yourcallbackuri.com/webhook",
)

print(trust_product.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
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 trustProducts = await TrustProductsResource.UpdateAsync(
            status: TrustProductsResource.StatusEnum.PendingReview,
            statusCallback: new Uri("https://www.yourcallbackuri.com/webhook"),
            pathSid: "YOUR_TRUST_PRODUCT_SID");

        Console.WriteLine(trustProducts.Sid);
    }
}
```

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

import java.net.URI;
import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.TrustProducts;

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);
        TrustProducts trustProducts = TrustProducts.updater("YOUR_TRUST_PRODUCT_SID")
                                          .setStatus(TrustProducts.Status.PENDING_REVIEW)
                                          .setStatusCallback(URI.create("https://www.yourcallbackuri.com/webhook"))
                                          .update();

        System.out.println(trustProducts.getSid());
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.UpdateTrustProductParams{}
	params.SetStatus("pending-review")
	params.SetStatusCallback("https://www.yourcallbackuri.com/webhook")

	resp, err := client.TrusthubV1.UpdateTrustProduct("YOUR_TRUST_PRODUCT_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```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);

$trust_product = $twilio->trusthub->v1
    ->trustProducts("YOUR_TRUST_PRODUCT_SID")
    ->update([
        "status" => "pending-review",
        "statusCallback" => "https://www.yourcallbackuri.com/webhook",
    ]);

print $trust_product->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

trust_product = @client
                .trusthub
                .v1
                .trust_products('YOUR_TRUST_PRODUCT_SID')
                .update(
                  status: 'pending-review',
                  status_callback: 'https://www.yourcallbackuri.com/webhook'
                )

puts trust_product.sid
```

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

twilio api:trusthub:v1:trust-products:update \
   --sid YOUR_TRUST_PRODUCT_SID \
   --status pending-review \
   --status-callback https://www.yourcallbackuri.com/webhook
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/TrustProducts/YOUR_TRUST_PRODUCT_SID" \
--data-urlencode "Status=pending-review" \
--data-urlencode "StatusCallback=https://www.yourcallbackuri.com/webhook" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "YOUR_TRUST_PRODUCT_SID",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "friendly_name",
  "status": "pending-review",
  "email": "email",
  "status_callback": "https://www.yourcallbackuri.com/webhook",
  "valid_until": null,
  "date_created": "2019-07-30T22:29:24Z",
  "date_updated": "2019-07-31T01:09:00Z",
  "url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
    "trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
    "trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
  },
  "errors": null
}
```

Including the status callback URL allows Twilio to send notifications to your webhook. The status callback URL, shown in the previous example, isn't required.

Twilio sends notifications about the approval status over email and to this webhook.

## Additional API Calls

Get Business Profile SIDs

```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 listCustomerProfile() {
  const customerProfiles = await client.trusthub.v1.customerProfiles.list({
    limit: 20,
  });

  customerProfiles.forEach((c) => console.log(c.sid));
}

listCustomerProfile();
```

```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)

customer_profiles = client.trusthub.v1.customer_profiles.list(limit=20)

for record in customer_profiles:
    print(record.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
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 customerProfiles = await CustomerProfilesResource.ReadAsync(limit: 20);

        foreach (var record in customerProfiles) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.CustomerProfiles;
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<CustomerProfiles> customerProfiles = CustomerProfiles.reader().limit(20).read();

        for (CustomerProfiles record : customerProfiles) {
            System.out.println(record.getSid());
        }
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.ListCustomerProfileParams{}
	params.SetLimit(20)

	resp, err := client.TrusthubV1.ListCustomerProfile(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```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);

$customerProfiles = $twilio->trusthub->v1->customerProfiles->read([], 20);

foreach ($customerProfiles as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profiles = @client
                    .trusthub
                    .v1
                    .customer_profiles
                    .list(limit: 20)

customer_profiles.each do |record|
   puts record.sid
end
```

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

twilio api:trusthub:v1:customer-profiles:list
```

```bash
curl -X GET "https://trusthub.twilio.com/v1/CustomerProfiles?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "results": [
    {
      "sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "friendly_name": "friendly_name",
      "status": "twilio-approved",
      "email": "email",
      "status_callback": "http://www.example.com",
      "valid_until": "2020-07-31T01:00:00Z",
      "date_created": "2019-07-30T22:29:24Z",
      "date_updated": "2019-07-31T01:09:00Z",
      "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "links": {
        "customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
        "customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
        "customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
      },
      "errors": [
        {
          "code": 18601
        }
      ]
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```

Create an Address Resource

```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 createAddress() {
  const address = await client.addresses.create({
    city: "CUSTOMER_CITY",
    customerName: "YOUR_CUSTOMER_NAME",
    isoCountry: "BB",
    postalCode: "CUSTOMER_POSTAL_CODE",
    region: "CUSTOMER_STATE_OR_REGION",
    street: "CUSTOMER_STREET",
  });

  console.log(address.accountSid);
}

createAddress();
```

```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)

address = client.addresses.create(
    customer_name="YOUR_CUSTOMER_NAME",
    street="CUSTOMER_STREET",
    city="CUSTOMER_CITY",
    region="CUSTOMER_STATE_OR_REGION",
    postal_code="CUSTOMER_POSTAL_CODE",
    iso_country="BB",
)

print(address.account_sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
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 address = await AddressResource.CreateAsync(
            customerName: "YOUR_CUSTOMER_NAME",
            street: "CUSTOMER_STREET",
            city: "CUSTOMER_CITY",
            region: "CUSTOMER_STATE_OR_REGION",
            postalCode: "CUSTOMER_POSTAL_CODE",
            isoCountry: "BB");

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

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

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Address;

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);
        Address address = Address
                              .creator("YOUR_CUSTOMER_NAME",
                                  "CUSTOMER_STREET",
                                  "CUSTOMER_CITY",
                                  "CUSTOMER_STATE_OR_REGION",
                                  "CUSTOMER_POSTAL_CODE",
                                  "BB")
                              .create();

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

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"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 := &api.CreateAddressParams{}
	params.SetCustomerName("YOUR_CUSTOMER_NAME")
	params.SetStreet("CUSTOMER_STREET")
	params.SetCity("CUSTOMER_CITY")
	params.SetRegion("CUSTOMER_STATE_OR_REGION")
	params.SetPostalCode("CUSTOMER_POSTAL_CODE")
	params.SetIsoCountry("BB")

	resp, err := client.Api.CreateAddress(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);

$address = $twilio->addresses->create(
    "YOUR_CUSTOMER_NAME", // CustomerName
    "CUSTOMER_STREET", // Street
    "CUSTOMER_CITY", // City
    "CUSTOMER_STATE_OR_REGION", // Region
    "CUSTOMER_POSTAL_CODE", // PostalCode
    "BB" // IsoCountry
);

print $address->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

address = @client
          .api
          .v2010
          .addresses
          .create(
            customer_name: 'YOUR_CUSTOMER_NAME',
            street: 'CUSTOMER_STREET',
            city: 'CUSTOMER_CITY',
            region: 'CUSTOMER_STATE_OR_REGION',
            postal_code: 'CUSTOMER_POSTAL_CODE',
            iso_country: 'BB'
          )

puts address.account_sid
```

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

twilio api:core:addresses:create \
   --customer-name YOUR_CUSTOMER_NAME \
   --street CUSTOMER_STREET \
   --city CUSTOMER_CITY \
   --region CUSTOMER_STATE_OR_REGION \
   --postal-code CUSTOMER_POSTAL_CODE \
   --iso-country BB
```

```bash
curl -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Addresses.json" \
--data-urlencode "CustomerName=YOUR_CUSTOMER_NAME" \
--data-urlencode "Street=CUSTOMER_STREET" \
--data-urlencode "City=CUSTOMER_CITY" \
--data-urlencode "Region=CUSTOMER_STATE_OR_REGION" \
--data-urlencode "PostalCode=CUSTOMER_POSTAL_CODE" \
--data-urlencode "IsoCountry=BB" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "YOUR_PARENT_ACCOUNT_SID",
  "city": "CUSTOMER_CITY",
  "customer_name": "YOUR_CUSTOMER_NAME",
  "date_created": "Tue, 18 Aug 2015 17:07:30 +0000",
  "date_updated": "Tue, 18 Aug 2015 17:07:30 +0000",
  "emergency_enabled": false,
  "friendly_name": "Main Office",
  "iso_country": "BB",
  "postal_code": "CUSTOMER_POSTAL_CODE",
  "region": "CUSTOMER_STATE_OR_REGION",
  "sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "street": "CUSTOMER_STREET",
  "street_secondary": "Suite 300",
  "validated": false,
  "verified": false,
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
}
```

Retrieve Address SIDs

```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 listAddress() {
  const addresses = await client.addresses.list({ limit: 20 });

  addresses.forEach((a) => console.log(a.accountSid));
}

listAddress();
```

```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)

addresses = client.addresses.list(limit=20)

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

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

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
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 addresses = await AddressResource.ReadAsync(limit: 20);

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

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

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Address;
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<Address> addresses = Address.reader().limit(20).read();

        for (Address record : addresses) {
            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"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"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 := &api.ListAddressParams{}
	params.SetLimit(20)

	resp, err := client.Api.ListAddress(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);

$addresses = $twilio->addresses->read([], 20);

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

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

addresses = @client
            .api
            .v2010
            .addresses
            .list(limit: 20)

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

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

twilio api:core:addresses:list
```

```bash
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Addresses.json?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "addresses": [
    {
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "city": "SF",
      "customer_name": "name",
      "date_created": "Tue, 18 Aug 2015 17:07:30 +0000",
      "date_updated": "Tue, 18 Aug 2015 17:07:30 +0000",
      "emergency_enabled": false,
      "friendly_name": "Main Office",
      "iso_country": "US",
      "postal_code": "94019",
      "region": "CA",
      "sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "street": "4th",
      "street_secondary": null,
      "validated": false,
      "verified": false,
      "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
    }
  ],
  "end": 0,
  "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses.json?FriendlyName=friendly_name&IsoCountry=US&CustomerName=customer_name&PageSize=50&Page=0",
  "next_page_uri": null,
  "page": 0,
  "page_size": 50,
  "previous_page_uri": null,
  "start": 0,
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses.json?FriendlyName=friendly_name&IsoCountry=US&CustomerName=customer_name&PageSize=50&Page=0"
}
```

Retrieve Supporting Document SIDs

```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 listSupportingDocument() {
  const supportingDocuments = await client.trusthub.v1.supportingDocuments.list(
    { limit: 20 }
  );

  supportingDocuments.forEach((s) => console.log(s.sid));
}

listSupportingDocument();
```

```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)

supporting_documents = client.trusthub.v1.supporting_documents.list(limit=20)

for record in supporting_documents:
    print(record.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
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 supportingDocuments = await SupportingDocumentResource.ReadAsync(limit: 20);

        foreach (var record in supportingDocuments) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.SupportingDocument;
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<SupportingDocument> supportingDocuments = SupportingDocument.reader().limit(20).read();

        for (SupportingDocument record : supportingDocuments) {
            System.out.println(record.getSid());
        }
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.ListSupportingDocumentParams{}
	params.SetLimit(20)

	resp, err := client.TrusthubV1.ListSupportingDocument(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```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);

$supportingDocuments = $twilio->trusthub->v1->supportingDocuments->read(20);

foreach ($supportingDocuments as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

supporting_documents = @client
                       .trusthub
                       .v1
                       .supporting_documents
                       .list(limit: 20)

supporting_documents.each do |record|
   puts record.sid
end
```

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

twilio api:trusthub:v1:supporting-documents:list
```

```bash
curl -X GET "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "results": [
    {
      "status": "DRAFT",
      "date_updated": "2021-02-11T17:23:00Z",
      "friendly_name": "Business-profile-physical-address",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_created": "2021-02-11T17:23:00Z",
      "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "attributes": {
        "address_sids": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      "type": "customer_profile_address",
      "mime_type": null
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```

Read all End Users

```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 listEndUser() {
  const endUsers = await client.trusthub.v1.endUsers.list({ limit: 20 });

  endUsers.forEach((e) => console.log(e.sid));
}

listEndUser();
```

```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)

end_users = client.trusthub.v1.end_users.list(limit=20)

for record in end_users:
    print(record.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1;
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 endUsers = await EndUserResource.ReadAsync(limit: 20);

        foreach (var record in endUsers) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.EndUser;
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<EndUser> endUsers = EndUser.reader().limit(20).read();

        for (EndUser record : endUsers) {
            System.out.println(record.getSid());
        }
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.ListEndUserParams{}
	params.SetLimit(20)

	resp, err := client.TrusthubV1.ListEndUser(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```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);

$endUsers = $twilio->trusthub->v1->endUsers->read(20);

foreach ($endUsers as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

end_users = @client
            .trusthub
            .v1
            .end_users
            .list(limit: 20)

end_users.each do |record|
   puts record.sid
end
```

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

twilio api:trusthub:v1:end-users:list
```

```bash
curl -X GET "https://trusthub.twilio.com/v1/EndUsers?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "results": [
    {
      "date_updated": "2021-02-16T20:40:57Z",
      "sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "friendly_name": "auth_rep_1",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_created": "2021-02-16T20:40:57Z",
      "attributes": {
        "phone_number": "+11234567890",
        "job_position": "CEO",
        "first_name": "rep1",
        "last_name": "test",
        "business_title": "ceo",
        "email": "foobar@test.com"
      },
      "type": "authorized_representative_1"
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```

Get Phone Number SIDs from Parent Account

```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 listIncomingPhoneNumber() {
  const incomingPhoneNumbers = await client.incomingPhoneNumbers.list({
    limit: 20,
  });

  incomingPhoneNumbers.forEach((i) => console.log(i.accountSid));
}

listIncomingPhoneNumber();
```

```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)

incoming_phone_numbers = client.incoming_phone_numbers.list(limit=20)

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

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

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
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 incomingPhoneNumbers = await IncomingPhoneNumberResource.ReadAsync(limit: 20);

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

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

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.IncomingPhoneNumber;
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<IncomingPhoneNumber> incomingPhoneNumbers = IncomingPhoneNumber.reader().limit(20).read();

        for (IncomingPhoneNumber record : incomingPhoneNumbers) {
            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"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"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 := &api.ListIncomingPhoneNumberParams{}
	params.SetLimit(20)

	resp, err := client.Api.ListIncomingPhoneNumber(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);

$incomingPhoneNumbers = $twilio->incomingPhoneNumbers->read([], 20);

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

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

incoming_phone_numbers = @client
                         .api
                         .v2010
                         .incoming_phone_numbers
                         .list(limit: 20)

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

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

twilio api:core:incoming-phone-numbers:list
```

```bash
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/IncomingPhoneNumbers.json?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "end": 0,
  "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
  "incoming_phone_numbers": [
    {
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "address_requirements": "none",
      "address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "api_version": "2010-04-01",
      "beta": null,
      "capabilities": {
        "voice": true,
        "sms": false,
        "mms": true,
        "fax": false
      },
      "date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
      "date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
      "emergency_status": "Active",
      "emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "emergency_address_status": "registered",
      "friendly_name": "(808) 925-5327",
      "identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "origin": "origin",
      "phone_number": "+18089255327",
      "sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "sms_application_sid": "",
      "sms_fallback_method": "POST",
      "sms_fallback_url": "",
      "sms_method": "POST",
      "sms_url": "",
      "status_callback": "",
      "status_callback_method": "POST",
      "trunk_sid": null,
      "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
      "voice_application_sid": "",
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "POST",
      "voice_fallback_url": null,
      "voice_method": "POST",
      "voice_url": null,
      "bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "voice_receive_mode": "voice",
      "status": "in-use",
      "subresource_uris": {
        "assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
      }
    }
  ],
  "next_page_uri": null,
  "page": 0,
  "page_size": 50,
  "previous_page_uri": null,
  "start": 0,
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
}
```

Check Secondary Business Profile Phone Number Assignments

```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 listCustomerProfileChannelEndpointAssignment() {
  const customerProfilesChannelEndpointAssignments = await client.trusthub.v1
    .customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    .customerProfilesChannelEndpointAssignment.list({ limit: 20 });

  customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));
}

listCustomerProfileChannelEndpointAssignment();
```

```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)

customer_profiles_channel_endpoint_assignments = (
    client.trusthub.v1.customer_profiles(
        "YOUR_SECONDARY_BUSINESS_PROFILE_SID"
    ).customer_profiles_channel_endpoint_assignment.list(limit=20)
)

for record in customer_profiles_channel_endpoint_assignments:
    print(record.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.CustomerProfiles;
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 customerProfilesChannelEndpointAssignments =
            await CustomerProfilesChannelEndpointAssignmentResource.ReadAsync(
                pathCustomerProfileSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID", limit: 20);

        foreach (var record in customerProfilesChannelEndpointAssignments) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.customerprofiles.CustomerProfilesChannelEndpointAssignment;
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<CustomerProfilesChannelEndpointAssignment> customerProfilesChannelEndpointAssignments =
            CustomerProfilesChannelEndpointAssignment.reader("YOUR_SECONDARY_BUSINESS_PROFILE_SID").limit(20).read();

        for (CustomerProfilesChannelEndpointAssignment record : customerProfilesChannelEndpointAssignments) {
            System.out.println(record.getSid());
        }
    }
}
```

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.ListCustomerProfileChannelEndpointAssignmentParams{}
	params.SetLimit(20)

	resp, err := client.TrusthubV1.ListCustomerProfileChannelEndpointAssignment("YOUR_SECONDARY_BUSINESS_PROFILE_SID",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```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);

$customerProfilesChannelEndpointAssignments = $twilio->trusthub->v1
    ->customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
    ->customerProfilesChannelEndpointAssignment->read([], 20);

foreach ($customerProfilesChannelEndpointAssignments as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
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)

customer_profiles_channel_endpoint_assignments = @client
                                                 .trusthub
                                                 .v1
                                                 .customer_profiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
                                                 .customer_profiles_channel_endpoint_assignment
                                                 .list(limit: 20)

customer_profiles_channel_endpoint_assignments.each do |record|
   puts record.sid
end
```

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

twilio api:trusthub:v1:customer-profiles:channel-endpoint-assignments:list \
   --customer-profile-sid YOUR_SECONDARY_BUSINESS_PROFILE_SID
```

```bash
curl -X GET "https://trusthub.twilio.com/v1/CustomerProfiles/YOUR_SECONDARY_BUSINESS_PROFILE_SID/ChannelEndpointAssignments?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "results": [
    {
      "sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "channel_endpoint_type": "phone-number",
      "date_created": "2019-07-31T02:34:41Z",
      "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```
