Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Bundle Copies Resource


(information)

Info

This page is specifically about the Replace Items subresource of a Bundle. Please refer to Regulatory Compliance REST APIs for general knowledge or 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

copies-response-properties page anchor

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.

Property nameTypePIIDescription
sidSID<BU>
Not PII

The unique string that we created to identify the Bundle resource.

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

account_sidSID<AC>

The SID of the Account that created the Bundle resource.

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

regulation_sidSID<RN>

The unique string of a regulation that is associated to the Bundle resource.

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

friendly_namestring

The string that you assigned to describe the resource.


statusenum<string>

The verification status of the Bundle resource.

Possible values:
draftpending-reviewin-reviewtwilio-rejectedtwilio-approvedprovisionally-approved

emailstring

The email address that will receive updates when the Bundle resource changes status.


status_callbackstring<uri>

The URL we call to inform your application of status changes.


date_createdstring<date-time>

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


date_updatedstring<date-time>

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

Bundle Statuses

bundle-statuses page anchor

The following statuses encompass the Bundle lifecycle.

StatusDescription
draftThe user has created a new Bundle that can be edited with Supporting Documents and End-User objects assigned.
pending-reviewWhen the user has finished the draft of the Bundle and submits to Twilio for review, the status moves from draft to pending-review.
in-reviewTwilio 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-rejectedTwilio has reviewed the Bundle and has determined the Bundle does not meet the regulations.
twilio-approvedTwilio has reviewed the Bundle and has determined the Bundles does meet the regulations.

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

Property nameTypeRequiredPIIDescription
BundleSidSID<BU>required

The unique string that identifies the Bundle to be copied.

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
FriendlyNamestringOptional

The string that you assigned to describe the copied bundle.

Create new Bundle Copy

create-new-bundle-copy-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function createBundleCopy() {
_18
const bundleCopy = await client.numbers.v2.regulatoryCompliance
_18
.bundles("BUef3a237936fb63163fd852d77c5ba27b")
_18
.bundleCopies.create();
_18
_18
console.log(bundleCopy.sid);
_18
}
_18
_18
createBundleCopy();

Output

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


Read multiple BundleCopy resources

read-multiple-bundlecopy-resources page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/Copies

Property nameTypeRequiredPIIDescription
BundleSidSID<BU>required

The unique string that we created to identify the Bundle resource.

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listBundleCopy() {
_18
const bundleCopies = await client.numbers.v2.regulatoryCompliance
_18
.bundles("BUef3a237936fb63163fd852d77c5ba27b")
_18
.bundleCopies.list({ limit: 20 });
_18
_18
bundleCopies.forEach((b) => console.log(b.sid));
_18
}
_18
_18
listBundleCopy();

Output

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


Rate this page: