---
title: "Create call"
description: "Place an outbound call with an agent.\n\nIn test mode the magic numbers decide the outcome: +15005550001\ncompleted, +15005550002 busy, +15005550003 no-answer.\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.qomni.ai/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Qomni Agents API › Calls

`POST /calls`

Place an outbound call with an agent.

In test mode the magic numbers decide the outcome: +15005550001
completed, +15005550002 busy, +15005550003 no-answer.

## Authentication

- `apiKey`, http, header `Authorization`, format `sk_agents_{live|test}_{cell}_{body}{checksum}`

## Request body

_Required._

- `to` (`createCall.to`; string, required) — E.164, ASCII digits only.
  - pattern `^\+[1-9][0-9]{6,14}$`

## Example request

```json
{
  "to": "+15005550001"
}
```

## Code samples

### TypeScript

```typescript
import { Qomni } from "@qomni/sdk";

const qomni = new Qomni({ apiKey: process.env.QOMNI_KEY! });

const call = await qomni.agents.createCall({
  to: "+15005550001"
});
console.log(call);

```

### cURL

```bash
curl --request POST \
  --url https://api.qomni.ai/agents/v1/calls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "+15005550001"
}
'
```

### Python

```python
import requests

url = "https://api.qomni.ai/agents/v1/calls"

payload = { "to": "+15005550001" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

The call.

#### Example

```json
{
  "id": "string",
  "to": "string",
  "status": "queued",
  "livemode": true,
  "cell": "string",
  "region": "string",
  "created_at": "2019-08-24T14:15:22Z"
}
```

- `id` (`createCall.response.201.id`; string, required)
  - pattern `^call_[0-9a-z]+$`
- `to` (`createCall.response.201.to`; string, required)
- `status` (`createCall.response.201.status`; string, required)
  - one of `"queued"`, `"completed"`, `"busy"`, `"no-answer"`
- `livemode` (`createCall.response.201.livemode`; boolean, required)
- `created_at` (`createCall.response.201.created_at`; string, required)
  - format `date-time`
- `cell` (`createCall.response.201.cell`; string, optional)
- `region` (`createCall.response.201.region`; string, optional)

### 401

Missing or invalid credentials (`unauthenticated`).

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    }
  }
}
```

- `error` (`createCall.response.401.error`; object, required)
  - `code` (`createCall.response.401.error.code`; string, required) — Stable, machine-readable; each operation lists the codes it can return.
    - pattern `^[a-z][a-z0-9_]*$`
  - `message` (`createCall.response.401.error.message`; string, required) — For people; may change at any time.
  - `request_id` (`createCall.response.401.error.request_id`; string, optional)
  - `fields` (`createCall.response.401.error.fields`; map<array<string>>, optional) — Only for validation_failed, the messages per field.

### 403

Valid credentials that may not do this (`insufficient_scope`, `api_key_wrong_product`…).

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    }
  }
}
```

- `error` (`createCall.response.403.error`; object, required)
  - `code` (`createCall.response.403.error.code`; string, required) — Stable, machine-readable; each operation lists the codes it can return.
    - pattern `^[a-z][a-z0-9_]*$`
  - `message` (`createCall.response.403.error.message`; string, required) — For people; may change at any time.
  - `request_id` (`createCall.response.403.error.request_id`; string, optional)
  - `fields` (`createCall.response.403.error.fields`; map<array<string>>, optional) — Only for validation_failed, the messages per field.

### 422

The request does not match the contract (`validation_failed`).

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    }
  }
}
```

- `error` (`createCall.response.422.error`; object, required)
  - `code` (`createCall.response.422.error.code`; string, required) — Stable, machine-readable; each operation lists the codes it can return.
    - pattern `^[a-z][a-z0-9_]*$`
  - `message` (`createCall.response.422.error.message`; string, required) — For people; may change at any time.
  - `request_id` (`createCall.response.422.error.request_id`; string, optional)
  - `fields` (`createCall.response.422.error.fields`; map<array<string>>, optional) — Only for validation_failed, the messages per field.

### 429

Too many requests for this key (`rate_limited`); retry after `Retry-After` seconds.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    }
  }
}
```

- `error` (`createCall.response.429.error`; object, required)
  - `code` (`createCall.response.429.error.code`; string, required) — Stable, machine-readable; each operation lists the codes it can return.
    - pattern `^[a-z][a-z0-9_]*$`
  - `message` (`createCall.response.429.error.message`; string, required) — For people; may change at any time.
  - `request_id` (`createCall.response.429.error.request_id`; string, optional)
  - `fields` (`createCall.response.429.error.fields`; map<array<string>>, optional) — Only for validation_failed, the messages per field.


Source: https://docs.qomni.ai/agents-api/calls/create/index.md
