# Create numbers

URL: https://docs.hanzo.ai/docs/openapi/tel/post-tel-numbers

> Provisions with the carrier FIRST and records second.

`POST /v1/tel/numbers`

> [Tel →](https://docs.hanzo.ai/docs/openapi/tel) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/tel/numbers`  |
| **Method**    | `POST`                                 |
| **Operation** | `post_tel_numbers`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

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

1 field, body `application/json` (required).

| Field  | In   | Type   | Required | Description                                                                                      |
| ------ | ---- | ------ | -------- | ------------------------------------------------------------------------------------------------ |
| `e164` | body | string | —        | E164 is the number to buy, in E.164 (a leading + and digits), exactly as the search returned it. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `201`     | tel.Number      | created |
| `default` | problem-details | refused |

`201` body — 8 fields.

| Field      | In   | Type            | Always | Description                                                                                                      |
| ---------- | ---- | --------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| `capable`  | body | string\[]       | —      | Capable is what the number can carry: any of "voice", "sms", "mms", "fax".                                       |
| `country`  | body | string          | —      | Country is the ISO 3166-1 alpha-2 code the number is issued under.                                               |
| `currency` | body | string          | —      | Currency is the ISO 4217 code Monthly is denominated in.                                                         |
| `e164`     | body | string          | —      | E164 is the number in E.164: a leading + and digits only, no spaces or dashes.                                   |
| `id`       | body | string          | —      | ID is the carrier's handle for the number, and the id every route here addresses it by.                          |
| `monthly`  | body | integer (int64) | —      | Monthly is the recurring rental in the MINOR unit of Currency (cents for USD), exactly as the carrier quoted it. |
| `org`      | body | string          | —      | Org is the tenant holding the number.                                                                            |
| `type`     | body | string          | —      | Type is what kind of number it is: "local", "national", "tollfree" or "mobile".                                  |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo tel numbers create
```

**SDK**

**.ts**

```ts
import { Configuration, TelApi } from 'hanzoai';

const api = new TelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postTelNumbers({ e164: "<e164>" });
```

**.py**

```python
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).post_tel_numbers(e164="<e164>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TelAPI.PostTelNumbers(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::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::post_tel_numbers(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TelApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new TelApi(client).postTelNumbers();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/tel/numbers \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "e164": "<e164>"
     }'
```

**MCP**

MCP reaches **tel** through the `tel` tool, which names its 10 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
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"
         }
       }
     }'
```

---

[Tel API](https://docs.hanzo.ai/docs/openapi/tel) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
