Account
Assign phone numbers
Associate a parent-owned number with a child account and list its assignments.
Associate an existing parent-owned number with a sub-account. The number must be active, unblocked and owned by the parent. The child must be active and belong to that parent, and the parent account must be enabled.
Assign a number
curl -X POST "https://api.tryvox.io/v1/account/$PARENT_ACCOUNT_AUTH_ID/numbers/$NUMBER_E164/assign-subaccount" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sub_account_id":"7acda613-82f7-4f32-9684-b8f91d21eac9"}'sub_account_id accepts the child UUID or Auth ID. New assignments store the child UUID. Returns 200 OK with the updated number object in data.
Assignment associates the number with the child record. It does not purchase a number, change its billing owner, submit KYC or configure inbound routing. Use number configuration to attach an application or SIP trunk.
List assigned numbers
curl "https://api.tryvox.io/v1/account/$PARENT_ACCOUNT_AUTH_ID/numbers?sub_account_id=$SUBACCOUNT_ID&page=1&per_page=20" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN"The filter matches the stored sub_account_id. Use the UUID returned by a new assignment; for an existing assignment, use the value returned on its number record.
Remove an assignment
curl -X DELETE "https://api.tryvox.io/v1/account/$PARENT_ACCOUNT_AUTH_ID/numbers/$NUMBER_E164/assign-subaccount" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN"Returns 200 OK with the updated number. Removing the association does not release the number or stop rental charges.
Errors
| Status | Code | Handling |
|---|---|---|
403 | ACCOUNT_MISMATCH | Check the account that owns the number |
403 | KYC_REQUIRED | Complete the applicable account verification |
404 | NOT_FOUND | Check the number, child ID and parent relationship |
409 | NUMBER_NOT_ACTIVE / NUMBER_BLOCKED | Retrieve the number's current status |
409 | ALREADY_ASSIGNED | Retrieve the current assignment before retrying |
409 | NOT_ASSIGNED | The number has no association to remove |
502 | SERVICE_UNAVAILABLE | Ownership verification is unavailable; retry with backoff |