Webhooks let your application react to events that happen after a Unified API request. Use them for delivery receipts, OTP verification status, internal order updates, and support alerts.
Configure webhooks from Unified API > Webhooks in the customer dashboard. The list is paginated at 20 rows per page so large accounts stay easy to manage.
When to Use Webhooks
Use webhooks when your system needs to know what happened after KarFlows accepted a request:
- A Unified message was sent, failed, or routed through fallback.
- An OTP was accepted, verified, expired, or failed.
- A message finally used SMS after WhatsApp QR or Meta failed.
Events
Payload Shape
KarFlows sends a JSON body like this:
Every webhook request includes:
Signature Verification
When you create a webhook, KarFlows shows the signing secret once. Store it securely. KarFlows signs:
The signature format is:
Node.js Example
Recommended Response
Return any 2xx status when your application accepts the event.
If your endpoint returns a non-2xx status or times out, KarFlows marks that webhook delivery as failed in the dashboard. Store the webhook id or data.reference and ignore duplicates.
message.sent, sms.sent, and otp.sent report immediate channel acceptance. They are not final handset delivery receipts.
Local Development
Webhook URLs must be publicly reachable. Localhost URLs are blocked. For development, use a public tunnel such as ngrok, Cloudflare Tunnel, or a staging domain.
Dashboard Controls
In the Unified API Webhooks tab, a customer can:
- Add endpoint URL and display name.
- Select events to listen for.
- Enable or disable an endpoint.
- Rotate the signing secret.
- Send a test webhook.
- Delete endpoints that are no longer used.
Admins can see customer endpoints and recent deliveries from the SMS & OTP Gateway dashboard.