Import phone number
Phone numbers
Import phone number
POST /v1/phone-numbers
POST
Import phone number
Attaches a phone number you already own to one of your agents. Nixflex supports Twilio and Telnyx.
You do not choose the carrier with a field — it is inferred from the credentials you send. Send Twilio credentials and the number is imported as a Twilio number; send a Telnyx API key and it is imported as a Telnyx number.
A Telnyx import returns
Existing integrations need no changes. If you only ever send
twilio_sid and
twilio_token, nothing about this endpoint has changed for you.Twilio
Nixflex points the number’s voice, SMS and status webhooks at the engine for you.
Telnyx
Telnyx works differently, and the difference matters. On Twilio, the webhook URL lives on the number. On Telnyx, the webhook lives on a TeXML Application, and numbers are assigned to that application. Nixflex never creates the application — you create it once in your Telnyx portal, then every number you assign to it is handled by Nixflex.1
Create a TeXML Application in your Telnyx portal
Set its voice webhook URL to
https://api.nixflex.com/telnyx-voice, method POST, webhook API version 2. Copy the application’s ID — that is your telnyx_connection_id.2
Check the codec settings
Enable G711U. Turn G722 / HD Voice off. The engine speaks mu-law only; a call that negotiates another codec will connect but carry no usable audio.
3
Import the number
Nixflex assigns the number to your TeXML application for you.
camelCase works everywhere too:
phoneNumber, twilioSid, twilioToken,
telnyxApiKey, telnyxConnectionId, agentId, customPrompt.What Telnyx numbers support today
Telnyx numbers support the same feature set as Twilio numbers, including SMS campaigns
and delivery receipts. You do not need to pick a carrier based on features - pick on
price, coverage, and whichever account you already have.
Response
201 Created:
"provider": "telnyx" and telnyx_number_id instead of twilio_number_sid.
Errors
Both carriers
Twilio
Telnyx