curl --request GET \
--url 'https://api.nixflex.com/v1/phone-numbers/%2B12025550123' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/phone-numbers/%2B12025550123', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/phone-numbers/%2B12025550123', method='GET',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method GET -Uri 'https://api.nixflex.com/v1/phone-numbers/%2B12025550123' -Headers $headers -DisableKeepAlive
# Handle $result privately.
{
"phone_number": {
"phone_number": "example",
"agent_id": null,
"source": null,
"created_at": null,
"inbound_enabled": null,
"outbound_enabled": null,
"sms_reply_enabled": null,
"web_agent_enabled": null,
"web_calls_enabled": null,
"web_functions_enabled": null,
"monitor_enabled": null,
"custom_prompt": null,
"sms_prompt": null,
"web_prompt": null,
"voice_id": null,
"speaking_rate": null,
"dtmf_enabled": null,
"require_booking_confirmation": null,
"record_call": null,
"recording_source": null,
"voicemail_leave_enabled": null,
"voicemail_message": null,
"web_calls_effective": false
}
}
Phone numbers
Get a phone number
Read one owned Nixflex phone number, its assigned agent and saved settings. Use the encoded international number in the request path.
GET
/
phone-numbers
/
{phoneNumber}
curl --request GET \
--url 'https://api.nixflex.com/v1/phone-numbers/%2B12025550123' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/phone-numbers/%2B12025550123', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/phone-numbers/%2B12025550123', method='GET',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method GET -Uri 'https://api.nixflex.com/v1/phone-numbers/%2B12025550123' -Headers $headers -DisableKeepAlive
# Handle $result privately.
{
"phone_number": {
"phone_number": "example",
"agent_id": null,
"source": null,
"created_at": null,
"inbound_enabled": null,
"outbound_enabled": null,
"sms_reply_enabled": null,
"web_agent_enabled": null,
"web_calls_enabled": null,
"web_functions_enabled": null,
"monitor_enabled": null,
"custom_prompt": null,
"sms_prompt": null,
"web_prompt": null,
"voice_id": null,
"speaking_rate": null,
"dtmf_enabled": null,
"require_booking_confirmation": null,
"record_call": null,
"recording_source": null,
"voicemail_leave_enabled": null,
"voicemail_message": null,
"web_calls_effective": false
}
}
FIXED · account A number belongs to an account and agent. On a shared agent always pass that customer’s eligible from_number.
NOT OFFERED → do this instead · number Fixed welcome_message, language, general timezone and pickup delay belong to the agent. Use Dynamic greeting and the number’s custom_prompt for its opening. Split agents for different fixed settings.
YOU CAN CHANGE · number PATCH fields below. Clearing depends on the field. Null record_call or require_booking_confirmation inherits. Use the number’s voicemail controls.
Do not send a request body.
Use E.164 and URL-encode the leading plus:
Effective voice is only a switch calculation, not a guarantee that a call can start.
Account/agent activity, billing, authorization and existing admission checks still apply.
Legacy null Web agent values retain the existing engine’s enabled interpretation.
No value is written by this request; it never changes the saved voice switch.
calcom_timezone_override, custom_prompt, voice_id, sms_reply_enabled, sms_prompt, web_prompt, speaking_rate, dtmf_enabled, require_booking_confirmation, record_call, recording_source, voicemail_leave_enabled, voicemail_message.
SCOPE · number Import an owned carrier number, assign an agent, edit its channels or remove its Nixflex connection.
For a different greeting per business, keep Dynamic greeting on (the default) and put the opening line in that number’s custom_prompt. For example, “Start every call with: Thank you for calling Oak and Stone”.
Read the compact AI rules
Get a phone number in the authenticated account.
Method: GET ·
Success: 200 ·
Scope: Owning account
The important part
- Read the number’s own settings and its assigned agent.
- A null override can inherit an agent value; it is not necessarily disabled.
Authentication
UseAuthorization: Bearer KEY_ID:KEY_SECRET for the owning account. An organisation API key has Owner authority. Personal sessions use the role rules documented in Authentication; do not treat a Member session as an API key.
Request fields
| Field | Type | Required | Default and limits |
|---|---|---|---|
phoneNumber (path) | string | Yes | The number in E.164 format. URL-encode the leading + as %2B. |
/v1/phone-numbers/%2B12025550100.
Requires an active API key/account. Numbers you do not own, unknown numbers and pending imports
all return 404 number_not_found.
The response is { "phone_number": { ... } }. Every field below is present;
unset saved overrides remain null. This is not a dump of the database row.
| Fields | Meaning |
|---|---|
phone_number, agent_id, provider, created_at | Public number, assigned public agent identifier, carrier and creation date |
source | Read-only api / dashboard; null for unknown legacy origin. Descriptive, not a permission |
inbound_enabled, outbound_enabled, sms_reply_enabled | Incoming calls, outbound call permission, automatic SMS replies |
web_agent_enabled, web_calls_enabled, web_functions_enabled, monitor_enabled | Saved website and monitoring switches |
web_calls_effective | Read-only website voice switch eligibility: saved voice ON and Web agent not OFF |
record_call, recording_source | Saved recording override and source; null inherits agent |
custom_prompt, sms_prompt, web_prompt | Separate call business profile, SMS instructions and website instructions |
voice_id, speaking_rate, dtmf_enabled, require_booking_confirmation | Saved voice, speed, keypad and booking-confirmation overrides |
voicemail_leave_enabled, voicemail_message | Saved per-number voicemail; dashboard-origin numbers use the agent policy instead |
telnyx_key_status | Safe status below; no full key or full fingerprint |
Telnyx key status
Same projection as the dashboard:fingerprint is at most 16 characters; the previous-key deadline is null when
absent/expired. set and verified describe stored key state, not provider health.
Twilio numbers normally have false/false/null/null key metadata.
To install or rotate a Telnyx signature key, send telnyx_public_key with the
import or a number PATCH. Saving the key does not verify it.
Only a valid signed callback verifies a saved key; read back this
status after the normal callback test. There is no API field to force verified.
See update and import.
Credentials, carrier account secrets, full signature keys, full fingerprints,
internal row/account/import IDs and operation tokens are never returned.
Response fields
200 returns the following shape.
| Field | Type | Meaning |
|---|---|---|
phone_number | object | Explicit safe saved settings. Null means unset, not a resolved agent value. No credentials or internal IDs. |
phone_number.phone_number | string | Always returned. |
phone_number.agent_id | string or null | Always returned. |
phone_number.source | string or null | Descriptive only, not writable or a permission. Allowed: api, dashboard, |
phone_number.created_at | string or null | Always returned. |
phone_number.inbound_enabled | boolean or null | Always returned. |
phone_number.outbound_enabled | boolean or null | Always returned. |
phone_number.sms_reply_enabled | boolean or null | Always returned. |
phone_number.web_agent_enabled | boolean or null | Always returned. |
phone_number.web_calls_enabled | boolean or null | Always returned. |
phone_number.web_functions_enabled | boolean or null | Always returned. |
phone_number.monitor_enabled | boolean or null | Always returned. |
phone_number.custom_prompt | string or null | Always returned. |
phone_number.sms_prompt | string or null | Always returned. |
phone_number.web_prompt | string or null | Always returned. |
phone_number.voice_id | string or null | Always returned. |
phone_number.speaking_rate | number or null | Always returned. |
phone_number.dtmf_enabled | boolean or null | Always returned. |
phone_number.require_booking_confirmation | boolean or null | Saved confirmation setting for supported calendar changes. A new voice booking always requires one combined read-back and one clear yes, even when false. A null number override inherits the agent. |
phone_number.record_call | boolean or null | Always returned. |
phone_number.recording_source | string or null | Allowed: provider, nixflex, |
phone_number.voicemail_leave_enabled | boolean or null | Always returned. |
phone_number.voicemail_message | string or null | Always returned. |
phone_number.web_calls_effective | boolean | Saved website voice true and Web agent not false (legacy null retains old semantics). Switch eligibility only; active/billing admission still applies. |
Example request
Production HTTP examples. Replace the placeholder identifiers with resources owned by the account. SetNIXFLEX_API_KEY privately; never print it.
curl --request GET \
--url 'https://api.nixflex.com/v1/phone-numbers/%2B12025550123' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/phone-numbers/%2B12025550123', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/phone-numbers/%2B12025550123', method='GET',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method GET -Uri 'https://api.nixflex.com/v1/phone-numbers/%2B12025550123' -Headers $headers -DisableKeepAlive
# Handle $result privately.
Example response
Illustrative response with placeholder identifiers.{
"phone_number": {
"phone_number": "example",
"agent_id": null,
"source": null,
"created_at": null,
"inbound_enabled": null,
"outbound_enabled": null,
"sms_reply_enabled": null,
"web_agent_enabled": null,
"web_calls_enabled": null,
"web_functions_enabled": null,
"monitor_enabled": null,
"custom_prompt": null,
"sms_prompt": null,
"web_prompt": null,
"voice_id": null,
"speaking_rate": null,
"dtmf_enabled": null,
"require_booking_confirmation": null,
"record_call": null,
"recording_source": null,
"voicemail_leave_enabled": null,
"voicemail_message": null,
"web_calls_effective": false
}
}
Errors
Branch onerror.code, not the wording of error.message. The envelope includes type, code, message, doc_url and details.
| Status / code | What it means | What to do |
|---|---|---|
| 400 | Invalid E.164 phone number. | Correct the named field or query using the request table before trying again. |
| 401 | Invalid key or inactive account. | Check the full account credential and API host privately; stop the retry loop. |
404 · number_not_found | The number is absent or inaccessible to this account. | Check the exact owned identifier and current resource state; do not probe another account. |
| 429 | Rate limit exceeded. | Wait at least Retry-After and use a bounded read retry. |
| 500 | Database read failed, not an empty successful result. | Keep the last result unknown and use bounded read retries; do not replace it with empty data. |