> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

**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. `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](https://docs.nixflex.com/ai-rules.md#phone-numbers)

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.

[Business guide](https://docs.nixflex.com/guides/business/phone-numbers.md) · [Developer guide](https://docs.nixflex.com/guides/developer/phone-numbers.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Authentication

Use `Authorization: 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](https://docs.nixflex.com/api-reference/authentication.md); 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. |

Do not send a request body.

Use E.164 and URL-encode the leading plus: `/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 |

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.

### 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](https://docs.nixflex.com/api-reference/phone-numbers/update.md) and [import](https://docs.nixflex.com/api-reference/phone-numbers/import.md).

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. Set `NIXFLEX_API_KEY` privately; never print it.

```bash cURL (Bash) theme={"dark"}
curl --request GET \
  --url 'https://api.nixflex.com/v1/phone-numbers/%2B12025550123' \
  --header "Authorization: Bearer $NIXFLEX_API_KEY"
```

```javascript Node (HTTP) theme={"dark"}
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.
```

```python Python (HTTP) theme={"dark"}
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.
```

```powershell PowerShell (HTTP) theme={"dark"}
$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.

```json Response theme={"dark"}
{
  "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 on `error.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. |

## Retry and idempotency

Use bounded retries only for temporary read failures. Keep the same filters while paging. See [retry rules](https://docs.nixflex.com/api-reference/retries.md).

## Related endpoints

* [List phone numbers](https://docs.nixflex.com/api-reference/phone-numbers/list.md)
* [Import a phone number](https://docs.nixflex.com/api-reference/phone-numbers/import.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md#error-envelope)


## OpenAPI

````yaml api-reference/public.openapi.json GET /phone-numbers/{phoneNumber}
openapi: 3.1.0
info:
  title: Nixflex public API
  version: 1.0.0
  description: >-
    Nixflex API reference for agents, calls, messaging, knowledge, organisations
    and integrations. Authenticate with the owning account and follow each
    operation’s permissions, response and retry contract.
servers:
  - url: https://api.nixflex.com/v1
security:
  - bearerAuth: []
paths:
  /phone-numbers/{phoneNumber}:
    get:
      tags:
        - Phone numbers
      summary: Get a phone number
      operationId: getPhoneNumber
      parameters:
        - name: phoneNumber
          in: path
          required: true
          description: The number in E.164 format. URL-encode the leading + as %2B.
          schema:
            type: string
            example: '+447446466847'
      responses:
        '200':
          description: Saved safe settings, not inherited values.
          content:
            application/json:
              schema:
                type: object
                required:
                  - phone_number
                properties:
                  phone_number:
                    type: object
                    description: >-
                      Explicit safe saved settings. Null means unset, not a
                      resolved agent value. No credentials or internal IDs.
                    additionalProperties: false
                    required:
                      - phone_number
                      - agent_id
                      - source
                      - created_at
                      - inbound_enabled
                      - outbound_enabled
                      - sms_reply_enabled
                      - web_agent_enabled
                      - web_calls_enabled
                      - web_functions_enabled
                      - monitor_enabled
                      - custom_prompt
                      - sms_prompt
                      - web_prompt
                      - voice_id
                      - speaking_rate
                      - dtmf_enabled
                      - require_booking_confirmation
                      - record_call
                      - recording_source
                      - voicemail_leave_enabled
                      - voicemail_message
                      - web_calls_effective
                    properties:
                      phone_number:
                        type: string
                      agent_id:
                        type:
                          - string
                          - 'null'
                      source:
                        type:
                          - string
                          - 'null'
                        enum:
                          - api
                          - dashboard
                          - null
                        readOnly: true
                        description: Descriptive only, not writable or a permission.
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      inbound_enabled:
                        type:
                          - boolean
                          - 'null'
                      outbound_enabled:
                        type:
                          - boolean
                          - 'null'
                      sms_reply_enabled:
                        type:
                          - boolean
                          - 'null'
                      web_agent_enabled:
                        type:
                          - boolean
                          - 'null'
                      web_calls_enabled:
                        type:
                          - boolean
                          - 'null'
                      web_functions_enabled:
                        type:
                          - boolean
                          - 'null'
                      monitor_enabled:
                        type:
                          - boolean
                          - 'null'
                      custom_prompt:
                        type:
                          - string
                          - 'null'
                      sms_prompt:
                        type:
                          - string
                          - 'null'
                      web_prompt:
                        type:
                          - string
                          - 'null'
                      voice_id:
                        type:
                          - string
                          - 'null'
                      speaking_rate:
                        type:
                          - number
                          - 'null'
                      dtmf_enabled:
                        type:
                          - boolean
                          - 'null'
                      require_booking_confirmation:
                        type:
                          - boolean
                          - 'null'
                        description: >-
                          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.
                      record_call:
                        type:
                          - boolean
                          - 'null'
                      recording_source:
                        type:
                          - string
                          - 'null'
                        enum:
                          - provider
                          - nixflex
                          - null
                      voicemail_leave_enabled:
                        type:
                          - boolean
                          - 'null'
                      voicemail_message:
                        type:
                          - string
                          - 'null'
                      web_calls_effective:
                        type: boolean
                        readOnly: true
                        description: >-
                          Saved website voice true and Web agent not false
                          (legacy null retains old semantics). Switch
                          eligibility only; active/billing admission still
                          applies.
        '400':
          description: Invalid E.164 phone number.
        '401':
          description: Invalid key or inactive account.
        '404':
          description: >-
            Missing, foreign, pending or internal browser identity;
            number_not_found.
        '429':
          description: Rate limit exceeded.
        '500':
          description: Database read failed, not an empty successful result.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A
        verified personal dashboard Bearer session may be used where the
        operation documents role-based access.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.