Add phone numbers to a DIR
Register phone numbers under a DIR. The enterprise is resolved server-side from the DIR id. Same body, failure modes, and batch semantics whichever path form you use.
Pricing: This is a billable action. See https://telnyx.com/pricing/numbers for current pricing.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The DIR id. Lowercase UUID.
"16635d38-75a6-4481-82e8-69af60e05011"
Body
1–15 phone numbers in E.164 format. 10-digit US numbers are auto-prefixed with 1.
1 - 15 elementsSupporting documents covering this batch. At least one entry with document_type: letter_of_authorization is required - the LOA authorises Telnyx to register these numbers under the DIR. Each document_id must come from the Telnyx Documents API. Additional document types (e.g. business registration) may be included alongside the LOA.
1 - 20 elementsResponse
Bulk-add response. Inspect both added and errors.
Bulk-add success response (HTTP 201). All numbers in the request were accepted into a single new batch. Every entry in data shares the same batch_id - read it from any element to obtain the batch id for subsequent GET .../phone_number_batches/{batch_id} calls. If any number in the request fails (schema-invalid, not in inventory, already attached to another DIR, etc.) the entire request is rejected with HTTP 400 and the canonical Telnyx error envelope; the success body described here is therefore an all-or-nothing payload.
Phone numbers accepted into the new batch. List order mirrors the request order. Each element shares the same batch_id.