Bundles Resource
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
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 in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Bundle resource. |
account_sid
|
The SID of the Account that created the Bundle resource. |
regulation_sid
|
The unique string of a regulation that is associated to the Bundle resource. |
friendly_name
|
The string that you assigned to describe the resource. |
status
|
The verification status of the Bundle resource. |
valid_until
|
The date and time in GMT in ISO 8601 format when the resource will be valid until. |
email
|
The email address that will receive updates when the Bundle resource changes status. |
status_callback
|
The URL we call to inform your application of status changes. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
url
|
The absolute URL of the Bundle resource. |
links
|
The URLs of the Assigned Items of the Bundle resource. |
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. |
Status Callback
The status callback configuration of the Regulatory Bundle will send a POST request to the URL specified. Everytime the Regulatory Bundle changes status, Twilio will send a request to the status callback webhook.
Field | Description |
Account SID | The SID of the Account that created the Bundle resource. |
Bundle SID | The unique string that we created to identify the Bundle resource. |
Status |
The verification status of the Bundle resource. See Bundle Statuses for a list of possible values. |
Failure Reason | The description(s) of what incorrect configuration the Regulatory Bundle currently has. |
Create a Bundle
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
Parameters in REST API format | |
---|---|
friendly_name
Required
|
The string that you assigned to describe the resource. |
email
Required
|
The email address that will receive updates when the Bundle resource changes status. |
status_callback
Optional
|
The URL we call to inform your application of status changes. |
regulation_sid
Optional
|
The unique string of a regulation that is associated to the Bundle resource. |
iso_country
Optional
|
The ISO country code of the Bundle's phone number country ownership request. |
end_user_type
Optional
|
The type of End User of the Bundle resource. |
number_type
Optional
|
The type of phone number of the Bundle's ownership request. Can be |
Example 1
Fetch a Bundle Instance
https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
The unique string that we created to identify the Bundle resource. |
Example 1
List all Bundles
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.
Parameters
Parameters in REST API format | |
---|---|
status
Optional
|
The verification status of the Bundle resource. Please refer to Bundle Statuses for more details. |
friendly_name
Optional
|
The string that you assigned to describe the resource. The column can contain 255 variable characters. |
regulation_sid
Optional
|
The unique string of a Regulation resource that is associated to the Bundle resource. |
iso_country
Optional
|
The 2-digit ISO country code of the Bundle's phone number country ownership request. |
number_type
Optional
|
The type of phone number of the Bundle's ownership request. Can be |
has_valid_until_date
Optional
|
Indicates that the Bundle is a valid Bundle until a specified expiration date. |
sort_by
Optional
|
Can be |
sort_direction
Optional
|
Default is |
valid_until_date
Optional
|
Date to filter Bundles having their |
Example 1
Update a Bundle instance
https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
The unique string that we created to identify the Bundle resource. |
status
Optional
|
The verification status of the Bundle resource. |
status_callback
Optional
|
The URL we call to inform your application of status changes. |
friendly_name
Optional
|
The string that you assigned to describe the resource. |
email
Optional
|
The email address that will receive updates when the Bundle resource changes status. |
Example 1
Delete a Bundle instance
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.
Parameters
Parameters in REST API format | |
---|---|
sid
Path
|
The unique string that we created to identify the Bundle resource. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.