Skyden Send
Sign in
Webhooks / Overview

Webhooks

Receive real-time events on your server when messages are sent, delivered, read, or fail.

Available events

Event Triggered when
message.queuedA message is accepted and queued
message.sentThe message was sent to WhatsApp
message.deliveredThe message was delivered to the recipient
message.readThe recipient opened the message
message.failedThe message failed to send
message.receivedAn incoming message was received
session.connectedA WhatsApp connection is online
session.disconnectedA WhatsApp connection went offline

Signature verification

Every request includes an X-Skyden-Signature header with the format t=<timestamp>,v1=<hmac>. Always verify it before processing the payload.

<?php
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_SKYDEN_SIGNATURE'] ?? '';
$secret = 'whsec_your_secret';

if (! Skyden\Send\Webhooks::verifySignature($payload, $signature, $secret)) {
    http_response_code(401);
    exit('Invalid signature');
}

$event = json_decode($payload, true);
// Handle event...
import { Webhooks } from 'skyden-send';

app.post('/webhooks/skyden', express.raw({ type: 'application/json' }), (req, res) => {
    const payload = req.body.toString('utf8');
    const signature = req.header('X-Skyden-Signature') || '';

    if (! Webhooks.verifySignature(payload, signature, 'whsec_your_secret')) {
        return res.status(401).send('Invalid signature');
    }

    const event = JSON.parse(payload);
    console.log('Event received:', event.event);

    res.status(200).send('OK');
});

Retry policy

If your endpoint returns a non-2xx status or times out, Skyden Send retries the delivery with an exponential backoff:

  • Attempt 1: immediate
  • Attempt 2: +5 seconds
  • Attempt 3: +30 seconds
  • Attempt 4: +2 minutes
  • Attempt 5: +10 minutes
  • Attempt 6: +1 hour

After 6 failed attempts, the delivery is marked as failed and can be manually replayed from your dashboard.