Bulk order (assign) numbers
num_bulk_orderProcure and assign up to 200 telephone numbers in one batch. Use a UUID idempotency key to retry safely; individual number failures don't stop the batch.
Instructions
Procure and assign up to 200 telephone numbers in one idempotent batch. THIS COSTS MONEY — each number incurs purchase and recurring charges, so confirm the list with the user first. Requires a UUID idempotency key (reused as procurement_request_id); reuse the same key to safely retry. Per-TN failures do not abort the batch. Find candidates with num_search; for a single number use num_order; to route many held numbers to a trunk use num_bulk_route. Errors: INVALID_REQUEST, MISSING_IDEMPOTENCY_KEY, INVALID_IDEMPOTENCY_KEY, TRUNK_UNOWNED (whole-request 403 on default_trunk_id).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tns | Yes | Telephone numbers to procure and assign (max 200) | |
| note | No | Free-text note recorded on the procurement request | |
| tn_metadata | No | Metadata applied to every TN in the batch (e.g. friendly_name, description fields) | |
| idempotency_key | Yes | UUID idempotency key for the batch (sent as the Idempotency-Key header; reuse it to retry the same batch safely) | |
| default_trunk_id | No | Trunk-group UUID to route all assigned numbers to (403 TRUNK_UNOWNED if not yours) | |
| per_tn_overrides | No | Map of TN -> per-number override object, overriding tn_metadata/default_trunk_id for that TN |