Skip to main content
POST
Buy a number

Authorizations

Authorization
string
header
required

An API key from Settings → API keys, sent as Authorization: Bearer kb_live_…. A workspace key starts kb_; a personal key starts kbp_ and acts as its owner.

Headers

Idempotency-Key
string
required

A unique key (a UUID works) for this request. Retrying with the same key returns the first answer instead of running twice.

Maximum string length: 255
Kallabot-Version
enum<string>

The API version to answer as, a date (YYYY-MM-DD). Leave it out for the current version (2026-11-07). An unknown version is refused with 400 unsupported_api_version.

Available options:
2026-11-07
Example:

"2026-11-07"

Body

application/json
e164
string
required

The number to buy, from a search.

Pattern: ^\+[1-9][0-9]{7,14}$
country_code
string
required

Its country, ISO 3166 alpha-2.

Pattern: ^[A-Z]{2}$
number_type
enum<string>
required

Its type.

Available options:
local,
mobile,
national,
toll_free
label
string | null

A label for the line.

Maximum string length: 80
agent_id
string | null

The agent that answers it.

Pattern: ^[0-9a-fA-F-]{36}$
address_requirements
enum<string> | null

The search result's address_requirements.

Available options:
none,
any,
local,
foreign
bundle_id
string | null

The verification to use; omit for the one approved match.

Pattern: ^[0-9a-fA-F-]{36}$
address_sid
string | null

The address to file, when the number needs one.

Pattern: ^AD[0-9a-f]{32}$
when_approved
boolean
default:false

The verification is still being checked: save the number and buy it on approval.

locality
string | null

The search result's city.

Maximum string length: 120

Response

Successful Response

id
string
required

The number id.

e164
string
required

The number in E.164 form.

label
string
required

Its label (the number itself when unlabelled).

source
enum<string>
required

Bought or moved in here, or on your own carrier.

Available options:
kallabot,
sip
origin
string
required

kallabot, ported, ops or byoc.

status
string
required

The stored status: provisioning, active, suspended, releasing, failed.

state
enum<string>
required

What it means for callers.

Available options:
live,
getting_ready,
releasing,
not_answering,
failed
state_detail
string
required

The state in plain words.

capabilities
NumberCapabilities · object
required
can_call_out
boolean
required

Agents can call out from it.

settings
LineRouting · object
required

How calls to it are answered.

country_code
string | null

ISO 3166 alpha-2.

number_type
string | null

The number type.

connection_name
string | null

Your SIP connection's name, for a number on one.

failure
string | null

Why a purchase failed, in plain words.

agent
LineAgent · object | null

Who answers it.

route_id
string | null

The current route; send as expected_route_id.

bundle
LineBundle · object | null

The verification it uses.

bought_at
string | null

ISO 8601 time it was added.