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"}'
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"}),
});
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'})
{
"callId": "550e8400-e29b-41d4-a716-446655440000",
"state": "pending",
"scenario": "appointment-demo",
"scenarioVersion": 1
}
API PULSO: звонки
Поставить исходящий звонок в очередь
POST /v1/pulso/calls
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"}'
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"}),
});
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'})
{
"callId": "550e8400-e29b-41d4-a716-446655440000",
"state": "pending",
"scenario": "appointment-demo",
"scenarioVersion": 1
}
Поставьте звонок PULSO в очередь с опубликованным сценарием. Повторяйте Idempotency-Key только для того же запроса; неизвестные поля тела отклоняются.
Scope:
pulso.calls.write. Аутентификация.Заголовки
Тело запроса
Ответ · 202
Ответ 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 |
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"}'
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"}),
});
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'})
{
"callId": "550e8400-e29b-41d4-a716-446655440000",
"state": "pending",
"scenario": "appointment-demo",
"scenarioVersion": 1
}