Skip to contentSkip to navigationSkip to topbar
On this page

Bundle Replace Items 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 Replace Items resource, developers can now update their compliance information when Regulations change while continuing to provision new Phone Numbers before their compliance information is no longer valid. The Replace Items resource replaces a twilio-approved Regulatory Bundle's Items with a twilio-approved Bundle Copy. By replacing the old items with the newly approved Bundle Copy Items Assigned, you will not have to worry about reassigning any Phone Numbers or other potential dependencies that rely on the Bundle.


Replace Items Response properties

replace-items-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 nameTypeRequiredDescriptionChild properties
sidSID<BU>

Optional

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>

Optional

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>

Optional

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

Optional

The string that you assigned to describe the resource.


statusenum<string>

Optional

The verification status of the Bundle resource.

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

emailstring

Optional

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


status_callbackstring<uri>

Optional

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


date_createdstring<date-time>

Optional

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>

Optional

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.

Replace Items from Bundle Copy to original Bundle

replace-items-from-bundle-copy-to-original-bundle page anchor
POST https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ReplaceItems

Property nameTypeRequiredPIIDescription
BundleSidSID<BU>required

The unique string that identifies the Bundle where the item assignments are going to be replaced.

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
FromBundleSidSID<BU>required

The source bundle sid to copy the item assignments from.

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Replace Items from Bundle Copy to original BundleLink to code sample: Replace Items from Bundle Copy to original Bundle
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createReplaceItems() {
11
const replaceItem = await client.numbers.v2.regulatoryCompliance
12
.bundles("BUef3a237936fb63163fd852d77c5ba27b")
13
.replaceItems.create({
14
fromBundleSid: "BU504eddd19f1efa428458f6daed683667",
15
});
16
17
console.log(replaceItem.sid);
18
}
19
20
createReplaceItems();

Output

1
{
2
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"regulation_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"friendly_name": "friendly_name",
6
"status": "draft",
7
"valid_until": "2015-07-30T20:00:00Z",
8
"email": "email",
9
"status_callback": "http://www.example.com",
10
"date_created": "2015-07-30T20:00:00Z",
11
"date_updated": "2015-07-30T20:00:00Z"
12
}

Only the create operation is available for the Replace Items resource as the operation is a one-time event. To perform the even again, a new Bundle Copy will need to be created and approved before the Replace Items operation event can be triggered. There is no GET or DELETE available for this resource.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.