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

StatusCodeHandling
403ACCOUNT_MISMATCHCheck the account that owns the number
403KYC_REQUIREDComplete the applicable account verification
404NOT_FOUNDCheck the number, child ID and parent relationship
409NUMBER_NOT_ACTIVE / NUMBER_BLOCKEDRetrieve the number's current status
409ALREADY_ASSIGNEDRetrieve the current assignment before retrying
409NOT_ASSIGNEDThe number has no association to remove
502SERVICE_UNAVAILABLEOwnership verification is unavailable; retry with backoff

On this page