Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Item Assignments 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 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.


Item Assignments Response Properties

item-assignments-response-properties page anchor

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.

Property nameTypePIIDescription
sidSID<BV>
Not PII

The unique string that we created to identify the Item Assignment resource.

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

bundle_sidSID<BU>

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

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

account_sidSID<AC>

The SID of the Account that created the Item Assignment resource.

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

object_sidSID

The SID of an object bag that holds information of the different items.

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

urlstring<uri>

The absolute URL of the Identity resource.


Assign Items to a Regulatory Bundle

assign-items-to-a-regulatory-bundle page anchor
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.

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
BundleSidSID<BU>required

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

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

The SID of an object bag that holds information of the different items.

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

Assign Items to a Bundle

assign-items-to-a-bundle page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function createItemAssignment() {
_20
const itemAssignment = await client.numbers.v2.regulatoryCompliance
_20
.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.itemAssignments.create({
_20
objectSid: "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
});
_20
_20
console.log(itemAssignment.sid);
_20
}
_20
_20
createItemAssignment();

Output

_10
{
_10
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"object_sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}


Retrieve an Item Assignment instance

retrieve-an-item-assignment-instance page anchor
GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}

Property nameTypeRequiredPIIDescription
BundleSidSID<BU>required

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

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

SidSID<BV>required

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

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

Retrieve an Item Assignment instance

retrieve-an-item-assignment-instance-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function fetchItemAssignment() {
_19
const itemAssignment = await client.numbers.v2.regulatoryCompliance
_19
.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.itemAssignments("BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.fetch();
_19
_19
console.log(itemAssignment.sid);
_19
}
_19
_19
fetchItemAssignment();

Output

_10
{
_10
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"object_sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}


GET https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments

Property nameTypeRequiredPIIDescription
BundleSidSID<BU>required

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

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

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

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
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_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 = twilio(accountSid, authToken);
_18
_18
async function listItemAssignment() {
_18
const itemAssignments = await client.numbers.v2.regulatoryCompliance
_18
.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.itemAssignments.list({ limit: 20 });
_18
_18
itemAssignments.forEach((i) => console.log(i.sid));
_18
}
_18
_18
listItemAssignment();

Output

_12
{
_12
"results": [],
_12
"meta": {
_12
"page": 0,
_12
"page_size": 50,
_12
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments?PageSize=50&Page=0",
_12
"previous_page_url": null,
_12
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments?PageSize=50&Page=0",
_12
"next_page_url": null,
_12
"key": "results"
_12
}
_12
}


Delete an Item Assignment

delete-an-item-assignment page anchor
DELETE https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}

Property nameTypeRequiredPIIDescription
BundleSidSID<BU>required

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

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

SidSID<BV>required

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

Pattern: ^BV[0-9a-fA-F]{32}$Min length: 34Max length: 34
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_17
// Download the helper library from https://www.twilio.com/docs/node/install
_17
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_17
_17
// Find your Account SID and Auth Token at twilio.com/console
_17
// and set the environment variables. See http://twil.io/secure
_17
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_17
const authToken = process.env.TWILIO_AUTH_TOKEN;
_17
const client = twilio(accountSid, authToken);
_17
_17
async function deleteItemAssignment() {
_17
await client.numbers.v2.regulatoryCompliance
_17
.bundles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_17
.itemAssignments("BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_17
.remove();
_17
}
_17
_17
deleteItemAssignment();


Rate this page: