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

Bundles Resource


(warning)

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 Twilio Bundles REST API allows you to create empty Regulatory Bundle containers. The Regulatory Bundles are Item Assignments of End-Users and Supporting Documents for regulatory compliance.

Depending on the configuration of the bundle, the bundle is being assessed against a Regulation (e.g., Germany local phone numbers for a business). Different Regulations need Item Assignments combinations of End-User Types and Supporting Document Types.


Bundles Response Properties

bundles-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.

Resource properties
sidtype: SID<BU>Not PII

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


regulation_sidtype: SID<RN>Not PII

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


friendly_nametype: stringNot PII

The string that you assigned to describe the resource.


statustype: enum<STRING>Not PII

The verification status of the Bundle resource.

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

valid_untiltype: string<DATE TIME>Not PII

The date and time in GMT in ISO 8601(link takes you to an external page) format when the resource will be valid until.


emailtype: stringNot PII

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


status_callbacktype: string<URI>Not PII

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


date_createdtype: string<DATE TIME>Not PII

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


date_updatedtype: string<DATE TIME>Not PII

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


urltype: string<URI>Not PII

The absolute URL of the Bundle resource.


linkstype: object<URI MAP>Not PII

The URLs of the Assigned Items of the Bundle resource.

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.

The status callback configuration of the Regulatory Bundle will send a POST request to the URL specified. Every time the Regulatory Bundle changes status, Twilio will send a request to the status callback webhook.

FieldDescription
Account SIDThe SID of the Account that created the Bundle resource.
Bundle SIDThe unique string that we created to identify the Bundle resource.
StatusThe verification status of the Bundle resource. See Bundle Statuses for a list of possible values.
Failure ReasonThe description(s) of what incorrect configuration the Regulatory Bundle currently has.

POST https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles

To provision or port a phone number to Twilio, you will need to create a new Bundle that will contain all the information required to follow local telco Regulations.

The Bundle is a container that references the required Regulatory Compliance information set forth by the regulating telecom body of the end-user who actually answers the phone call or receives the message.

When creating the Bundle, you will specify the following parameters IsoCountry, NumberType, and EndUserType so you can follow compliance for a Regulation.

Parameters

create-parameters page anchor
Request body parameters
FriendlyNametype: stringNot PII
Required

The string that you assigned to describe the resource.


Emailtype: stringNot PII
Required

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


StatusCallbacktype: string<URI>Not PII

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


RegulationSidtype: SID<RN>Not PII

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


IsoCountrytype: stringNot PII

The ISO country code(link takes you to an external page) of the Bundle's phone number country ownership request.


EndUserTypetype: enum<STRING>Not PII
Possible values:
individualbusiness

NumberTypetype: stringNot PII

The type of phone number of the Bundle's ownership request. Can be local, mobile, national, or toll free.

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
// 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 = require('twilio')(accountSid, authToken);
_18
_18
client.numbers.v2.regulatoryCompliance
_18
.bundles
_18
.create({
_18
endUserType: 'business',
_18
isoCountry: 'de',
_18
numberType: 'local',
_18
statusCallback: 'https://twilio.status.callback.com',
_18
friendlyName: 'Twilio, Inc. DE Local Bundle',
_18
email: 'numbers-regulatory-review@twilio.com'
_18
})
_18
.then(bundle => console.log(bundle.sid));

Output

_18
{
_18
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"regulation_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"friendly_name": "Twilio, Inc. DE Local Bundle",
_18
"status": "draft",
_18
"email": "numbers-regulatory-review@twilio.com",
_18
"status_callback": "https://twilio.status.callback.com",
_18
"valid_until": null,
_18
"date_created": "2019-07-30T22:29:24Z",
_18
"date_updated": "2019-07-31T01:09:00Z",
_18
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"links": {
_18
"evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_18
"item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ItemAssignments",
_18
"bundle_copies": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Copies"
_18
}
_18
}


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

URI parameters
Sidtype: SID<BU>Not PII
Path Parameter

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

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

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.numbers.v2.regulatoryCompliance
_11
.bundles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(bundle => console.log(bundle.sid));

Output

_18
{
_18
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"regulation_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"friendly_name": "friendly_name",
_18
"status": "draft",
_18
"valid_until": null,
_18
"email": "email",
_18
"status_callback": "http://www.example.com",
_18
"date_created": "2019-07-30T22:29:24Z",
_18
"date_updated": "2019-07-31T01:09:00Z",
_18
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"links": {
_18
"evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_18
"item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ItemAssignments",
_18
"bundle_copies": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Copies"
_18
}
_18
}


GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles

If your application requires local inbound connectivity in many number types within a country or with many countries, you will have to create many Regulatory Bundle containers with all necessary information.

URI parameters
Statustype: enum<STRING>Not PII
Query Parameter

The verification status of the Bundle resource. Please refer to Bundle Statuses(link takes you to an external page) for more details.

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

FriendlyNametype: stringNot PII
Query Parameter

The string that you assigned to describe the resource. The column can contain 255 variable characters.


RegulationSidtype: SID<RN>Not PII
Query Parameter

The unique string of a Regulation resource(link takes you to an external page) that is associated to the Bundle resource.


IsoCountrytype: stringNot PII
Query Parameter

The 2-digit ISO country code(link takes you to an external page) of the Bundle's phone number country ownership request.


NumberTypetype: stringNot PII
Query Parameter

The type of phone number of the Bundle's ownership request. Can be local, mobile, national, or tollfree.


HasValidUntilDatetype: booleanNot PII
Query Parameter

Indicates that the Bundle is a valid Bundle until a specified expiration date.


SortBytype: enum<STRING>Not PII
Query Parameter

Can be valid-until or date-updated. Defaults to date-created.

Possible values:
valid-untildate-updated

SortDirectiontype: enum<STRING>Not PII
Query Parameter

Default is DESC. Can be ASC or DESC.

Possible values:
ASCDESC

ValidUntilDatetype: string<DATE TIME>Not PII
Query Parameter

Date to filter Bundles having their valid_until_date before or after the specified date. Can be ValidUntilDate>= or ValidUntilDate<=. Both can be used in conjunction as well. ISO 8601(link takes you to an external page) is the acceptable date format.


ValidUntilDate<type: string<DATE TIME>Not PII
Query Parameter

Date to filter Bundles having their valid_until_date before or after the specified date. Can be ValidUntilDate>= or ValidUntilDate<=. Both can be used in conjunction as well. ISO 8601(link takes you to an external page) is the acceptable date format.


ValidUntilDate>type: string<DATE TIME>Not PII
Query Parameter

Date to filter Bundles having their valid_until_date before or after the specified date. Can be ValidUntilDate>= or ValidUntilDate<=. Both can be used in conjunction as well. ISO 8601(link takes you to an external page) is the acceptable date format.


PageSizetype: integerNot PII
Query Parameter

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


Pagetype: integerNot PII
Query Parameter

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


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

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

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

Output

_31
{
_31
"results": [
_31
{
_31
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"regulation_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"friendly_name": "friendly_name",
_31
"status": "provisionally-approved",
_31
"email": "email",
_31
"status_callback": "http://www.example.com",
_31
"valid_until": "2020-07-31T01:00:00Z",
_31
"date_created": "2019-07-30T22:29:24Z",
_31
"date_updated": "2019-07-31T01:09:00Z",
_31
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"links": {
_31
"evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_31
"item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ItemAssignments",
_31
"bundle_copies": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Copies"
_31
}
_31
}
_31
],
_31
"meta": {
_31
"page": 0,
_31
"page_size": 50,
_31
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=0",
_31
"previous_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=0",
_31
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=0",
_31
"next_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=1",
_31
"key": "results"
_31
}
_31
}


Update a Bundle instance

update-a-bundle-instance page anchor
POST https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}

URI parameters
Sidtype: SID<BU>Not PII
Path Parameter

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


Request body parameters
Statustype: enum<STRING>Not PII

The verification status of the Bundle resource.

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

StatusCallbacktype: string<URI>Not PII

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


FriendlyNametype: stringNot PII

The string that you assigned to describe the resource.


Emailtype: stringNot PII

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

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

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.numbers.v2.regulatoryCompliance
_14
.bundles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.update({
_14
friendlyName: 'UpdatedSubmitedFriendlyName',
_14
status: 'pending-review'
_14
})
_14
.then(bundle => console.log(bundle.sid));

Output

_18
{
_18
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"regulation_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"friendly_name": "UpdatedSubmitedFriendlyName",
_18
"status": "pending-review",
_18
"email": "email",
_18
"status_callback": "http://www.example.com",
_18
"valid_until": null,
_18
"date_created": "2019-07-30T22:29:24Z",
_18
"date_updated": "2019-07-31T01:09:00Z",
_18
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"links": {
_18
"evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_18
"item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ItemAssignments",
_18
"bundle_copies": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Copies"
_18
}
_18
}


Delete a Bundle instance

delete-a-bundle-instance page anchor
DELETE https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}

The DELETE operation is allowed for Regulatory Bundles with status of DRAFT, TWILIO_APPROVED, or TWILIO_REJECTED and have no active Long Code phone number assignments.

URI parameters
Sidtype: SID<BU>Not PII
Path Parameter

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

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

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.numbers.v2.regulatoryCompliance
_10
.bundles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.remove();


Rate this page: