← Back to Docs

Webhooks

Receive real-time notifications for email events

Overview

Webhooks allow you to receive HTTP POST requests when certain events occur with your emails. Configure your webhook URL in your dashboard settings.

Event Types

Event Description
email.sentEmail was successfully sent
email.deliveredEmail was delivered to recipient
email.openedRecipient opened the email
email.clickedRecipient clicked a link
email.bouncedEmail bounced
email.complainedRecipient marked as spam
email.unsubscribedRecipient unsubscribed

Webhook Payload

{
  "event": "email.delivered",
  "timestamp": "2024-12-22T10:30:00Z",
  "data": {
    "message_id": "msg_abc123xyz",
    "email": "recipient@example.com",
    "subject": "Welcome!",
    "tags": ["welcome"],
    "metadata": {}
  }
}

Verifying Webhooks

All webhook requests include a signature header for verification:

X-SendBaba-Signature: sha256=abc123...

Verify the signature by computing HMAC-SHA256 of the request body using your webhook secret.