Skip to main contentWebhook Module
The Webhook module allows you to integrate your campaigns with external systems by sending real-time event notifications.
Overview
Webhooks provide a way for your campaigns to communicate with other applications when specific events occur. Instead of continuously polling for data, webhooks push information to your specified endpoints as events happen.
Webhook Events
The following events can trigger webhooks:
Call Events
- call.started: Triggered when a call begins
- call.ended: Triggered when a call completes
- call.failed: Triggered when a call fails to connect
- call.voicemail_detected: Triggered when a voicemail is detected
Conversation Events
- conversation.transcript: Provides real-time or complete call transcripts
- conversation.intent_detected: Triggered when the AI identifies a specific intent
- conversation.entity_captured: Triggered when the AI captures important information
Campaign Events
- campaign.started: Triggered when a campaign is activated
- campaign.paused: Triggered when a campaign is paused
- campaign.completed: Triggered when a campaign finishes
- campaign.quota_reached: Triggered when a campaign reaches defined limits
Configuring Webhooks
To set up a webhook:
- Navigate to the Webhook section in your campaign settings
- Click “Add Webhook”
- Enter the following information:
- Webhook Method: Choose from GET, POST, PUT, or DELETE
- URL: The endpoint URL that will receive the webhook data
- Headers: Add custom HTTP headers as key-value pairs
- Webhook Body: For POST and PUT requests, define the payload structure
- Webhook Timeout: Maximum time to wait for a response (in seconds)
- Retry Limit: Number of retry attempts for failed deliveries
- Total Timeout: Maximum total time including retries
Success Conditions
Define when a webhook call is considered successful:
- Status Code: The expected HTTP status code (e.g., 200)
- Response Key: A specific key to check in the response
- Expected Value: Boolean indicating the expected value for the response key
Webhook Variable Mapping
When configuring a webhook for a campaign, you can map various data sources to the webhook variables:
Available Data Sources
- Default Value: Uses the variable name as the value
- Contact Field: Maps to contact information fields
- Agent Outcome Fields: Maps to outcomes determined by the AI agent
- Call Log Fields: Maps to call metadata like:
- Call ID
- Call SID
- Company ID
- Campaign ID
- AI Agent ID
- Contact ID
- Call From/To numbers
- Call Duration
- Call Status
- Call Direction
- Call Rating
- Call Summary
- Recording URL
- Transcript
- Sentiment Analysis
- Agent Task Status/Feedback
- Dynamic Variables
- Post-Call Outcomes
- Timestamps (Created, Started, Ended)
Webhook Payload
Webhooks deliver data in JSON format. Here’s an example payload for a call.ended event: