A phone number in Talqing is a number you already own at your carrier, imported onto a connected carrier account and wired up so it can carry calls. You do not buy numbers here — buy them in the carrier’s console, then import. Numbers are regional: a number imported against https://api.in.talqing.com exists only there.

See what the account owns

GET /v1/telephony/accounts/{account_id}/remote-numbers reads the carrier live, so it doubles as a check that the credential still works. already_imported marks the ones Talqing already has.

Import the ones you want

POST /v1/telephony/phone-numbers/import takes a list of E.164 numbers and brings each one in. provision defaults to true, which is what makes a number usable — leave it alone unless you have a reason.
Import is per number, not all-or-nothing. A 200 means the request was processed, not that every number landed. Read the ok on every item in items; a failed one carries error, and often a phone_number too (in error status) so you can retry it.
Two failures you will meet: If the carrier account is still connected rather than ready, importing with provision: true provisions the account once up front — so a bad credential is reported once rather than repeated per number.

Provisioning

POST /v1/telephony/phone-numbers/{number_id}/provision wires a number up at the carrier and inside Talqing so it can carry calls. Importing already does this. Call it yourself to:
  • retry a number left in error,
  • finish a number imported with provision: false,
  • bring a number back after re-enabling it.
A number moves pendingprovisioningactive. On failure it lands in error with the reason on status_message.

Assign an agent so it answers

Only voice agents can answer a phone number. A video or text agent is refused. The agent must also be published — a draft cannot answer a call that nobody is there to configure.
The number must be active, inbound-capable, and on a carrier account that is ready. Each of those is refused with the reason.
One agent per number. Assigning again replaces the previous one. POST .../unassign takes the agent off: the number stays provisioned and can still place outbound calls, and its readiness drops to needs_agent.

Republishing needs no reassignment

Republishing an assigned agent updates live routing automatically. The next call runs the new published version. You never reassign the number, and there is nothing to redeploy. See versions.

Required variables with no default are refused

An inbound call carries no request of ours, so a variable the agent declares as required with no default could never be supplied on one. Assigning is refused with:
The same state is refused from the other two directions: publishing a config like that under an already-assigned number, and rolling back to a version that predates the default. Give the variable a default, make it optional, or unassign the number. See variables.

Per-number settings

PATCH /v1/telephony/phone-numbers/{number_id}.
string
Your own name for the number, shown beside it in the dashboard.
boolean
Whether this number may place outbound calls. Refusing here is what a this number is not enabled for outbound on a dial means.
boolean
Whether this number may take incoming calls. On Exotel this is managed for you by the account’s console-setup confirmation; setting it by hand there will be overwritten the next time that confirmation changes.
string
Accepts disabled and pending only. See below.

Readiness

readiness is the field to show a person. It collapses status, capability and routing into the one answer they want, and it is computed on every read rather than stored. The underlying status is one of pending, provisioning, active, error or disabled. Prefer readiness: an active number is dead for inbound without an agent, and status alone cannot say that.

Disabling a number

PATCH with {"status": "disabled"} takes a number out of service. Routing is torn down immediately, before the row flips, so calls cannot keep arriving at a number the dashboard already shows as off.
The carrier-side unmapping is best effort. If your carrier’s API refuses it, the number is still disabled here — Talqing will not answer it — but the row comes back with a status_message saying the carrier may still be routing that number to us, and naming the console to unmap it in. Read status_message after a disable rather than assuming a clean release.
Disabling keeps inbound_agent_id, so re-enabling puts the same agent back on the line. What is dropped is the routing, which is what actually dispatches a call — a disabled number cannot answer regardless.

Re-enabling takes two calls

A disabled number does not re-provision itself.
1

Re-open it

PATCH /v1/telephony/phone-numbers/{number_id} with {"status": "pending"}. Only a disabled, error or pending number accepts this. A 409 here means another live row in your workspace already holds that E.164.
2

Provision it again

POST /v1/telephony/phone-numbers/{number_id}/provision. This rebuilds the routing, including the assignment it kept.
The same two steps bring back every number on a carrier account you re-enable: enabling the account restores the credential, not the per-number routing.

Listing numbers

GET /v1/telephony/phone-numbers, optionally filtered by account_id.

Next

Inbound calls

What the agent knows when the phone rings, and what is refused at the door.

Outbound calls

Dial out of a number you have just imported.