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.

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

account_sidtype: SID<AC>

regulation_sidtype: SID<RN>

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

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

friendly_nametype: string

The string that you assigned to describe the resource.


statustype: enum<string>

The verification status of the Bundle resource.

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

valid_untiltype: string<date-time>

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: string

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


status_callbacktype: string<uri>

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


date_createdtype: string<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_updatedtype: string<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.


urltype: string<uri>

The absolute URL of the Bundle resource.


linkstype: object<uri-map>

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: stringRequired

The string that you assigned to describe the resource.


Emailtype: stringRequired

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


StatusCallbacktype: string<uri>

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


RegulationSidtype: SID<RN>

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

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

IsoCountrytype: string

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


EndUserTypetype: enum<string>

The type of End User(link takes you to an external page) of the Bundle resource.

Possible values:
individualbusiness

NumberTypetype: string

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>
Path ParameterNot PII

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

Pattern:
^BU[0-9a-fA-F]{32}$
Min length:
34
Max length:
34
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>
Query ParameterNot PII

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: string
Query ParameterNot PII

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


RegulationSidtype: SID<RN>
Query ParameterNot PII

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

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

IsoCountrytype: string
Query ParameterNot PII

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


NumberTypetype: string
Query ParameterNot PII

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


HasValidUntilDatetype: boolean
Query ParameterNot PII

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


SortBytype: enum<string>
Query ParameterNot PII

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

Possible values:
valid-untildate-updated

SortDirectiontype: enum<string>
Query ParameterNot PII

Default is DESC. Can be ASC or DESC.

Possible values:
ASCDESC

ValidUntilDatetype: string<date-time>
Query ParameterNot PII

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>
Query ParameterNot PII

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>
Query ParameterNot PII

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: integer
Query ParameterNot PII

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

Minimum:
1

Pagetype: integer
Query ParameterNot PII

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

Minimum:
0

PageTokentype: string
Query ParameterNot PII

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>
Path ParameterNot PII

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

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

Request body parameters
Statustype: enum<string>

The verification status of the Bundle resource.

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

StatusCallbacktype: string<uri>

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


FriendlyNametype: string

The string that you assigned to describe the resource.


Emailtype: string

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>
Path ParameterNot PII

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

Pattern:
^BU[0-9a-fA-F]{32}$
Min length:
34
Max length:
34
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: