Skip to main content
Everything here lives under /callcenter/* on the same base URL as the rest of the REST API. It’s only available when the server has Telnyx configured (TELNYX_API_KEY set) — if it isn’t, every endpoint below except GET /callcenter/status returns 503. Authentication: every endpoint requires X-API-Key header or ?api_key= query parameter. Authorization: Bearer is not accepted here — see the error catalog note on why this differs from /tts/synthesize and /stt/transcribe. Billing: calls and numbers are paid from the account’s prepaid balance (Pricing and billing). Buying a number and placing calls need a first top-up: before it, those endpoints answer 402 with {"code": "billing.topup_required", "error": "…"}. With less than $0.25 of balance they answer 402 billing.insufficient_balance, and while a payment is disputed, billing.account_disputed. Account scope: every endpoint acts only on the account that owns the key. The agents and numbers you list are your own. Assign, release, dial and bulk-dial work only with numbers you own and agents you own. A number or agent that belongs to another account answers 404 (403 for a from number you don’t own), whether or not it exists. The API needs a key that belongs to an account (401 otherwise).

GET /callcenter/status — Provisioning Status

The one endpoint that works even without Telnyx configured — use it to check whether the rest of this API is usable before calling anything else.

Response


GET /callcenter/agents — List Agents

Returns every agent on the account, for populating a “route to agent” picker.

Response


GET /callcenter/numbers/search — Search Available Numbers

Search the inventory of purchasable numbers, before committing to buy one. Only local numbers are offered, in the US, Spain, the UK, Germany, France, Italy and Portugal; any other country_code returns 400. monthly_cost and upfront_cost in the results are the carrier’s own figures, not what you pay: every Lokutor number is $5 a month from your balance (phone.number_per_month in the rate card).

Query Parameters

Response

cURL


GET /callcenter/numbers — List Owned Numbers

Returns every number on the account, merged with its agent binding (if any).

Response


POST /callcenter/numbers — Buy a Number

Purchases a number you have already found via search — phone_number must be an exact result from /callcenter/numbers/search, not an arbitrary string. There’s no “buy a random number for this country” shortcut; searching first is required.
This rents the number for $5 a month from your balance: the first month is charged when you buy it, then once a month. There’s no confirmation step at the API level; the caller is the confirmation step. Buying a number needs a first top-up (402 billing.topup_required before it) and at least the first month in the balance (402 billing.insufficient_balance). A number whose own carrier price exceeds what a Lokutor number includes is refused with 400 before anything is charged — pick another local number.
If the balance cannot pay a month, the number is kept for 30 days, still answering calls while the balance allows; after that it is released, and a released number cannot be recovered. A call on a number is billed like any agent session (platform time per second and the language model per token) plus the phone line per started minute, by direction and country: a call your agent receives is priced by the country of your number, one it makes (dial, bulk dial) by the destination, landline or mobile. For example, a received call on a Spanish number is 0.035aminuteofline,about8.7¢aminuteinall;acallmadetoaSpanishmobileis0.035 a minute of line, about 8.7¢ a minute in all; a call made to a Spanish mobile is 0.105 a minute of line, about 15.7¢ in all. Every country’s rate is in Pricing and billing and in the rate card. A call to your number while the balance is under $0.25 is not answered.

Request

Response (200)

The number was purchased and is already showing as owned.

Response (202)

The order was placed, but Telnyx hasn’t finished activating it yet (the API polls briefly, then gives up and returns this instead of blocking indefinitely). It’ll show up in GET /callcenter/numbers shortly after.

cURL


POST /callcenter/numbers/{id}/assign — Assign a Number to an Agent

Rebinds an already-owned number to route inbound calls to a different agent (or, with agent_id: "", no agent).

Request

Response


DELETE /callcenter/numbers/{id} — Release a Number

Releases the number back to Telnyx and removes its agent binding. {id} is the Telnyx number ID from GET /callcenter/numbers (n.id), not the phone number itself.
This is irreversible — you lose the number.

Response


POST /callcenter/dial — Place One Outbound Call

Request

An outbound call is billed as agent time and tokens plus the line per started minute at the destination’s rate (Pricing and billing); a call nobody answers costs nothing. Placing calls needs a first top-up (402 billing.topup_required before it). You can call landlines in every supported country, and mobiles in Spain, France, Germany, Austria, the UK, Ireland, the US and Canada. Mobiles in Portugal, Italy, the Netherlands, Belgium, Luxembourg and Switzerland are above the carrier rate Lokutor allows: dialling one returns 400 with that reason, and nothing is billed.
consent_confirmed isn’t a default-true convenience flag — omit it or send false and the request is rejected with 400. It asserts you have a lawful basis to make this specific call (consent, an existing business relationship, etc.) and is written to an audit log (call_consent_log) alongside the call. It documents that you made the assertion; it doesn’t verify it. Outbound calling still needs a real consent/TCPA policy behind it — this is a gate and a paper trail, not a compliance program.

Response

cURL


POST /callcenter/bulk-dial — Create a Bulk Dial Batch

Queues up to 500 calls at once. Each row dials independently, at its own scheduled time (or immediately) — this runs server-side on a background scheduler, so it keeps going even if you close the tab, and even the “dial now” rows go through the same pacing as scheduled ones.

Request

Response


GET /callcenter/bulk-dial — List Batches

Returns every batch created by the authenticated account, most recent first, each with a live status breakdown.

Response


GET /callcenter/bulk-dial/{id} — Batch Detail

Returns one batch with every row, each annotated with its conversation summary once the call has happened.

Response

Row status is one of pending, dialing, sent, failed.
  • Errors — the Authorization: Bearer caveat that applies to every endpoint on this page
  • REST API — discovery and health endpoints
  • My First Agent — set up the agent you’ll route these calls to