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

# Поставить исходящий звонок в очередь

> POST /v1/pulso/calls

Поставьте звонок PULSO в очередь с опубликованным сценарием. Повторяйте Idempotency-Key только для того же запроса; неизвестные поля тела отклоняются.

> [!NOTE]
>
> Scope: `pulso.calls.write`. [Аутентификация](https://docs.nottoad.com/ru/api/authentication.md).

## Заголовки

**X-Api-Key** `string` *required*

Клиентский API-ключ. Храните его на сервере.

**Idempotency-Key** `string` *required*

1–255 символов: A–Z, a–z, 0–9, точка, подчёркивание, двоеточие или дефис.

## Тело запроса

**scenario** `string` *required*

Стабильный slug сценария.

**phone** `string` *required*

Номер назначения в формате E.164, например +15555550100.

**scenarioVersion** `integer`

Номер опубликованной версии от 1; если опущен, используется активная версия.

**customer** `object`

Необязательные данные клиента.
`name`, `locale`.

**variables** `object`

Данные согласно входной схеме сценария.

**externalRef** `string | null`

Ваш внешний идентификатор.

**metadata** `object`

Дополнительные пары ключ/значение, возвращаемые с звонком и его событиями.

## Ответ · 202

**callId** `string`

ID ресурса звонка.

**state** `string`

Начальное состояние команды.

**scenario** `string`

Slug сценария.

**scenarioVersion** `integer`

Используемая опубликованная версия.

> [!TIP]
>
> Ответ 202 содержит заголовок Location с адресом ресурса звонка. В ошибках есть `error.code`, `error.message` и `error.requestId`.

## Частые ошибки

| HTTP | Значение | code |
| - | - | - |
| `400` | Нет ключа идемпотентности. | `IDEMPOTENCY_KEY_REQUIRED` |
| `400` | Некорректное тело или неизвестное поле. | `VALIDATION_ERROR / INVALID_REQUEST` |
| `401` | Недействительный клиентский API-ключ или нет права PULSO agent calls. | `UNAUTHORIZED` |
| `403` | Недостаточно прав; details.requiredScope указывает нужный scope. | `FORBIDDEN` |
| `403` | В тарифе нет линий для звонков. | `CALLS_NOT_IN_PLAN` |
| `404` | Сценарий не найден. | `SCENARIO_NOT_FOUND` |
| `409` | Ключ повторён для другого запроса. | `IDEMPOTENCY_CONFLICT` |
| `409` | Сценарий не активен. | `SCENARIO_NOT_ACTIVE` |
| `410` | Версия выведена из использования. | `SCENARIO_VERSION_RETIRED` |
| `422` | Некорректные входные данные сценария. | `VARIABLES_INVALID` |
| `429` | Лимит запросов; Retry-After может указать секунды. | `RATE_LIMITED` |
| `503` | Временная недоступность приёма звонков; Retry-After — 60 секунд. | `CALL_ADMISSION_UNAVAILABLE` |

```bash cURL theme={null}
curl -X POST 'https://console.nurrel.io/v1/pulso/calls' \
  -H 'X-Api-Key: YOUR_CUSTOMER_KEY' \
  -H 'Idempotency-Key: example-call-001' \
  -H 'Content-Type: application/json' \
  --data '{"scenario":"appointment-demo","phone":"+15555550100","customer":{"name":"Example Customer","locale":"ru"},"externalRef":"example-001"}'
```

```javascript JavaScript theme={null}
const response = await fetch('https://console.nurrel.io/v1/pulso/calls', {
  method: 'POST',
  headers: { 'X-Api-Key': process.env.NURREL_API_KEY, 'Idempotency-Key': 'example-call-001', 'Content-Type': 'application/json' },
  body: JSON.stringify({"scenario": "appointment-demo", "phone": "+15555550100", "customer": {"name": "Example Customer", "locale": "ru"}, "externalRef": "example-001"}),
});
```

```python Python theme={null}
import os, requests
response = requests.request('POST', 'https://console.nurrel.io/v1/pulso/calls',
    headers={ 'X-Api-Key': os.environ['NURREL_API_KEY'], 'Idempotency-Key': 'example-call-001' },
    json={'scenario': 'appointment-demo', 'phone': '+15555550100', 'customer': {'name': 'Example Customer', 'locale': 'ru'}, 'externalRef': 'example-001'})
```

```json Ответ theme={null}
{
  "callId": "550e8400-e29b-41d4-a716-446655440000",
  "state": "pending",
  "scenario": "appointment-demo",
  "scenarioVersion": 1
}
```

## Что дальше

[Откройте обзор API PULSO](https://docs.nottoad.com/ru/api/pulso-calls.md) или [события и вебхуки](https://docs.nottoad.com/ru/api/pulso-events.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.