# Create calls

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

> Dials.

`POST /v1/tel/calls`

> [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/calls`    |
| **Method**    | `POST`                                 |
| **Operation** | `post_tel_calls`                       |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

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

5 fields, body `application/json` (required).

| Field     | In   | Type    | Required | Description                                                                                      |
| --------- | ---- | ------- | -------- | ------------------------------------------------------------------------------------------------ |
| `agent`   | body | string  | —        | Agent hands the answered call to a Hanzo assistant by name instead of connecting it to a person. |
| `from`    | body | string  | —        | From is the number to call FROM, in E.164.                                                       |
| `record`  | body | boolean | —        | Record is a per-call flag rather than a product.                                                 |
| `to`      | body | string  | —        | To is the number to call, in E.164.                                                              |
| `webhook` | body | string  | —        | Webhook is a URL the carrier posts this call's events to as it progresses.                       |

## Response

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

`201` body — 6 fields.

| Field    | In   | Type   | Always | Description                                                                            |
| -------- | ---- | ------ | ------ | -------------------------------------------------------------------------------------- |
| `agent`  | body | string | —      | Agent names the Hanzo assistant handling the call.                                     |
| `from`   | body | string | —      | From is the calling number in E.164.                                                   |
| `id`     | body | string | —      | ID is the carrier's handle for the call — what a hangup or a lookup names.             |
| `org`    | body | string | —      | Org is the tenant the call was placed for or received by.                              |
| `status` | body | string | —      | Status is where the call is: "queued", "ringing", "answered", "completed" or "failed". |
| `to`     | body | string | —      | To is the called number in E.164.                                                      |

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

## Examples

**CLI**

```bash
hanzo tel calls 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.postTelCalls({ agent: "<agent>", from: "<from>" });
```

**.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_calls(agent="<agent>", from="<from>")
```

**.go**

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

resp, _, err := client.TelAPI.PostTelCalls(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_calls(&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).postTelCalls();
```

**HTTP**

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

**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)
