Skip to content

Email Webhook Events

SendAPI fires HTTP POST requests to your webhook URL for all significant email lifecycle events.

Event: email.sent

Fired when an email has been accepted and dispatched to the sending infrastructure.

json
{
  "event": "email.sent",
  "timestamp": "2026-03-09T14:30:01Z",
  "data": {
    "id": "eml_01H9...QP",
    "to": "alice@example.com",
    "subject": "Welcome to SendAPI",
    "sent_at": "2026-03-09T14:30:01Z"
  }
}

Event: email.delivered

Fired when the receiving mail server confirms delivery.

json
{
  "event": "email.delivered",
  "timestamp": "2026-03-09T14:30:05Z",
  "data": {
    "id": "eml_01H9...QP",
    "to": "alice@example.com",
    "delivered_at": "2026-03-09T14:30:05Z"
  }
}

Event: email.opened

Fired when the tracking pixel is loaded by the recipient.

json
{
  "event": "email.opened",
  "timestamp": "2026-03-09T14:45:00Z",
  "data": {
    "id": "eml_01H9...QP",
    "to": "alice@example.com",
    "opened_at": "2026-03-09T14:45:00Z"
  }
}

Event: email.clicked

Fired when the recipient clicks a tracked link in the email.

json
{
  "event": "email.clicked",
  "timestamp": "2026-03-09T14:46:00Z",
  "data": {
    "id": "eml_01H9...QP",
    "to": "alice@example.com",
    "url": "https://myapp.com/dashboard",
    "clicked_at": "2026-03-09T14:46:00Z"
  }
}

Event: email.bounced

Fired when the email is permanently rejected by the receiving server (hard bounce). The address is automatically added to your suppression list.

json
{
  "event": "email.bounced",
  "timestamp": "2026-03-09T14:30:10Z",
  "data": {
    "id": "eml_01H9...QP",
    "to": "invalid@notadomain.xyz",
    "bounce_type": "hard",
    "error": "550 5.1.1 User unknown",
    "bounced_at": "2026-03-09T14:30:10Z"
  }
}

Event: email.complained

Fired when the recipient marks the email as spam. The address is automatically suppressed.

json
{
  "event": "email.complained",
  "timestamp": "2026-03-09T15:00:00Z",
  "data": {
    "id": "eml_01H9...QP",
    "to": "alice@example.com",
    "complained_at": "2026-03-09T15:00:00Z"
  }
}

Bounce Handling

SendAPI automatically manages your suppression list:

  • Hard bounces (invalid address) → immediately suppressed
  • Soft bounces (mailbox full, temporary error) → retried 3 times over 24 hours

Future send attempts to suppressed addresses return a 422 Unprocessable Entity error with code recipient_suppressed to prevent sending to known-bad addresses and protect your sender reputation.

Released under the MIT License.