OpenapiTel
Asks the carrier what is available to buy.
Asks the carrier what is available to buy.
GET /v1/tel/numbers/available
| Address | https://api.hanzo.ai/v1/tel/numbers/available |
| Method | GET |
| Operation | get_tel_numbers_available |
| Auth | Authorization: Bearer $HANZO_API_KEY |
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.
Request
4 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
Country | query | string | — | |
Area | query | string | — | |
Type | query | string | — | |
Limit | query | integer | — |
Response
| Status | Body | Meaning |
|---|---|---|
200 | numberList | ok |
200 body — 9 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | Number[] | — | Data is the numbers, and which numbers depends on the route: a search answers what the carrier has available, a list answers what this org already holds. |
data[].capable | body | string[] | — | Capable is what the number can carry: any of "voice", "sms", "mms", "fax". |
data[].country | body | string | — | Country is the ISO 3166-1 alpha-2 code the number is issued under. |
data[].currency | body | string | — | Currency is the ISO 4217 code Monthly is denominated in. |
data[].e164 | body | string | — | E164 is the number in E.164: a leading + and digits only, no spaces or dashes. |
data[].id | body | string | — | ID is the carrier's handle for the number, and the id every route here addresses it by. |
data[].monthly | body | integer | — | Monthly is the recurring rental in the MINOR unit of Currency (cents for USD), exactly as the carrier quoted it. |
data[].org | body | string | — | Org is the tenant holding the number. |
data[].type | body | string | — | Type is what kind of number it is: "local", "national", "tollfree" or "mobile". |
Failure carries the platform error shape — see Errors.
Examples
hanzo tel numbers availableimport { Configuration, TelApi } from 'hanzoai';
const api = new TelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getTelNumbersAvailable();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TelApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TelApi(client).get_tel_numbers_available()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.TelAPI.GetTelNumbersAvailable(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, tel_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = tel_api::get_tel_numbers_available(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TelApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new TelApi(client).getTelNumbersAvailable();curl https://api.hanzo.ai/v1/tel/numbers/available \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches tel through the tel tool, which names its 10 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_tel_calls"
}
}
}'How is this guide?