# Bundle Copies Resource

> \[!NOTE]
>
> This page is specifically about the Replace Items subresource of a Bundle. Please refer to [Regulatory Compliance REST APIs](/docs/phone-numbers/regulatory/api) for general knowledge or [FAQ](/docs/phone-numbers/regulatory/faq) page.

With the new Bundle Copy resource, developers can now update their compliance information when Regulations change while they continue their Phone Number provisioning habits before the compliance information is no longer valid. The resource copies a Regulatory Bundle to allow updating of the compliance information in a mutable state.

## Copies Response Properties

The field of the Bundle resource response is in JSON. The type SID\<BU> is a unique ID starting with letters BU. 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.bundle.bundle_copy","modelName":"numbers_v2_regulatory_compliance_bundle_bundle_copy","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the Bundle 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 Bundle resource."},"regulation_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RN[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string of a regulation that is associated to the Bundle resource."},"friendly_name":{"type":"string","nullable":true,"description":"The string that you assigned to describe the resource."},"status":{"type":"string","enum":["draft","pending-review","in-review","twilio-rejected","twilio-approved","provisionally-approved"],"description":"The verification status of the Bundle resource.","refName":"bundle_copy_enum_status","modelName":"bundle_copy_enum_status"},"valid_until":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until."},"email":{"type":"string","nullable":true,"description":"The email address that will receive updates when the Bundle resource changes status."},"status_callback":{"type":"string","format":"uri","nullable":true,"description":"The URL we call to inform your application of status changes."},"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."}}}
```

### Bundle Statuses

The following statuses encompass the Bundle lifecycle.

| ***Status***      | ***Description***                                                                                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *draft*           | The user has created a new Bundle that can be edited with Supporting Documents and End-User objects assigned.                                                       |
| *pending-review*  | When the user has finished the draft of the Bundle and submits to Twilio for `review`, the status moves from draft to `pending-review`.                             |
| *in-review*       | Twilio has moved the Bundle from pending-review to in-review. Once Twilio has finished review, the Bundle will go either to `twilio-approved` or `twilio-rejected`. |
| *twilio-rejected* | Twilio has reviewed the Bundle and has determined the Bundle does not meet the regulations.                                                                         |
| *twilio-approved* | Twilio has reviewed the Bundle and has determined the Bundles does meet the regulations.                                                                            |

## Create new Bundle Copy

`POST https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/Copies`

### Path parameters

```json
[{"name":"BundleSid","in":"path","description":"The unique string that identifies the Bundle to be copied.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateBundleCopyRequest","properties":{"FriendlyName":{"type":"string","description":"The string that you assigned to describe the copied bundle."}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"FriendlyName\": \"friendly_name\"\n}","meta":"","code":"{\n  \"FriendlyName\": \"friendly_name\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"FriendlyName\"","#7EE787"],[":","#C9D1D9"]," ",["\"friendly_name\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Create new Bundle Copy

```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 createBundleCopy() {
  const bundleCopy = await client.numbers.v2.regulatoryCompliance
    .bundles("BUef3a237936fb63163fd852d77c5ba27b")
    .bundleCopies.create();

  console.log(bundleCopy.sid);
}

createBundleCopy();
```

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

bundle_copy = client.numbers.v2.regulatory_compliance.bundles(
    "BUef3a237936fb63163fd852d77c5ba27b"
).bundle_copies.create()

print(bundle_copy.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Numbers.V2.RegulatoryCompliance.Bundle;
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 bundleCopy = await BundleCopyResource.CreateAsync(
            pathBundleSid: "BUef3a237936fb63163fd852d77c5ba27b");

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

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

import com.twilio.Twilio;
import com.twilio.rest.numbers.v2.regulatorycompliance.bundle.BundleCopy;

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);
        BundleCopy bundleCopy = BundleCopy.creator("BUef3a237936fb63163fd852d77c5ba27b").create();

        System.out.println(bundleCopy.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.CreateBundleCopyParams{}

	resp, err := client.NumbersV2.CreateBundleCopy("BUef3a237936fb63163fd852d77c5ba27b",
		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);

$bundle_copy = $twilio->numbers->v2->regulatoryCompliance
    ->bundles("BUef3a237936fb63163fd852d77c5ba27b")
    ->bundleCopies->create();

print $bundle_copy->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)

bundle_copy = @client
              .numbers
              .v2
              .regulatory_compliance
              .bundles('BUef3a237936fb63163fd852d77c5ba27b')
              .bundle_copies
              .create

puts bundle_copy.sid
```

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

twilio api:numbers:v2:regulatory-compliance:bundles:copies:create \
   --bundle-sid BUef3a237936fb63163fd852d77c5ba27b
```

```bash
curl -X POST "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUef3a237936fb63163fd852d77c5ba27b/Copies" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "regulation_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "friendly_name",
  "status": "draft",
  "valid_until": "2015-07-30T20:00:00Z",
  "email": "email",
  "status_callback": "http://www.example.com",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z"
}
```

## Read multiple BundleCopy resources

`GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/Copies`

### Path parameters

```json
[{"name":"BundleSid","in":"path","description":"The unique string that we created to identify the Bundle resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$"},"required":true}]
```

### 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"}}]
```

Read Regulatory Bundle

```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 listBundleCopy() {
  const bundleCopies = await client.numbers.v2.regulatoryCompliance
    .bundles("BUef3a237936fb63163fd852d77c5ba27b")
    .bundleCopies.list({ limit: 20 });

  bundleCopies.forEach((b) => console.log(b.sid));
}

listBundleCopy();
```

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

bundle_copies = client.numbers.v2.regulatory_compliance.bundles(
    "BUef3a237936fb63163fd852d77c5ba27b"
).bundle_copies.list(limit=20)

for record in bundle_copies:
    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.Bundle;
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 bundleCopies = await BundleCopyResource.ReadAsync(
            pathBundleSid: "BUef3a237936fb63163fd852d77c5ba27b", limit: 20);

        foreach (var record in bundleCopies) {
            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.bundle.BundleCopy;
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<BundleCopy> bundleCopies = BundleCopy.reader("BUef3a237936fb63163fd852d77c5ba27b").limit(20).read();

        for (BundleCopy record : bundleCopies) {
            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.ListBundleCopyParams{}
	params.SetLimit(20)

	resp, err := client.NumbersV2.ListBundleCopy("BUef3a237936fb63163fd852d77c5ba27b",
		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);

$bundleCopies = $twilio->numbers->v2->regulatoryCompliance
    ->bundles("BUef3a237936fb63163fd852d77c5ba27b")
    ->bundleCopies->read(20);

foreach ($bundleCopies 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)

bundle_copies = @client
                .numbers
                .v2
                .regulatory_compliance
                .bundles('BUef3a237936fb63163fd852d77c5ba27b')
                .bundle_copies
                .list(limit: 20)

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

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

twilio api:numbers:v2:regulatory-compliance:bundles:copies:list \
   --bundle-sid BUef3a237936fb63163fd852d77c5ba27b
```

```bash
curl -X GET "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUef3a237936fb63163fd852d77c5ba27b/Copies?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/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Copies?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Copies?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```
