Trunks
Assign Number to Trunk
Assign a phone number to a Vobiz SIP trunk so all inbound calls to that DID route through the designated trunk - supports global and India DID numbers.
POST
Assign Number to Trunk
Authentication required:
X-Auth-ID- Your account Auth IDX-Auth-Token- Your account Auth TokenContent-Type: application/json
Important: The phone number must already be in your account inventory. You can purchase numbers using the Purchase Number endpoint before assigning them to a trunk.
URL Parameters
| Field | Type | Required | Description |
|---|---|---|---|
auth_id | string | Yes | Your unique Vobiz account identifier (e.g., MA_BN2MZ1VV). Must match your X-Auth-ID header. |
PHONE_NUMBER | string | Yes | Phone number to assign, URL-encoded. Use %2B instead of + (e.g., %2B912271264217). |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
trunk_group_id | string (UUID) | Yes | UUID of the trunk to assign this phone number to (e.g., e3e55a78-1234-5678-90ab-cdef12345678). |
Request Body Example
Examples
Response
On successful assignment, the API returns204 No Content with no response body. Verify the assignment by retrieving the trunk or listing your numbers.
Success Response - 204 No Content
Error Responses
Error Response - 404 Not Found (Number not in inventory)
Error Response - 400 Bad Request (Number already assigned)
Reassigning a number. If a number is already assigned to a trunk, the assign call returns
400. Unassign it first with Unassign Number, then assign it to the new trunk.Next Steps:
- Verify the assignment by retrieving your trunk details
- Configure your trunk’s inbound routing rules
- Test inbound calls to the assigned number
- To remove the assignment, use the Unassign Number endpoint
Authorizations
Your Vobiz account Auth ID
Your Vobiz account Auth Token
Path Parameters
Your account Auth ID
Example:
"MA_XXXXXX"
The phone number to assign, URL-encoded (use %2B instead of +).
Example:
"%2B912271264217"
Body
application/json
The UUID of the trunk to assign this number to.
Example:
"e3e55a78-1234-5678-90ab-cdef12345678"
Response
Number assigned to trunk