Skip to main content
The ElevenLabs plugin handles incoming webhooks. In ElevenLabs, create a webhook under Developers, Webhooks with HMAC auth, point it at your Corsair HTTP handler, and save the secret it shows you as the account’s webhook_signature (see Overview for setup). Tick the events you want; post-call events also need the webhook selected in the agent’s settings. Deliveries name no account, so with several tenants add ?tenantId=<id> to the URL. The signature covers the body but not the URL, so ?tenantId= only picks which tenant’s secret checks a delivery. When tenants share a secret, by storing the same one or through the webhookSecret option, anyone holding a signed delivery under 30 minutes old can resend it with another tenantId, and that tenant’s hooks run on it. Give each tenant its own webhook secret, or check in an after hook that the event’s ids belong to that tenant before acting on it. By then the plugin has logged the event under that tenant. A before hook runs ahead of the signature check, so it can receive an unsigned or forged delivery. Keep side effects in after. The same event can arrive more than once, from ElevenLabs’ retries or from someone resending a signed delivery within 30 minutes, so make hooks safe to run twice, for example by recording the conversation_id or request_id each one acted on.
New to Corsair? See webhooks and hooks.

Webhook map

  • conversations
    • callInitiationFailure (conversations.callInitiationFailure)
    • postCallAudio (conversations.postCallAudio)
    • postCallTranscription (conversations.postCallTranscription)
  • speechToText
    • transcriptionCompleted (speechToText.transcriptionCompleted)
    • transcriptionFailed (speechToText.transcriptionFailed)
  • voices
    • removalNotice (voices.removalNotice)
    • removalNoticeWithdrawn (voices.removalNoticeWithdrawn)
    • removed (voices.removed)

HTTP handler setup

app/api/webhook/route.ts

Events

Conversations

Call Initiation Failure

conversations.callInitiationFailure A phone call could not be started: busy, no answer or unknown. Payload
webhookHooks example

Post Call Audio

conversations.postCallAudio A conversation ended: the whole conversation as base64 MP3. Payload
webhookHooks example

Post Call Transcription

conversations.postCallTranscription A conversation ended and its analysis is ready: transcript, metadata and analysis. Payload
webhookHooks example

Speech To Text

Transcription Completed

speechToText.transcriptionCompleted A transcription started with webhook true finished. Payload
webhookHooks example

Transcription Failed

speechToText.transcriptionFailed A transcription started with webhook true failed. Payload
webhookHooks example

Voices

Removal Notice

voices.removalNotice A shared voice in use is scheduled to be removed. Payload
webhookHooks example

Removal Notice Withdrawn

voices.removalNoticeWithdrawn A shared voice is no longer scheduled for removal. Payload
webhookHooks example

Removed

voices.removed A shared voice was removed and can no longer be used. Payload
webhookHooks example