- Webhook Types
- Pre-Call Webhooks
- Post-Call Webhooks
- Webhook Configuration
- API Schema
- Assignments (Pre-Call Only)
- Template Variables
- Webhook Limits
- Available Operations
- Common Workflows
- Setting Up Pre-Call Customer Lookup
- Setting Up Post-Call Logging
- Error Handling
- Pre-Call Webhook Failures
- Post-Call Webhook Failures
- See Also
Agent Webhooks
Webhooks enable agents to call external APIs at specific points in the conversation lifecycle. There are two webhook types: pre-call (executed before call starts) and post-call (executed after call ends).
Webhook Types
Pre-Call Webhooks
Execute before a conversation starts to populate dynamic variables with context.
Use Cases:
- Fetch customer information from CRM
- Load account details
- Retrieve conversation history
- Get user preferences
- Initialize session data
Features:
- Populate agent dynamic variables from response
- Block call start until webhook completes
- Configurable timeout
- Variable assignments from response data
Example Flow:
- Incoming call arrives
- Pre-call webhook executes
- Response data populates dynamic variables
- Agent starts conversation with context
Post-Call Webhooks
Execute after a conversation ends for logging and analytics.
Use Cases:
- Log conversation summary
- Update CRM records
- Send notifications
- Track analytics
- Trigger follow-up actions
Features:
- Fire-and-forget execution
- No variable assignments (call already ended)
- Configurable timeout
- Access to conversation metadata
Example Flow:
- Call ends
- Post-call webhook executes
- Conversation data sent to external system
- Call cleanup completes
Webhook Configuration
API Schema
Define the HTTP endpoint to call:
Assignments (Pre-Call Only)
Extract data from webhook response:
Template Variables
Use {{variable_name}} in URLs, headers, and bodies:
Built-in Variables:
{{agent_uuid}}: Agent’s UUID{{conversation_uuid}}: Conversation UUID{{caller_phone}}: Caller’s phone number (inbound){{call_duration}}: Call duration in seconds (post-call){{call_summary}}: AI-generated call summary (post-call)
Agent Dynamic Variables:
- Any variable defined in agent’s
dynamic_variables
Webhook Limits
- One webhook per type: Each agent can have at most one pre-call and one post-call webhook
- Timeout: Configurable response timeout (default varies by type)
- No chaining: Webhooks cannot trigger other webhooks
- Single execution: Each webhook executes once per call
Available Operations
- List Webhooks - Retrieve all webhooks for an agent
- Get Webhook - Get a specific webhook
- Create Webhook - Add a new webhook
- Update Webhook - Modify webhook configuration
- Delete Webhook - Remove a webhook
Common Workflows
Setting Up Pre-Call Customer Lookup
- Create pre-call webhook pointing to CRM API
- Configure request to include caller phone number
- Set up assignments to extract customer data
- Agent uses populated variables in conversation
Setting Up Post-Call Logging
- Create post-call webhook pointing to analytics service
- Configure request to include conversation metadata
- No assignments needed (call already ended)
- External system receives conversation data
Error Handling
Pre-Call Webhook Failures
If a pre-call webhook fails:
- Call may be blocked (depending on configuration)
- Agent may start with empty dynamic variables
- Error logged for debugging
Post-Call Webhook Failures
If a post-call webhook fails:
- Error logged but call completes normally
- No retry attempts (fire-and-forget)
- External system may miss data
See Also
- Create Agent - Configure webhooks during agent creation
- Update Agent - Modify webhook settings
- Agent Tools Overview - Learn about tool webhooks
