# Supporting Documents Resource

> \[!WARNING]
>
> The v2 Regulatory Compliance APIs are currently in Public Beta. No breaking changes in the API contract will occur when the API moves from Public Beta to GA.

The Supporting Documents resource of Twilio's Regulatory Compliance APIs allows you to create new Supporting Documents with metadata to fulfill [Regulations](/docs/phone-numbers/regulatory/api/regulations). Each [Supporting Document Type](/docs/phone-numbers/regulatory/api/supporting-document-types) may need different information to be compliant, so be sure to pass all of the correct values when creating a new Supporting Document Type.

A collection of Supporting Documents [Assigned as Items](/docs/phone-numbers/regulatory/api/item-assignments) to a [Regulatory Bundle](/docs/phone-numbers/regulatory/api/bundles) along with an [End-User](/docs/phone-numbers/regulatory/api/end-users) satisfies a [Regulation](https://www.twilio.com/en-us/guidelines/regulatory).

## Supporting Documents Response Properties

The field of the Supporting Documents resource responds is in JSON. The type SID\<RD> is a unique ID starting with letters RD that reference a unique Supporting Document instance. For more information about Twilio SIDs, please refer to [Twilio's glossary on SIDs](/docs/glossary/what-is-a-sid).

```json
{"type":"object","refName":"numbers.v2.regulatory_compliance.supporting_document","modelName":"numbers_v2_regulatory_compliance_supporting_document","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RD[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string created by Twilio to identify the Supporting Document resource."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Account](/docs/iam/api/account) that created the Document resource."},"friendly_name":{"type":"string","nullable":true,"description":"The string that you assigned to describe the resource."},"mime_type":{"type":"string","nullable":true,"description":"The image type uploaded in the Supporting Document container."},"status":{"type":"string","enum":["draft","pending-review","rejected","approved","expired","provisionally-approved"],"description":"The verification status of the Supporting Document resource.","refName":"supporting_document_enum_status","modelName":"supporting_document_enum_status"},"failure_reason":{"type":"string","nullable":true,"description":"The failure reason of the Supporting Document Resource."},"errors":{"type":"array","nullable":true,"description":"A list of errors that occurred during the registering RC Bundle"},"type":{"type":"string","nullable":true,"description":"The type of the Supporting Document."},"attributes":{"nullable":true,"description":"The set of parameters that are the attributes of the Supporting Documents resource which are listed in the Supporting Document Types.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"date_updated":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Supporting Document resource."}}}
```

### Supporting Document Statuses

The following statuses encompass the Bundle lifecycle.

| ***Status***     | ***Description***                                                                                                                                          |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *draft*          | The draft status of the Supporting Document allows users to edit the Supporting Document file and metadata.                                                |
| *pending-review* | When the user has finished the draft and submits the Supporting Document for review, the status moves from `draft` to `pending-review`, awaiting Twilio's. |
| *rejected*       | Twilio has reviewed the Supporting Document and has determined the Supporting Document does not comply with the regulations.                               |
| *approved*       | Twilio has reviewed the Supporting Document and has determined the Supporting Document does not comply with the regulations.                               |
| *expired*        | The document has expired and is no longer valid to provision phone numbers. An updated document must be created and added to a new or existing Bundle.     |

## Create a Supporting Document

`POST https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments`

To provision or port in a phone number to Twilio, you will need to create one or many Supporting Documents that also may need an image as proof.

A Supporting Document is a container that holds metadata of a legal document. Each [Supporting Document Type](/docs/phone-numbers/regulatory/api/supporting-document-types) requires a different value during the `create` operation.

The [Regulation](/docs/phone-numbers/regulatory/api/regulations) may need the [End-User](/docs/phone-numbers/regulatory/api/end-users) to upload an image as *proof* for the Supporting Document. Formats accepted are *JPEG*, *PNG*, and *PDF*, with a file size limit of 5 MB.

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateSupportingDocumentRequest","required":["FriendlyName","Type"],"properties":{"FriendlyName":{"type":"string","description":"The string that you assigned to describe the resource."},"Type":{"type":"string","description":"The type of the Supporting Document."},"Attributes":{"description":"The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Type\": \"type\",\n  \"Attributes\": \"{}\"\n}","meta":"","code":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Type\": \"type\",\n  \"Attributes\": \"{}\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"FriendlyName\"","#7EE787"],[":","#C9D1D9"]," ",["\"friendly_name\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Type\"","#7EE787"],[":","#C9D1D9"]," ",["\"type\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Attributes\"","#7EE787"],[":","#C9D1D9"]," ",["\"{}\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

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.numbers.v2.regulatoryCompliance.supportingDocuments.create({
      attributes: {
        address_sids: [
          "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        ],
      },
      friendlyName: "BusinessRegistration",
      type: "business_registration",
    });

  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.numbers.v2.regulatory_compliance.supporting_documents.create(
        friendly_name="BusinessRegistration",
        type="business_registration",
        attributes={
            "address_sids": [
                "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            ]
        },
    )
)

print(supporting_document.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
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(
            friendlyName: "BusinessRegistration",
            type: "business_registration",
            attributes: new Dictionary<string, Object>() {
                { "address_sids",
                  new List<string> {
                      "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                  } }
            });

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

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

import java.util.Arrays;
import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.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("BusinessRegistration", "business_registration")
                .setAttributes(new HashMap<String, Object>() {
                    {
                        put("address_sids",
                            Arrays.asList("ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"));
                    }
                })
                .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"
	numbers "github.com/twilio/twilio-go/rest/numbers/v2"
	"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 := &numbers.CreateSupportingDocumentParams{}
	params.SetFriendlyName("BusinessRegistration")
	params.SetType("business_registration")
	params.SetAttributes(map[string]interface{}{
		"address_sids": []string{
			"ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		},
	})

	resp, err := client.NumbersV2.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->numbers->v2->regulatoryCompliance->supportingDocuments->create(
    "BusinessRegistration", // FriendlyName
    "business_registration", // Type
    [
        "attributes" => [
            "address_sids" => [
                "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            ],
        ],
    ]
);

print $supporting_document->sid;
```

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

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

supporting_document = @client
                      .numbers
                      .v2
                      .regulatory_compliance
                      .supporting_documents
                      .create(
                        friendly_name: 'BusinessRegistration',
                        type: 'business_registration',
                        attributes: {
                          'address_sids' => [
                            'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
                            'ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
                          ]
                        }
                      )

puts supporting_document.sid
```

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

twilio api:numbers:v2:regulatory-compliance:supporting-documents:create \
   --friendly-name BusinessRegistration \
   --type business_registration \
   --attributes "{\"address_sids\":[\"ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\"ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"]}"
```

```bash
ATTRIBUTES_OBJ=$(cat << EOF
{
  "address_sids": [
    "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  ]
}
EOF
)
curl -X POST "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments" \
--data-urlencode "FriendlyName=BusinessRegistration" \
--data-urlencode "Type=business_registration" \
--data-urlencode "Attributes=$ATTRIBUTES_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "BusinessRegistration",
  "mime_type": "mime_type",
  "status": "draft",
  "failure_reason": null,
  "errors": null,
  "type": "business_registration",
  "attributes": {
    "address_sids": [
      "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    ]
  },
  "date_created": "2019-07-31T02:11:52Z",
  "date_updated": "2019-07-31T02:11:52Z",
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

Create a Supporting Document and upload a file

```bash
ATTRIBUTES=$(cat << EOF
{
    "address_sids": ["ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
    "document_number": "312454", 
    "business_name": "Twilio",
    "issue_date": "2019-11-15"
}
EOF
)

curl -X POST https://numbers-upload.twilio.com/v2/RegulatoryCompliance/SupportingDocuments \
-F "Attributes=$ATTRIBUTES" \
-F "FriendlyName=Twilio GmbH" \
-F "Type=business_registration" \
-F "File=@twilio_business_registration.png" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
```

```json
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "attributes": {
        "business_name": "Twilio",
        "document_number": "312454",
        "issue_date": "2019-11-15",
        "registered_seat_of_business": "San Francisco, CA, USA"
    },
    "date_created": "2019-10-17T17:06:47Z",
    "date_updated": "2019-10-17T17:06:47Z",
    "friendly_name": "Twilio GmbH",
    "mime_type": "image/png",
    "sid": "RDd6340f49f352d06b77e7017d93591483",
    "status": "draft",
    "type": "business_registration",
    "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Documents/RDd6340f49f352d06b77e7017d93591483"
}
```

## Fetch a Supporting Document instance

`GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}`

### Path parameters

```json
[{"name":"Sid","in":"path","description":"The unique string created by Twilio to identify the Supporting Document resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RD[0-9a-fA-F]{32}$"},"required":true}]
```

Fetch a Supporting Document instance

```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 fetchSupportingDocument() {
  const supportingDocument = await client.numbers.v2.regulatoryCompliance
    .supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(supportingDocument.sid);
}

fetchSupportingDocument();
```

```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.numbers.v2.regulatory_compliance.supporting_documents(
        "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    ).fetch()
)

print(supporting_document.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
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 supportingDocument = await SupportingDocumentResource.FetchAsync(
            pathSid: "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

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

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

import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.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.fetcher("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        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"
	"os"
)

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

	resp, err := client.NumbersV2.FetchSupportingDocument("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	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->numbers->v2->regulatoryCompliance
    ->supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $supporting_document->sid;
```

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

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

supporting_document = @client
                      .numbers
                      .v2
                      .regulatory_compliance
                      .supporting_documents('RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                      .fetch

puts supporting_document.sid
```

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

twilio api:numbers:v2:regulatory-compliance:supporting-documents:fetch \
   --sid RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "friendly_name",
  "mime_type": "mime_type",
  "status": "draft",
  "failure_reason": null,
  "errors": null,
  "type": "type",
  "attributes": {
    "first_name": "foo",
    "last_name": "bar"
  },
  "date_created": "2019-07-31T02:11:52Z",
  "date_updated": "2019-07-31T02:11:52Z",
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Retrieve a list of Supporting Documents

`GET https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments`

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

Retrieve a list of Supporting Documents

```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.numbers.v2.regulatoryCompliance.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.numbers.v2.regulatory_compliance.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.Numbers.V2.RegulatoryCompliance;
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.numbers.v2.regulatorycompliance.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"
	numbers "github.com/twilio/twilio-go/rest/numbers/v2"
	"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 := &numbers.ListSupportingDocumentParams{}
	params.SetLimit(20)

	resp, err := client.NumbersV2.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->numbers->v2->regulatoryCompliance->supportingDocuments->read(
    20
);

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

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

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

supporting_documents = @client
                       .numbers
                       .v2
                       .regulatory_compliance
                       .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:numbers:v2:regulatory-compliance:supporting-documents:list
```

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

```json
{
  "results": [],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```

## Update a Supporting Document Instance

`POST https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}`

### Path parameters

```json
[{"name":"Sid","in":"path","description":"The unique string created by Twilio to identify the Supporting Document resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RD[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"UpdateSupportingDocumentRequest","properties":{"FriendlyName":{"type":"string","description":"The string that you assigned to describe the resource."},"Attributes":{"description":"The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}}}},"examples":{"update":{"value":{"lang":"json","value":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Attributes\": \"{}\"\n}","meta":"","code":"{\n  \"FriendlyName\": \"friendly_name\",\n  \"Attributes\": \"{}\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"FriendlyName\"","#7EE787"],[":","#C9D1D9"]," ",["\"friendly_name\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Attributes\"","#7EE787"],[":","#C9D1D9"]," ",["\"{}\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Update a Supporting Document instance

```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 updateSupportingDocument() {
  const supportingDocument = await client.numbers.v2.regulatoryCompliance
    .supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .update({ friendlyName: "My new Friendly Name" });

  console.log(supportingDocument.sid);
}

updateSupportingDocument();
```

```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.numbers.v2.regulatory_compliance.supporting_documents(
        "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    ).update(friendly_name="My new Friendly Name")
)

print(supporting_document.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
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 supportingDocument = await SupportingDocumentResource.UpdateAsync(
            friendlyName: "My new Friendly Name", pathSid: "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

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

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

import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.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.updater("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                                                    .setFriendlyName("My new Friendly Name")
                                                    .update();

        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"
	numbers "github.com/twilio/twilio-go/rest/numbers/v2"
	"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 := &numbers.UpdateSupportingDocumentParams{}
	params.SetFriendlyName("My new Friendly Name")

	resp, err := client.NumbersV2.UpdateSupportingDocument("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		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->numbers->v2->regulatoryCompliance
    ->supportingDocuments("RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->update(["friendlyName" => "My new Friendly Name"]);

print $supporting_document->sid;
```

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

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

supporting_document = @client
                      .numbers
                      .v2
                      .regulatory_compliance
                      .supporting_documents('RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                      .update(friendly_name: 'My new Friendly Name')

puts supporting_document.sid
```

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

twilio api:numbers:v2:regulatory-compliance:supporting-documents:update \
   --sid RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --friendly-name "My new Friendly Name"
```

```bash
curl -X POST "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
--data-urlencode "FriendlyName=My new Friendly Name" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "My new Friendly Name",
  "mime_type": "mime_type",
  "status": "draft",
  "failure_reason": null,
  "errors": null,
  "type": "type",
  "attributes": {
    "first_name": "foo",
    "last_name": "bar"
  },
  "date_created": "2019-07-31T02:11:52Z",
  "date_updated": "2019-07-31T02:11:52Z",
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Delete a Supporting Document instance

`DELETE https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/{Sid}`

The `DELETE` operation is allowed for Supporting Documents with status of `DRAFT`, `APPROVED`, or `REJECTED` and have ***no active*** Long Code phone number assignments.

### Path parameters

```json
[{"name":"Sid","in":"path","description":"The unique string created by Twilio to identify the Supporting Document resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RD[0-9a-fA-F]{32}$"},"required":true}]
```

Delete a Supporting Document instance

```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 deleteSupportingDocument() {
  await client.numbers.v2.regulatoryCompliance
    .supportingDocuments("RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .remove();
}

deleteSupportingDocument();
```

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

client.numbers.v2.regulatory_compliance.supporting_documents(
    "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).delete()
```

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

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance;
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);

        await SupportingDocumentResource.DeleteAsync(pathSid: "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.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.deleter("RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete();
    }
}
```

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

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

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

	err := client.NumbersV2.DeleteSupportingDocument("RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

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

$twilio->numbers->v2->regulatoryCompliance
    ->supportingDocuments("RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->delete();
```

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

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

@client
  .numbers
  .v2
  .regulatory_compliance
  .supporting_documents('RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .delete
```

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

twilio api:numbers:v2:regulatory-compliance:supporting-documents:remove \
   --sid RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X DELETE "https://numbers.twilio.com/v2/RegulatoryCompliance/SupportingDocuments/RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```
