Call Events
This page details the webhook events related to calls and the payload structure for each event type.Event Types
Event Type | Description | Trigger |
---|---|---|
call.started | Call has started | Triggered when a call connects |
call.ended | Call has ended | Triggered when a call is completed normally |
call.failed | Call failed to connect | Triggered when a call fails to connect |
call.transcript | Call transcript is available | Triggered when a transcript is generated |
call.recording | Call recording is available | Triggered when a recording is available |
call.summary | Call summary is available | Triggered when an AI summary is generated |
Common Payload Structure
All call-related webhook events share a common payload structure, with some event-specific fields:Event-Specific Payload Details
call.started
Triggered when a call is successfully connected.call.ended
Triggered when a call ends normally.call.failed
Triggered when a call fails to connect or ends prematurely.twilio-failed-to-connect-call
no-answer
busy
disconnected
invalid-number
rejected
canceled
failed
call.transcript
Triggered when a call transcript is generated.call.recording
Triggered when a call recording is available.call.summary
Triggered when a call summary is generated.Contact Information
If the call is associated with a contact in your Klen AI account, the contact information is included in the payload:Workflow Example
Here’s a typical workflow for call events:- Receive
call.started
when a call connects - Receive
call.ended
when the call completes - Receive
call.transcript
when the transcript is ready - Receive
call.summary
when the AI summary is generated - Receive
call.recording
when the audio recording is available
Handling Multiple Subscriptions
If you have multiple webhook endpoints subscribed to the same events, each endpoint will receive a copy of the webhook. This allows you to process events in different systems or applications.Security Recommendations
When processing call events:- Always verify the webhook signature
- Implement idempotency to handle potential duplicate deliveries
- Securely store sensitive information like phone numbers and transcripts
- Use HTTPS for your webhook endpoints
Testing Call Events
To test call events, you can:- Make a test call using the Klen AI dashboard
- Use a webhook testing tool (like Webhook.site)
- Check the webhook delivery logs in your Klen AI dashboard
Handling Large Payloads
For lengthy transcripts or large call summaries, we may include a URL to download the content instead of including it directly in the webhook payload. In these cases, you’ll see atranscript_url
or similar field with a pre-signed URL to download the content.