This API endpoint allows you to remove the assignment between a phone number and a SIP trunk. After unassignment, the number will remain in your account inventory but will no longer route calls through the previously assigned trunk.
Warning: Unassigning a number from a trunk will immediately stop routing inbound calls to that number. Ensure you have an alternative routing configuration or reassign the number to a different trunk if you want to continue receiving calls.
HTTP Request
https://api.vobiz.ai/api/v1/account/{ACCOUNT_ID}/numbers/{PHONE_NUMBER}/assignURL Encoding Notice:
Always encode the phone number in the URL. Use %2B instead of the + symbol. For example:%2B912271264217 (not +912271264217). Failure to encode properly may result in a 404 error.
Authentication Required:
- • X-Auth-ID: Your account ID (e.g., MA_BN2MZ1VV)
- • X-Auth-Token: Your account Auth Token
- • Content-Type: application/json
Note: This endpoint uses the DELETE HTTP method on the same URL path as the assignment endpoint. No request body is required.
URL Parameters
Path Parameters
| Name | Type | Description |
|---|---|---|
ACCOUNT_IDRequired | string | Your unique Vobiz account identifier (e.g., MA_BN2MZ1VV). Must match your X-Auth-ID header. |
PHONE_NUMBERRequired | string | The phone number to unassign, URL-encoded. Use %2B instead of + (e.g., %2B912271264217). |
No Request Body Required: The DELETE method does not require a request body. The phone number specified in the URL will be unassigned from its currently associated trunk.
Response
On successful unassignment, the API returns a 204 No Content status with no response body. This indicates the number has been successfully unlinked from the trunk.
HTTP/1.1 204 No Content
Date: Thu, 23 Jan 2026 07:07:24 GMT
Server: Vobiz API GatewayError Responses
{
"error": "Number not found",
"message": "The phone number could not be found or is not assigned to any trunk."
}{
"error": "invalid request",
"message": "The phone number format is invalid. Ensure it is URL-encoded correctly."
}Examples
cURL - Unassign Number from Trunk
curl -X DELETE "https://api.vobiz.ai/api/v1/account/{ACCOUNT_ID}/numbers/%2B1234567890/assign" \
-H "X-Auth-ID: {ACCOUNT_ID}" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Content-Type: application/json"Generic Template (Use Your Own Values)
curl -X DELETE "https://api.vobiz.ai/api/v1/account/{ACCOUNT_ID}/numbers/{PHONE_NUMBER}/assign" \
-H "X-Auth-ID: {ACCOUNT_ID}" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Content-Type: application/json"Quick Tips:
- • Success Code: Look for
204 No Contentresponse - • URL Encoding: Always use
%2Binstead of+in the phone number - • No Request Body: DELETE requests do not require a request body
- • Number Format: Use E.164 format with country code (e.g., +1234567890)
Important Considerations:
- • Immediate Effect: Unassignment takes effect immediately; inbound calls will no longer route
- • Number Retention: The number remains in your account inventory after unassignment
- • Reassignment: You can reassign the number to a different trunk or the same trunk later
- • Billing: Number rental charges continue until you release the number using the Unrent Number endpoint
Next Steps:
- • Reassign to a different trunk using the Assign Number endpoint
- • Or, release the number entirely using the Unrent Number endpoint
- • Verify the unassignment by listing your trunk details
- • Update your application logic to handle the routing change