Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

retell-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and verify Retell AI webhooks. Use when setting up Retell webhook handlers, debugging X-Retell-Signature verification, or handling voice call events…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Retell AI Webhooks

When to Use This Skill

  • How do I receive Retell AI webhooks?
  • How do I verify Retell webhook signatures (X-Retell-Signature)?
  • How do I handle call_ended or call_analyzed events?
  • Why is my Retell webhook signature verification failing?
  • How do I handle transcript, transfer, and chat events from Retell?

Verification (core)

Retell signs each webhook with HMAC-SHA256 using your Retell API key as the secret (only an API key with the webhook badge in the dashboard works). The signature arrives in the X-Retell-Signature header formatted as v={unix_ms_timestamp},d={hex_digest}, where the digest is computed over the raw request body concatenated with the timestamp. Always verify against the raw body, never a re-serialized JSON string.

The Python SDK ships a verify helper (client.verify(body, api_key, signature) — positional params, so the keyword form used in the FastAPI example also works). Current Node SDK releases export an async Retell.verify(body, apiKey, signature); the snippet below verifies manually with the same algorithm and no SDK dependency.

Checked against retell-sdk 6.2.25 on PyPI and npm: the Python package exposes retell.lib.webhook_auth.verify, re-exported as client.verify; the npm package exports verify and the static, async Retell.verify. The 5.x npm releases had no verify export. Check your installed version — the helper's presence and argument order have moved between releases.

const crypto = require('crypto');

// Reject signatures older than 5 minutes to prevent replay attacks
const FIVE_MINUTES_MS = 5 * 60 * 1000;

function verifyRetellSignature(rawBody, signatureHeader, apiKey) {
  const match = /^v=(\d+),d=(.*)$/.exec(signatureHeader || '');
  if (!match) return false;
  const [, timestamp, digest] = match;
  if (Math.abs(Date.now() - Number(timestamp)) > FIVE_MINUTES_MS) return false;

  const expected = crypto
    .createHmac('sha256', apiKey)
    .update(rawBody + timestamp) // raw body + timestamp, in that order
    .digest('hex');
  try {
    return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(digest));
  } catch {
    return false; // length mismatch = invalid
  }
}

Python (FastAPI) uses the official SDK instead:

from retell import Retell

client = Retell(api_key=os.environ["RETELL_API_KEY"])
# client.verify enforces the ~5 min timestamp window and returns a bool
is_valid = client.verify(raw_body.decode("utf-8"),
                         api_key=os.environ["RETELL_API_KEY"],
                         signature=signature_header)

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Common Event Types

Event Triggered When Common Use Cases
call_started A call begins Track live calls, update dashboards
call_ended A call ends, transfers or errors (no call_analysis) Persist call record, trigger follow-ups
call_analyzed Post-call analysis completes Store transcript, sentiment, summary
transcript_updated Each turn, plus a final update at the end Live captions, real-time monitoring
transfer_started A transfer is initiated Log routing, notify agents
transfer_bridged A transfer bridges successfully Update call state
transfer_cancelled A transfer is cancelled or fails to connect Revert routing state
transfer_ended The transfer leg ends Reconcile call legs
chat_started A chat session begins Track chat sessions
chat_ended A chat session ends Persist chat record
chat_analyzed Post-chat analysis completes Store chat summary, sentiment

Voice agents send call_started, call_ended and call_analyzed by default and chat agents send the three chat_* events; add the rest with the agent's webhook_events field. Payloads carry an event field plus the call object in call (chat events carry the chat object; no chat example is printed in Retell's docs). Retell retries up to 3 times if it doesn't get a 2xx within 10 seconds (webhook_timeout_ms changes the timeout). Dedupe lifecycle events on event + call_id (or chat_id); transfer events and transcript_updated repeat within a call, so key those differently.

Two other Retell webhooks use the same signature: the per-number inbound webhook (call_inbound, chat_inbound), which must answer with JSON that picks the agent or rejects the call, and alert rules (alert_triggered, alert_resolved), which are never retried.

See references/overview.md for full payload structure.

Environment Variables

# The Retell API key (must have the webhook badge). Used as the HMAC secret.
RETELL_API_KEY=key_xxxxxxxxxxxxxxxxxxxxxxxx
PORT=3000

Local Development

For local webhook testing, run the Ho

Полный SKILL.md на GitHub

Установить retell-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/api/health/route.tsexamples/nextjs/app/webhooks/retell/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл retell-webhooks?

Receive and verify Retell AI webhooks. Use when setting up Retell webhook handlers, debugging X-Retell-Signature verification, or handling voice call events like call_started, call_ended, call_analyzed, and transcript_updated.

Как установить скилл retell-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл retell-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить retell-webhooks с