Webhooks
Webhooks let you receive real-time HTTP POST notifications when events occur in your project. Use them to sync call data with your CRM, trigger automations, log conversations, or build custom dashboards.How It Works
- You register a webhook URL in Settings > Webhooks
- When an event occurs (e.g. a call ends), Callem sends an HTTP POST to your URL with the event payload
- Your server processes the payload and returns a
2xxstatus code - If delivery fails, Callem retries up to 3 times with exponential backoff
Events
| Event | Trigger |
|---|---|
call_started | A voice call begins (agent picks up) |
call_ended | A voice call ends (includes transcription and duration) |
call_analyzed | Post-call analysis completes (includes call analysis results) |
chat_started | A chat session begins |
chat_ended | A chat session ends (includes transcription) |
chat_analyzed | Post-chat analysis completes (includes analysis results) |
Creating a Webhook
Configure the webhook
Fill in the following fields:
| Field | Description | Required |
|---|---|---|
| URL | The HTTPS endpoint that will receive events | Yes |
| Description | A label to identify this webhook | No |
| Events | Which events to subscribe to | Yes (at least one) |
| Agent scope | All agents or specific agents only | Yes |
Only HTTPS URLs are accepted. HTTP, localhost, and private IP addresses are blocked for security.
Agent Scope
By default, a webhook receives events for all agents in the project. You can restrict it to specific agents if you only want notifications for certain use cases (e.g. only your production sales agent).Payload Structure
Every webhook delivery is an HTTP POST with a JSON body. The top-level structure is:Headers
Each request includes the following headers:| Header | Description |
|---|---|
Content-Type | application/json |
x-callem-event | The event name (e.g. call_ended) |
x-callem-timestamp | Unix timestamp of the event |
x-callem-signature | HMAC-SHA256 signature for verification |
User-Agent | Callem-Webhook/1.0 |
call_started
call_ended
Includes the full transcription (cleaned — only speaker messages and tool calls, no internal metadata):call_analyzed
Same ascall_ended, plus the callAnalysis object containing the extracted fields:
Chat Events
Chat events (chat_started, chat_ended, chat_analyzed) follow the same structure but use a chat key instead of call, and do not include callerNum, calledNum, or duration.
Security — Verifying Signatures
Every webhook delivery is signed with your webhook’s secret using HMAC-SHA256. You should verify the signature to ensure the request is genuinely from Callem.Verification Algorithm
- Read the
x-callem-timestampandx-callem-signatureheaders - Construct the signed payload:
{timestamp}.{request_body} - Compute HMAC-SHA256 of that string using your webhook secret
- Compare the computed signature with
x-callem-signature
Node.js Verification Example
Rotating the Secret
If you suspect your secret has been compromised:- Open the webhook in Settings > Webhooks
- Click the menu icon and select Rotate Secret
- A new secret is generated immediately — the old secret stops working
- Update your server with the new secret
Managing Webhooks
Editing
Click the Edit option in the webhook’s dropdown menu. You can change the URL, description, subscribed events, and agent scope. The signing secret is not affected.Duplicating
Click Duplicate to create a copy of a webhook with the same configuration but a new signing secret. Useful for setting up staging and production webhooks with the same events.Enabling / Disabling
Use the toggle switch on the webhook card to enable or disable it without deleting the configuration.Deleting
Click Delete from the dropdown menu. A confirmation dialog appears before deletion.Delivery Logs
Each webhook tracks recent delivery attempts. To view them:- Open the webhook in Settings > Webhooks
- Click View Logs in the dropdown menu
- See the status (success/failed), HTTP status code, and timestamp for each delivery
Testing
To verify your webhook endpoint is working:- Open the webhook in Settings > Webhooks
- Click Send Test from the dropdown menu
- A test
call_startedevent is sent to your URL - Check the delivery logs to confirm it was received
Test events are rate-limited to 5 per minute to prevent abuse.
Retry Policy
If your endpoint returns a non-2xx status code or the request times out (10 seconds), Callem retries delivery:| Attempt | Delay |
|---|---|
| 1st retry | ~2 seconds |
| 2nd retry | ~4 seconds |
| 3rd retry | ~8 seconds |
Limits
| Limit | Value |
|---|---|
| Max webhooks per project | 10 |
| URL protocol | HTTPS only |
| Request timeout | 10 seconds |
| Max retries | 3 |
| Delivery log retention | 30 days |
| Test event rate limit | 5 per minute |
Best Practices
Always verify signatures
Always verify signatures
Never trust a webhook payload without verifying the HMAC signature. This prevents malicious actors from sending fake events to your endpoint.
Return 200 quickly
Return 200 quickly
Process webhook payloads asynchronously. Return a
200 OK immediately and queue the actual processing. If your endpoint takes too long, the request may time out and trigger unnecessary retries.Handle duplicate deliveries
Handle duplicate deliveries
In rare cases, the same event may be delivered more than once. Use the
call.id or chat.id as an idempotency key to avoid processing duplicates.Use agent scope to reduce noise
Use agent scope to reduce noise
If you only need events for specific agents (e.g. your production sales agent), configure the webhook’s agent scope to filter out irrelevant events.
Monitor delivery logs
Monitor delivery logs
Check the delivery logs periodically to ensure your endpoint is healthy. Persistent failures may indicate a misconfigured URL, firewall issue, or server error.