Skip to main content
GET
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 Get number usage in the authenticated account.
Method: GET ·
Success: 200 ·
Scope: Owning account
The important part
  • These usage counters describe the selected owned number.
  • Do not use counters as an invoice or a complete charge ledger.

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; do not treat a Member session as an API key.

Request fields

Do not send a request body. These examples require Node/CLI 0.11.0 or later, Python 0.4.0 or later and MCP 0.5.0 or later. This is a read-only request. Use an active API key. Ownership comes only from that key, never a request field. URL-encode the plus in E.164: /v1/phone-numbers/%2B12025550123/usage. Numbers you do not own, unknown numbers and pending imports return 404 number_not_found. Both API-imported and dashboard-imported owned numbers work.

Period and time zone

  • period: today, 7, 14, 30, 90, or all (default).
  • time_zone: an IANA zone such as Europe/London, or UTC (default).
  • Finite periods start at local midnight, including today: 7 means today plus six earlier calendar dates, not the previous 168 hours. DST is respected.
  • period_start is inclusive; null for all retained history. period_end is the inclusive server query cutoff, not a future day-end. All returned ISO times identify absolute instants; an offset may differ from the selected zone.
  • Use the dashboard browser’s zone to compare. Requests at different instants can differ if new activity arrives, costs settle or retention removes history.
  • Duplicate parameters, unknown parameters and invalid values return 400.

Response and meaning

The envelope is { "usage": { ... } }. It includes the number, period, zone, boundaries and these fields: duration_unit is milliseconds; start_inclusive and end_inclusive are true. For display, round minutes to at most two decimals and cost to two decimals, as the dashboard does. Do not recompute cost from minutes or a current price. Retention can reduce these totals. Calls and SMS are attributed by owner plus business E.164 number (outbound = from; otherwise = to), exactly like the dashboard. Same-owner re-import can therefore include that owner’s older call/SMS history; another owner’s rows are excluded. Web chats additionally require the current number-row generation; old/unbound generations are excluded. This is not lifetime carrier usage, a payment statement, a ledger, or a guarantee that a call is settled. No raw calls, messages, recordings, credentials or internal account IDs are returned.

Query budget and failures

The aggregate has a three-second database RPC budget and a five-second engine wait limit, with number/owner/time indexes. It returns full totals or 503 usage_unavailable, never a partial aggregate or false zero. Try a smaller period or retry later; do not loop aggressively. The normal API rate limit applies.

Client method examples

The existing read-only MCP list_phone_numbers tool has an additive usage mode:
Do not combine usage with list filters/paging. Without usage:true, the existing list/single-settings tool behaviour remains unchanged. No new credentials or permissions are needed. Browser RPC grants have not been expanded.

Response fields

200 returns the following shape.

Example request

Production HTTP examples. Replace the placeholder identifiers with resources owned by the account. Set NIXFLEX_API_KEY privately; never print it.

Example response

Illustrative response with placeholder identifiers.

Errors

Branch on error.code, not the wording of error.message. The envelope includes type, code, message, doc_url and details.

Retry and idempotency

Use bounded retries only for temporary read failures. Keep the same filters while paging. See retry rules.

Authorizations

Authorization
string
header
required

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.

Path Parameters

phoneNumber
string
required

Owned public E.164 number. URL-encode the plus.

Pattern: ^\+[1-9][0-9]{6,14}$

Query Parameters

period
enum<string>
default:all

Calendar days including today, not rolling hours. All means retained history.

Available options:
today,
7,
14,
30,
90,
all
time_zone
string
default:UTC

IANA zone such as Europe/London, or UTC. Match the dashboard browser zone.

Maximum string length: 64

Response

Complete aggregate; never truncated partial totals.

usage
object
required