Configuration
Set your webhook URL via the API:secret for signature verification:
Event Types
| Event | Description |
|---|---|
call.incoming | A call has started - respond with agent configuration |
call.complete | A call has ended - includes transcript and recording |
Payload Format
All webhook payloads follow this structure:Signature Verification
All webhooks include an HMAC-SHA256 signature in theX-ThunderPhone-Signature header.
Verification Steps
- Get the raw request body (before any parsing)
- Compute HMAC-SHA256 of the body using your webhook secret
- Compare with the
X-ThunderPhone-Signatureheader
Signature Format
The payload is serialized with:- Sorted keys
- No extra whitespace
Best Practices
Respond quickly
Respond quickly
For
call.incoming webhooks, ThunderPhone waits for your response to configure the call. Respond within 2 seconds to avoid delays.Return 2xx status
Return 2xx status
Always return a 2xx status code (200, 201, 204) to acknowledge receipt. Non-2xx responses may trigger retries.
Handle duplicates
Handle duplicates
In rare cases, you may receive duplicate events. Use the
call_id to deduplicate.Verify signatures
Verify signatures
Always verify the
X-ThunderPhone-Signature header to ensure requests are from ThunderPhone.