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 Item Assignments REST API allows you to assign End-Users and Supporting Documents to Regulatory Bundles.
The configuration of the Regulatory Bundle must pass 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.
With the correct items assigned to the Regulatory Bundle, you can submit the bundle by changing its status. After submission, the Twilio regulatory reviewers will review the Regulatory Bundle.
All the fields returned in the output JSON response compose what an Item Assignment is. The type SID<BV> is a unique ID of an Item Assignment and starts with letters BV. For more information about Twilio SIDs, please refer to Twilio's glossary on SIDs.
The unique string that we created to identify the Item Assignment resource.
^BV[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Item Assignment resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of an object bag that holds information of the different items.
^[a-zA-Z]{2}[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The date and time in GMT when the resource was created specified in ISO 8601 format.
The absolute URL of the Identity resource.
POST https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments
To provision or port a phone number on or to Twilio, you will need to assign an End-User to a Regulatory Bundle. The Regulation may need one or more Supporting Documents assignments to a Regulatory Bundle. The Supporting Documents may need an image uploaded as proof.
The Item Assignments to a Regulatory Bundle associate a container with other objects that follows a Regulation.
The Regulations are unique by the phone number's country, type, and end-user type.
The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
The SID of an object bag that holds information of the different items.
^[a-zA-Z]{2}[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createItemAssignment() {11const itemAssignment = await client.numbers.v2.regulatoryCompliance12.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.itemAssignments.create({14objectSid: "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",15});1617console.log(itemAssignment.sid);18}1920createItemAssignment();
1{2"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"object_sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",6"date_created": "2019-07-31T02:34:41Z",7"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"8}
GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}
The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique string that we created to identify the Identity resource.
^BV[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchItemAssignment() {11const itemAssignment = await client.numbers.v2.regulatoryCompliance12.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.itemAssignments("BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.fetch();1516console.log(itemAssignment.sid);17}1819fetchItemAssignment();
1{2"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"object_sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"date_created": "2019-07-31T02:34:41Z",7"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"8}
GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments
The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listItemAssignment() {11const itemAssignments = await client.numbers.v2.regulatoryCompliance12.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.itemAssignments.list({ limit: 20 });1415itemAssignments.forEach((i) => console.log(i.sid));16}1718listItemAssignment();
1{2"results": [],3"meta": {4"page": 0,5"page_size": 50,6"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments?PageSize=50&Page=0",7"previous_page_url": null,8"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments?PageSize=50&Page=0",9"next_page_url": null,10"key": "results"11}12}
DELETE https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}
The unique string that we created to identify the Bundle resource.
^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique string that we created to identify the Identity resource.
^BV[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteItemAssignment() {11await client.numbers.v2.regulatoryCompliance12.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.itemAssignments("BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.remove();15}1617deleteItemAssignment();