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.
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.
sid
type: SID<BU>The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
34
34
account_sid
type: SID<AC>The SID of the Account that created the Bundle resource.
^AC[0-9a-fA-F]{32}$
34
34
regulation_sid
type: SID<RN>The unique string of a regulation that is associated to the Bundle resource.
^RN[0-9a-fA-F]{32}$
34
34
status
type: enum<string>The verification status of the Bundle resource.
draft
pending-review
in-review
twilio-rejected
twilio-approved
provisionally-approved
valid_until
type: string<date-time>The date and time in GMT in ISO 8601 format when the resource will be valid until.
email
type: stringThe email address that will receive updates when the Bundle resource changes status.
status_callback
type: string<uri>The URL we call to inform your application of status changes.
date_created
type: string<date-time>The date and time in GMT when the resource was created specified in ISO 8601 format.
date_updated
type: string<date-time>The date and time in GMT when the resource was last updated specified in ISO 8601 format.
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. |
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.
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. |
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.
Email
type: stringRequiredThe email address that will receive updates when the Bundle resource changes status.
RegulationSid
type: SID<RN>The unique string of a regulation that is associated to the Bundle resource.
^RN[0-9a-fA-F]{32}$
34
34
EndUserType
type: enum<string>The type of End User of the Bundle resource.
individual
business
NumberType
type: stringThe type of phone number of the Bundle's ownership request. Can be local
, mobile
, national
, or toll free
.
GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}
Sid
type: SID<BU>The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
34
34
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.
Status
type: enum<string>The verification status of the Bundle resource. Please refer to Bundle Statuses for more details.
draft
pending-review
in-review
twilio-rejected
twilio-approved
provisionally-approved
FriendlyName
type: stringThe string that you assigned to describe the resource. The column can contain 255 variable characters.
RegulationSid
type: SID<RN>The unique string of a Regulation resource that is associated to the Bundle resource.
^RN[0-9a-fA-F]{32}$
34
34
IsoCountry
type: stringThe 2-digit ISO country code of the Bundle's phone number country ownership request.
NumberType
type: stringThe type of phone number of the Bundle's ownership request. Can be local
, mobile
, national
, or tollfree
.
HasValidUntilDate
type: booleanIndicates that the Bundle is a valid Bundle until a specified expiration date.
SortBy
type: enum<string>Can be valid-until
or date-updated
. Defaults to date-created
.
valid-until
date-updated
SortDirection
type: enum<string>Default is DESC
. Can be ASC
or DESC
.
ASC
DESC
ValidUntilDate
type: string<date-time>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.
ValidUntilDate<
type: string<date-time>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.
ValidUntilDate>
type: string<date-time>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.
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{Sid}
Sid
type: SID<BU>The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
34
34
Status
type: enum<string>The verification status of the Bundle resource.
draft
pending-review
in-review
twilio-rejected
twilio-approved
provisionally-approved
Email
type: stringThe email address that will receive updates when the Bundle resource changes status.
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.
Sid
type: SID<BU>The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
34
34