---
title: "Webhooks | Prontuno"
description: "Receive email delivery events in your application so you can update records, investigate failures, and respond to bounces as they happen."
canonical: https://prontuno.com/features/webhooks/
---

# Know what happened after you hit send.

**Webhooks · Signed JSON POST**

Receive email delivery events in your application so you can update records, investigate failures, and respond to bounces as they happen.

[Request access](https://app.prontuno.com/get-started/) · [Explore the API reference](https://prontuno.com/api-reference/)

## Webhook deliveries

### Example delivery log

Endpoint: `POST https://example.com/webhooks/prontuno`

| Event | Recipient | Response | Time |
| --- | --- | --- | --- |
| `email.delivered` | `ada@example.com` | 200 | 09:14:05 |
| `email.sent` | `grace@example.com` | 200 | 09:14:04 |
| `email.bounced` | `alan@example.org` | 200 | 09:14:02 |
| `email.deferred` | `mary@example.net` | 503, retrying | 09:13:58 |
| `email.delivered` | `linus@example.com` | 200 | 09:13:51 |

Requests include a `Prontuno-Signature` header.

Each request is signed. Failed deliveries are retried automatically.

## Turn delivery signals into action

Instead of polling for the status of each email, your application is told when something changes, so records stay current and failures surface quickly.

### Only the events you need

Each endpoint subscribes only to the events it acts on, so every system receives just what it needs.

### Scope each endpoint

Receive events for your whole team, or only for one verified sending domain.

### Manage by API or dashboard

Create, update, and delete endpoints and rotate signing secrets through the API or your Prontuno account.

## Events you can trust, processed once

An endpoint on the public internet can receive forged, repeated, or missed requests. Signatures, event IDs, and retries address each of these.

### Delivery events

| Event | Sent when |
| --- | --- |
| email.sent | Prontuno accepted the message and passed it to its mail servers. |
| email.delivered | The recipient’s mail server accepted the message. |
| email.deferred | The receiving server asked for a later retry. Prontuno retries automatically. |
| email.bounced | The receiving server refused the message. |
| email.rejected | Prontuno did not send the message, for example because the recipient is on the suppression list. |
| email.expired | Delivery kept being retried until the retry period ran out without success. |
| email.complained | The recipient reported the message as spam to their mailbox provider. Prontuno suppresses the address automatically. |

### HMAC-SHA256 signatures

The Prontuno-Signature header is computed from the timestamp and raw body with your endpoint secret. Verify it in one call using any of our official SDKs for Node.js, PHP, Laravel, Go, Python, or Ruby.

### Unique event IDs

Each event carries an ID, in the body and in the Prontuno-Event-Id header, so a repeated delivery can be recognized.

### Automatic retries

Failed deliveries are retried with increasing delays, so a brief outage does not lose events.

### Bounce details included

Bounce events include the bounce type, the SMTP status code, and the receiving server’s diagnostic message.

### Receive an event examples

#### Payload

```json
{
  "event_id": "evt_01kxx24h94e00v5rgamqhe607z",
  "webhook_id": "whk_01kxjf1tyje00bgxb0s9g4gfxn",
  "type": "email.bounced",
  "created_at": "2026-09-25T09:14:03.120Z",
  "data": {
    "email_id": "email_01kxwz4bfhe00rr3ww02remnap",
    "to_email": "ada@example.com",
    "subject": "Your receipt",
    "bounced_at": "2026-09-25T09:14:02.884Z",
    "reason": "Mailbox does not exist",
    "bounce": {
      "type": "permanent",
      "enhanced_status_code": "5.1.1"
    }
  }
}
```

#### Verify in Node.js

```js
import { constructWebhookEvent } from 'prontuno';

// Pass the raw request body, before parsing it as JSON.
// Throws if the signature is invalid or expired.
const event = constructWebhookEvent(
  rawBody,
  request.headers['prontuno-signature'],
  process.env.PRONTUNO_WEBHOOK_SIGNING_SECRET,
);

if (event.type === 'email.bounced') {
  // event.data.to_email, event.data.bounce.type, ...
}
```

#### Verify in PHP

```php
use Prontuno\Webhooks\Exceptions\WebhookVerificationException;
use Prontuno\Webhooks\WebhookEvent;
use Prontuno\Webhooks\WebhookVerifier;

$verifier = new WebhookVerifier(
    (string) getenv('PRONTUNO_WEBHOOK_SIGNING_SECRET'),
);

try {
    $event = $verifier->constructEvent(
        file_get_contents('php://input'),
        $_SERVER['HTTP_PRONTUNO_SIGNATURE'] ?? '',
    );
} catch (WebhookVerificationException) {
    http_response_code(400);
    exit;
}

if ($event->is(WebhookEvent::EMAIL_BOUNCED)) {
    // $event->data['to_email'], $event->data['bounce'], ...
}
```

#### Verify in Go

```go
event, err := prontuno.ConstructWebhookEvent(
	rawBody,
	r.Header.Get(prontuno.SignatureHeader),
	os.Getenv("PRONTUNO_WEBHOOK_SIGNING_SECRET"),
)
if err != nil {
	http.Error(w, "invalid webhook", http.StatusBadRequest)
	return
}

if event.Type == prontuno.EventEmailBounced {
	data, _ := event.EmailData()
	// *data.ToEmail, data.Bounce.Type, ...
}
```

#### Verify in Python

```python
import os
from prontuno import (
    WebhookPayloadError,
    WebhookSignatureVerificationError,
    construct_webhook_event,
)

try:
    event = construct_webhook_event(
        raw_body,
        request.headers.get("Prontuno-Signature"),
        os.environ["PRONTUNO_WEBHOOK_SIGNING_SECRET"],
    )
except (WebhookSignatureVerificationError, WebhookPayloadError):
    return "", 400

if event["type"] == "email.bounced":
    # event["data"]["to_email"], event["data"]["bounce"]["type"], ...
    pass
```

#### Verify in Ruby

```ruby
begin
  event = Prontuno::Webhook.construct_event(
    request.raw_post,
    request.headers["Prontuno-Signature"],
    ENV.fetch("PRONTUNO_WEBHOOK_SIGNING_SECRET")
  )
rescue Prontuno::WebhookSignatureVerificationError, Prontuno::WebhookPayloadError
  head :bad_request
  return
end

if event[:type] == "email.bounced"
  # event[:data][:to_email], event[:data].dig(:bounce, :type), ...
end
```

## Receive delivery events

1. Add a public HTTPS endpoint to your application.
2. Create a webhook in Prontuno, choose its events, and store the signing secret.
3. Verify each signature and skip event IDs you have already processed.

[Explore the API reference](https://prontuno.com/api-reference/)

## Explore more of Prontuno

- [Email API](https://prontuno.com/features/email-api/) — Send email with one HTTP request.
- [SMTP relay](https://prontuno.com/features/smtp-relay/) — Connect existing apps over SMTP.
- [Domain authentication](https://prontuno.com/features/domain-authentication/) — Set up SPF, DKIM, and DMARC.
- [Dedicated IP](https://prontuno.com/features/dedicated-ip/) — An IP reserved for your team.

## Request access

Ready to send with Prontuno? Request access and tell us about your sending needs. Applications are reviewed within 24 hours.

[Request access](https://app.prontuno.com/get-started/)
