Menu

Expand
Rate this page:

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
sid<BU> Not PII

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Bundle resource.

regulation_sid
sid<RN> Not PII

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

friendly_name
string Not PII

The string that you assigned to describe the resource.

status
enum:status Not PII

The verification status of the Bundle resource.

valid_until
date_time<iso8601> Not PII

The date and time in GMT in ISO 8601 format when the resource will be valid until.

email
string Not PII

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

status_callback
url Not PII

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

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601 format.

url
url Not PII

The absolute URL of the Bundle resource.

links
uri_map Not PII

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

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
Parameters in REST API format
friendly_name
Required
post string Not PII

The string that you assigned to describe the resource.

email
Required
post string Not PII

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

status_callback
Optional
post url Not PII

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

regulation_sid
Optional
post sid<RN> Not PII

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

iso_country
Optional
post string Not PII

The ISO country code of the Bundle's phone number country ownership request.

end_user_type
Optional
post ienum:end_user_type Not PII

The type of End User of the Bundle resource.

number_type
Optional
post string Not PII

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

Example 1
Loading Code Sample...
        
        

        Create a new Bundle

        Fetch a Bundle Instance

        get
        https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}
        Parameters
        Parameters in REST API format
        sid
        Path
        get sid<BU> Not PII

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

        Example 1
        Loading Code Sample...
              
              

              Fetch a Bundle instance

              List all Bundles

              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.

              Parameters
              Parameters in REST API format
              status
              Optional
              get ienum:status Not PII

              The verification status of the Bundle resource. Please refer to Bundle Statuses for more details.

              friendly_name
              Optional
              get string Not PII

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

              regulation_sid
              Optional
              get sid<RN> Not PII

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

              iso_country
              Optional
              get string Not PII

              The 2-digit ISO country code of the Bundle's phone number country ownership request.

              number_type
              Optional
              get string Not PII

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

              has_valid_until_date
              Optional
              get boolean Not PII

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

              sort_by
              Optional
              get ienum:sort_by Not PII

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

              sort_direction
              Optional
              get ienum:sort_direction Not PII

              Default is DESC. Can be ASC or DESC.

              valid_until_date
              Optional
              get date_time_inequality<iso8601> Not 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 is the acceptable date format.

              Example 1
              Loading Code Sample...
                    
                    

                    List all Bundles

                    Update a Bundle instance

                    post
                    https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}
                    Parameters
                    Parameters in REST API format
                    sid
                    Path
                    post sid<BU> Not PII

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

                    status
                    Optional
                    post ienum:status Not PII

                    The verification status of the Bundle resource.

                    status_callback
                    Optional
                    post url Not PII

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

                    friendly_name
                    Optional
                    post string Not PII

                    The string that you assigned to describe the resource.

                    email
                    Optional
                    post string Not PII

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

                    Example 1
                    Loading Code Sample...
                          
                          

                          Update a Bundle instance

                          Delete a Bundle instance

                          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.

                          Parameters
                          Parameters in REST API format
                          sid
                          Path
                          delete sid<BU> Not PII

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

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete a Bundle Instance

                                Rate this page:

                                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.

                                Loading Code Sample...
                                      
                                      
                                      

                                      Thank you for your feedback!

                                      Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      thanks-feedback-gif