Hanzo

Tel

Package tel is the telecommunications surface: phone numbers, calls and messages, on whatever carrier the deployment is configured for.

Package tel is the telecommunications surface: phone numbers, calls and messages, on whatever carrier the deployment is configured for.

Base URLhttps://api.hanzo.ai
Operations10
AuthAuthorization: Bearer $HANZO_API_KEY

Quickstart

export HANZO_API_KEY=hk-...   # console.hanzo.ai → API keys

Then the first call — a read that needs nothing but the key. GET /v1/tel/calls, operation get_tel_calls:

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.

Answers 200 with object — ok.

tel

DELETE /v1/tel/calls/{id}

Ends a live call. The holding is checked before the carrier is asked, so a call belonging to another org answers 404 rather than being torn down: the carrier knows nothing about tenancy and would obey either way.

ParameterInTypeRequiredDescription
idpathstringyes

GET /v1/tel/calls

Returns this org's call history, newest first as the store gives it. Org-scoped like every read here.

POST /v1/tel/calls

Dials. An agent names a Hanzo assistant to answer it; the call is refused up front when no assistant plane is configured, because a call that connects to silence has already cost the person who answered it.

Request bodyapplication/json (required)

FieldTypeRequiredDescription
agentstring
fromstring
recordbooleanRecord is a per-call flag rather than a product.
tostring
webhookstring

GET /v1/tel/messages

Returns this org's message history. Org-scoped like every read here.

POST /v1/tel/messages

Sends one message. from must be a number this org holds -- the carrier will send from any number it routes, so without that check one tenant could originate traffic on another's number, and the bill and the reputation would follow the number rather than the sender.

Request bodyapplication/json (required)

FieldTypeRequiredDescription
fromstring
mediastring[]
textstring
tostring

DELETE /v1/tel/numbers/{id}

Checks the holding is THIS org's before it reaches the carrier. Without that read, an id belonging to another tenant would be released by whoever guessed it.

ParameterInTypeRequiredDescription
idpathstringyes

GET /v1/tel/numbers/available

Asks the carrier what is available to buy. Nothing is recorded — a search is not a holding, and treating it as one is how inventory leaks.

ParameterInTypeRequiredDescription
Countryquerystring
Areaquerystring
Typequerystring
Limitqueryinteger

GET /v1/tel/numbers

Returns the numbers this org holds. Scoped to the caller's org, so a number bought by one tenant is invisible to every other.

POST /v1/tel/numbers

Provisions with the carrier FIRST and records second. The other order records a holding that may not exist, and a number the platform believes it owns but cannot use is worse than one it failed to buy.

Request bodyapplication/json (required)

FieldTypeRequiredDescription
e164string

GET /v1/tel/summary

Counts what this org holds and has used -- numbers, calls, messages. The one read the dashboard makes, so it is three counts rather than three lists.


All Hanzo APIs · Interactive reference

How is this guide?

On this page