Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

ResourceAssignments subresource


(new)

Private beta

The Trust Hub API resources for Branded Calling are in private beta, and the information contained in this document is subject to change. This means that some features aren't yet implemented and others may be changed before the product is declared as generally available. Private beta products aren't covered by a Service Level Agreement (SLA).

To request access, complete the request form(link takes you to an external page).

ResourceAssignments is a subresource of the Compliance Registrations resource and represents a Twilio phone number assigned to a Compliance Registration.

See Related how-to documentation to learn the steps to use the info on this page.

(information)

API version and case formatting

This request uses the API version v1. Query parameters and response fields are snake_case, and request body parameters are PascalCase.


Create a ResourceAssignment

create-a-resourceassignment page anchor
POST https://trusthub.twilio.com/v1/Compliance/Registrations/{registration_id}/ResourceAssignments

Path parameters

path-parameters page anchor
ParameterTypeRequiredDescription
registration_idstringYesThe ID of the Compliance Registration.
Pattern: ^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34

Note: This request uses form parameters (--form). The --form option sends data as multipart/form-data, and each --form line represents a separate form parameter in the request body.

ParameterTypeRequiredDescription
TypestringYesThe resource type. The value must be phone-number.
ResourceSidstringYesThe SID of the resource.
Create a ResourceAssignmentLink to code sample: Create a ResourceAssignment
1
curl -X POST 'https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments' \
2
--form 'Type="phone-number"' \
3
--form 'ResourceSid="PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"'
4
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"date_created": "2025-10-16T10:37:49Z",
4
"registration_id": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"type": "phone-number",
8
"url": "https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
9
}

Retrieve a list of ResourceAssignments

retrieve-a-list-of-resourceassignments page anchor
GET https://trusthub.twilio.com/v1/Compliance/Registrations/{registration_id}/ResourceAssignments
ParameterTypeRequiredDescription
registration_idstringYesThe ID of the Compliance Registration.
Pattern: ^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
ParameterTypeDescription
pageSizeintegerThe maximum number of items to return in a single response.
Min: 1
Max: 1000
Default: 50
pageTokenstringA URL-safe, Base64-encoded token that specifies which page of results to return. This token contains the position information needed to retrieve the next set of results. If not specified, the API returns the first page of results.
1
curl -X GET 'https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments' \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Output

1
{
2
"meta": {
3
"first_page_url": "https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments?PageSize=50&Page=0",
4
"key": "results",
5
"next_page_url": null,
6
"page": 0,
7
"page_size": 50,
8
"previous_page_url": null,
9
"url": "https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments?PageSize=50&Page=0"
10
},
11
"results": [
12
{
13
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
14
"date_created": "2025-10-17T10:52:57Z",
15
"registration_id": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
16
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
17
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
18
"type": "phone-number",
19
"url": "https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
}
21
]
22
}

Retrieve a ResourceAssignment

retrieve-a-resourceassignment page anchor
GET https://trusthub.twilio.com/v1/Compliance/Registrations/{registration_id}/ResourceAssignments/{resource_assignment_sid}
ParameterTypeRequiredDescription
registration_idstringYesThe ID of the Compliance Registration.
Pattern: ^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
resource_assignment_sidstringYesThe ID of the ResourceAssignment.
Pattern: ^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1
curl -X GET 'https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"date_created": "2025-10-17T10:52:57Z",
4
"registration_id": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"type": "phone-number",
8
"url": "https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
9
}

Delete a ResourceAssignment

delete-a-resourceassignment page anchor
DELETE https://trusthub.twilio.com/v1/Compliance/Registrations/{registration_id}/ResourceAssignments/{resource_assignment_sid}
ParameterTypeRequiredDescription
registration_idstringYesThe ID of the Compliance Registration.
Pattern: ^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
resource_assignment_sidstringYesThe ID of the ResourceAssignment.
Pattern: ^BU[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1
curl -X DELETE 'https://trusthub.twilio.com/v1/Compliance/Registrations/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ResourceAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN