Overview
Webhooks allow you to receive real-time notifications when calls are completed. When a call ends, CallCow will send a POST request to your configured webhook URL with detailed information about the call.Setting Up Webhooks
You can create a webhook in the Integration tab. Once you have created a webhook, you can update your custom workflow metadata to use the webhook.Payload Format
When a call completes, you’ll receive a POST request with a JSON payload containing the following fields:Field Reference
| Field | Type | Description |
|---|---|---|
call_id | string | Unique identifier for the call |
workflow_id | string | ID of the workflow that handled the call |
workflow_name | string | Name of the workflow |
phone_number_from | string | The originating phone number (or browser for web calls) |
phone_number_to | string | The destination phone number (or browser for web calls) |
call_status | string | Status of the call (e.g., success, not_picked_up) |
call_summary | string | AI-generated summary of the call |
messages | array | Full conversation transcript with role and content for each message |
context | string | JSON string containing custom context data passed to the workflow (e.g., name, email, phone number) |
created_at | string | ISO 8601 timestamp when the call was created |
Handling Webhooks
Your webhook endpoint should:- Accept POST requests with JSON content
- Respond with a 2xx status code to acknowledge receipt
- Process the webhook asynchronously if needed to avoid timeouts
Example Handler (Node.js)
Best Practices
- Handle duplicates: Implement idempotency using the
call_idfield to handle potential duplicate deliveries - Respond quickly: Return a 2xx response promptly and process data asynchronously
- Debug and Verify: Webhook works on browser calls as well. So as soon as you updated your webhook you can trigger a call in your browser test it.