/elevenlabs-pack:elevenlabs-webhooks-eventsfrom elevenlabs-pack
Implements ElevenLabs webhook HMAC signature verification and event handling for transcription, call recording, and agent conversation events. Use when setting up webhook endpoints.
Ships in elevenlabs-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
ElevenLabs webhooks send HTTP POST notifications when async operations complete: transcription completion, post-call data from Conversational AI agents, and call initiation failures. Every delivery is signed with an HMAC-SHA256 signature you must verify before processing. This skill builds a secure endpoint that verifies signatures, routes events by type, and acks fast to avoid auto-disable.
The full, copy-ready code for each step lives in references/implementation.md; per-event handlers live in references/examples.md. The high-level workflow:
"<timestamp>.<raw_body>", using a timing-safe compare and a 5-minute replay window. See the full verifier.200 immediately, then process asynchronously. See the Express handler.| Event Type | Payload | When Triggered |
|---|---|---|
post_call_transcription | Full conversation transcript, analysis, metadata | After Conversational AI call ends |
post_call_audio | Base64-encoded call audio, minimal metadata | After call ends (if audio recording enabled) |
call_initiation_failure | Failure reason, metadata | When an outbound call fails to connect |
speech_to_text.completed | Transcription result, word timestamps | Async STT job completes |
// src/elevenlabs/webhook-verify.ts — Header: t=<unix_ts>,v1=<hex_sig>
export function verifyWebhookSignature(rawBody, signatureHeader, secret) {
const parts = new Map(signatureHeader.split(",").map(p => {
const [k, ...v] = p.split("="); return [k, v.join("=")];
}));
const timestamp = parts.get("t"), signature = parts.get("v1");
if (Math.floor(Date.now() / 1000) - parseInt(timestamp) > 300) {
return { valid: false, reason: "Timestamp too old" }; // replay guard
}
const expected = crypto.createHmac("sha256", secret)
.update(`${timestamp}.${rawBody.toString()}`).digest("hex");
return { valid: crypto.timingSafeEqual(
Buffer.from(signature, "hex"), Buffer.from(expected, "hex")) };
}
See references/implementation.md for the production-hardened version with full error handling.
Applying this skill produces:
src/elevenlabs/webhook-verify.ts — reusable HMAC-SHA256 verifier with replay protection and timing-safe comparison.src/api/webhooks/elevenlabs.ts — Express route that verifies signatures, acks 200 immediately, and routes events to per-type handlers.handleTranscription, handleCallAudio, handleCallFailure, handleSTTCompleted) extracting the fields each payload carries.At runtime a verified delivery returns { "received": true } with HTTP 200; a bad signature or expired timestamp returns HTTP 401 { "error": "Invalid signature" }.
| Behavior | Detail |
|---|---|
| Retry policy | ElevenLabs retries failed deliveries |
| Auto-disable | After 10 consecutive failures AND 7+ days since last success |
| Timeout | Your endpoint must respond within a few seconds |
| Re-enable | Manually re-enable in dashboard after fixing the endpoint |
| Authentication | HMAC-SHA256 via ElevenLabs-Signature header |
| Issue | Cause | Solution |
|---|---|---|
| Signature mismatch | Wrong secret or body parsing | Use express.raw(), verify secret matches dashboard |
| Webhook auto-disabled | 10+ consecutive failures | Fix endpoint, re-enable in dashboard |
| Duplicate events | Retried delivery | Implement idempotency with event ID tracking |
| Handler timeout | Slow processing | Return 200 immediately, process async |
| Replay attack | Old timestamp reused | Check timestamp age (reject > 5 min) |
Route a decoded event to the right handler:
switch (event.type || event.event_type) {
case "post_call_transcription": await handleTranscription(event); break;
case "post_call_audio": await handleCallAudio(event); break;
case "call_initiation_failure": await handleCallFailure(event); break;
case "speech_to_text.completed": await handleSTTCompleted(event); break;
default: console.log("Unhandled event type:", event.type);
}
Simulate a delivery locally with curl:
curl -X POST http://localhost:3000/webhooks/elevenlabs \
-H "Content-Type: application/json" \
-H "ElevenLabs-Signature: t=$(date +%s),v1=test" \
-d '{"type":"speech_to_text.completed","data":{"text":"Hello world"}}'
Full per-event handlers (transcript, audio, call-failure, STT) with the exact fields each payload carries are in references/examples.md.
For performance optimization, see the elevenlabs-performance-tuning skill, which covers connection pooling and batching to keep webhook handlers fast enough to ack within the ElevenLabs timeout window.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin elevenlabs-pack18 skills in this plugin
/elevenlabs-ci-integrationConfigure CI/CD pipelines for ElevenLabs with mocked unit tests and gated
integration tests.
Use when setting up GitHub Actions for TTS projects, configuring CI test
strategies, or automating ElevenLabs integration validation without burning
character quota on every PR.
Trigger with "elevenlabs CI", "elevenlabs GitHub Actions",
"elevenlabs automated tests", "CI elevenlabs", "elevenlabs pipeline".
/elevenlabs-common-errorsDiagnose and fix ElevenLabs API errors by HTTP status code.
Use when encountering ElevenLabs errors, debugging failed TTS/STS requests,
or troubleshooting voice cloning and streaming issues.
Trigger with "elevenlabs error", "fix elevenlabs", "elevenlabs not working",
"debug elevenlabs", "elevenlabs 401", "elevenlabs 429", "elevenlabs 400".
/elevenlabs-core-workflow-aImplement ElevenLabs text-to-speech and voice cloning workflows.
Use when building TTS features, cloning voices from audio samples, streaming
speech to a chatbot, or implementing the primary ElevenLabs money-path: voice
generation.
Trigger with "elevenlabs TTS", "text to speech", "voice cloning elevenlabs",
"clone a voice", "generate speech", "elevenlabs voice".
Other plugins' skills for the same job