elevenlabs-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify ElevenLabs webhooks. Use when setting up ElevenLabs webhook handlers, debugging signature verification, or handling post-call, voice…
от hookdeck★ 104 звезды на GitHubОб этом скилле
ElevenLabs Webhooks
When to Use This Skill
- Setting up ElevenLabs webhook handlers
- Debugging signature verification failures
- Understanding ElevenLabs event types and payloads
- Processing post-call transcription, audio and call initiation failure events
- Handling voice removal notifications
- Receiving asynchronous speech-to-text and image and video generation results
Essential Code
Signature Verification (SDK — Recommended)
ElevenLabs tells you to verify the ElevenLabs-Signature header with its SDK: constructEvent in @elevenlabs/elevenlabs-js and construct_event in the elevenlabs Python package. See Webhooks: Authentication.
// Express.js / Node example
const { ElevenLabsClient } = require('@elevenlabs/elevenlabs-js');
const elevenlabs = new ElevenLabsClient({
apiKey: process.env.ELEVENLABS_API_KEY || 'webhook-only'
});
// In your webhook handler: get raw body and signature header, then:
const event = await elevenlabs.webhooks.constructEvent(rawBody, signatureHeader, process.env.ELEVENLABS_WEBHOOK_SECRET);
// event is the parsed payload; SDK throws on invalid signature
// Next.js example
import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js';
const elevenlabs = new ElevenLabsClient({
apiKey: process.env.ELEVENLABS_API_KEY || 'webhook-only'
});
export async function POST(request: NextRequest) {
const rawBody = await request.text();
const signatureHeader = request.headers.get('ElevenLabs-Signature');
try {
const event = await elevenlabs.webhooks.constructEvent(
rawBody,
signatureHeader,
process.env.ELEVENLABS_WEBHOOK_SECRET
);
// Handle event.type, event.data...
return new NextResponse('OK', { status: 200 });
} catch (error) {
return NextResponse.json({ error: (error as Error).message }, { status: 401 });
}
}
Python SDK Verification (FastAPI)
import os
from fastapi import FastAPI, Request, HTTPException
from elevenlabs import ElevenLabs
from elevenlabs.errors import BadRequestError
app = FastAPI()
elevenlabs = ElevenLabs(api_key=os.environ.get("ELEVENLABS_API_KEY") or "webhook-only")
@app.post("/webhooks/elevenlabs")
async def elevenlabs_webhook(request: Request):
raw_body = await request.body()
sig = request.headers.get("ElevenLabs-Signature") or request.headers.get("elevenlabs-signature")
if not sig:
raise HTTPException(status_code=401, detail="Missing signature header")
try:
event = elevenlabs.webhooks.construct_event(
raw_body.decode("utf-8"),
sig,
os.environ["ELEVENLABS_WEBHOOK_SECRET"]
)
# Handle event["type"], event["data"]...
return {"status": "ok"}
except BadRequestError as e:
raise HTTPException(status_code=401, detail="Invalid signature")
The SDK (Node/TypeScript and Python) verifies the signature, validates the timestamp, and returns the parsed event. In the SDKs' code the tolerance is 30 minutes and can't be changed, so a delivery retried or replayed more than 30 minutes after ElevenLabs sent it (for example through Hookdeck) fails the check. On failure it throws; return 401 and the error message.
Common Event Types
| Event | Triggered When | Common Use Cases |
|---|---|---|
post_call_transcription |
An agent call ends and analysis is complete | Save transcripts, update CRM records |
post_call_audio |
The call's full audio is ready (base64 MP3) | Archive call recordings |
call_initiation_failure |
An agent phone call fails to connect (busy, no-answer, unknown) |
Retry or mark the lead |
voice_removal_notice |
A shared voice is scheduled for removal | Switch to a suggested voice before future_removal_timestamp |
voice_removal_notice_withdrawn |
A scheduled removal is cancelled | Keep using the voice |
voice_removed |
A shared voice is removed without notice | Switch voices now |
speech_to_text_transcription |
An async transcription requested with webhook=true completes |
Store the transcript |
webhook_error |
That transcription fails (fields are top-level, no data) |
Log error_message, retry |
flows_generation |
An image or video generation completes or fails | Download content_url within an hour |
Post-call events for one conversation share data.conversation_id, so key on type plus conversation_id, or on the ElevenLabs-Webhook-Delivery-Id header, which stays the same across retries. See the Webhooks and post-call webhooks docs.
Environment Variables
ELEVENLABS_WEBHOOK_SECRET=your_webhook_secret_here
Local Development
# Start tunnel (no account needed)
npx hookdeck-cli listen 3000 elevenlabs --path /we
Установить elevenlabs-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл elevenlabs-webhooks?
Receive and verify ElevenLabs webhooks. Use when setting up ElevenLabs webhook handlers, debugging signature verification, or handling post-call, voice removal, speech-to-text or image and video generation events.
Как установить скилл elevenlabs-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл elevenlabs-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
от Anthropicautomate-this
Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
от GitHubfrom-the-other-side-vega
Patterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
от GitHubplantuml-ascii
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…
от GitHub