Skip to content

Webhooks

Webhooks let you receive real-time HTTP callbacks when events occur in Smooven, such as notification delivery, opens, clicks, and failures.

Include a callback_url in any notification request:

{
"channel": "sms",
"to": "+61400000000",
"message": "Your code is 482910",
"callback_url": "https://your-server.com/webhooks/smooven"
}

Configure a default webhook URL in the dashboard under Settings > Webhooks. This receives events for all notifications in the project.

{
"event": "notification.delivered",
"notification_id": "ntf_abc123",
"channel_used": "sms",
"status": "delivered",
"timestamp": "2026-03-05T08:00:03Z",
"recipient": {
"user_id": "user_123",
"channel_address": "+61400000000"
}
}
EventDescription
notification.queuedNotification accepted
notification.sentHanded to delivery provider
notification.deliveredConfirmed delivery
notification.failedPermanent failure
notification.fallbackPrimary channel failed, trying next
notification.openedRecipient opened (email, push)
notification.clickedRecipient clicked a link or action
player.registeredNew player registered
player.updatedPlayer record updated

Every webhook request includes an X-Smooven-Signature header. Verify it to confirm the request is authentic:

const crypto = require('crypto');
function verifyWebhook(payload, signature, secretKey) {
const expected = crypto
.createHmac('sha256', secretKey)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}

If your endpoint returns a non-2xx status code, Smooven retries with exponential backoff:

AttemptDelay
15 seconds
230 seconds
32 minutes

After 3 failed attempts, the event is logged and available in the dashboard under Webhooks > Failed Deliveries.

  1. Return 200 immediately and process the event asynchronously.
  2. Handle duplicates. Use notification_id as an idempotency key.
  3. Verify signatures on every request.
  4. Monitor failures in the dashboard and set up alerts for repeated failures.