> For the complete documentation index, see [llms.txt](https://kasplo.gitbook.io/kasplo-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kasplo.gitbook.io/kasplo-doc/channels/email-api/webhooks/webhook-payload-reference.md). Agents can also search and read this documentation through its [MCP server](https://kasplo.gitbook.io/kasplo-doc/~gitbook/mcp).

# Webhook Payload Reference

Kasplo dispatches webhook event notifications as JSON HTTP POST bodies.

***

## Common Webhook Fields

The following fields appear across most webhook event payloads:

| Field               | Type    | Description                                                                                      |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------ |
| `event_type`        | string  | The specific webhook event identifier (e.g. `accepted`, `delivery_attempt`, `bounce_all`).       |
| `timestamp`         | integer | UNIX timestamp (in seconds) when the event occurred.                                             |
| `email`             | string  | The recipient email address.                                                                     |
| `from_address`      | string  | The verified sender email address.                                                               |
| `click_tracking_id` | string  | The unique submission tracking UUID assigned by Kasplo. Used for message correlation.            |
| `tags`              | string  | Custom tracking ID supplied via `email.customid`, `email.tags`, or `X-Kasplo-Click-Tracking-ID`. |
| `sendid`            | string  | Internal Kasplo batch or campaign identifier.                                                    |
| `listid`            | string  | Mail class or account grouping identifier.                                                       |

***

## 1. Message Delivery Event Payloads

### `accepted`

Dispatched when Kasplo successfully accepts the recipient submission.

```json
{
  "event_type": "accepted",
  "timestamp": 1791504000,
  "email": "recipient@example.com",
  "from_address": "sender@yourdomain.com",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029",
  "listid": "transactional-class"
}
```

***

### `sent`

Dispatched when the message passes suppression checks and enters the outbound MTA delivery pipeline.

```json
{
  "event_type": "sent",
  "timestamp": 1791504002,
  "email": "recipient@example.com",
  "from_address": "sender@yourdomain.com",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029",
  "listid": "transactional-class"
}
```

***

### `delivery_attempt`

Dispatched for each network delivery attempt to the recipient mail exchange server.

```json
{
  "event_type": "delivery_attempt",
  "status": "success",
  "timestamp": 1738908434,
  "injected_time": 1738908430,
  "email": "recipient@example.com",
  "from_address": "sender@yourdomain.com",
  "message": "Remote host said: 250 2.0.0 OK",
  "outmtaid_ip": "103.94.241.19",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029",
  "listid": "transactional-class"
}
```

#### Attempt Status Reference

* `success`: Message accepted by the remote mail server (`Delivered`).
* `deferral`: Remote server temporarily deferred delivery (e.g. greylisted, mailbox busy). Kasplo will retry.
* `connmaxout`: Delivery paused due to ISP connection throttling. Automatic retry scheduled.
* `failure`: Delivery attempt rejected permanently.
* `failure_toolong`: Delivery failed after exhausting the platform retry duration.

***

### `bounce_all`

Dispatched when an external delivery attempt fails permanently or exhausts all retries.

```json
{
  "event_type": "bounce_all",
  "timestamp": 1738908434,
  "email": "recipient@example.com",
  "bounce_type": "h",
  "bounce_code": "10",
  "bounce_text": "550 5.1.1 User unknown",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029",
  "listid": "transactional-class"
}
```

#### Bounce Fields

* `bounce_type`:
  * `"h"`: Hard bounce (permanent failure).
  * `"s"`: Soft bounce (persistent temporary failure).
  * `"o"`: Other / unclassified failure.
* `bounce_code`: Internal classification code.
* `bounce_text`: Exact error string returned by the recipient mail server.

***

### `bounce_bad_address`

Dispatched when an address meets the qualification criteria to be added to suppression.

```json
{
  "event_type": "bounce_bad_address",
  "timestamp": 1738908434,
  "email": "recipient@example.com",
  "bounce_type": "h",
  "bounce_code": "10",
  "bounce_text": "550 5.1.1 User unknown",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029",
  "listid": "transactional-class"
}
```

* `bounce_type: "h"`: Suppressed due to a permanent hard bounce.
* `bounce_type: "s"`: Suppressed due to exceeding the soft bounce threshold.

***

### `rejected`

Dispatched when an accepted message is prevented from proceeding to external delivery because the recipient is suppressed or violates account sending policies.

```json
{
  "event_type": "rejected",
  "status": "failed",
  "timestamp": 1791504001,
  "email": "recipient@example.com",
  "message": "The email is not sent as the email address is suppressed.",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291"
}
```

***

## 2. Recipient Engagement Event Payloads

### `engine_open`

Dispatched when an email open is recorded (via tracking pixel or first link click).

```json
{
  "event_type": "engine_open",
  "timestamp": 1738908485,
  "email": "recipient@example.com",
  "from_address": "sender@yourdomain.com",
  "engine_ip": "185.240.76.223",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029"
}
```

***

### `engine_click`

Dispatched each time a recipient clicks a tracked hyperlink.

```json
{
  "event_type": "engine_click",
  "timestamp": 1738908492,
  "email": "recipient@example.com",
  "from_address": "sender@yourdomain.com",
  "click_url": "https://yourdomain.com/orders/track?id=48291",
  "engine_ip": "185.240.76.223",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029"
}
```

* `click_url`: The destination URL the recipient was redirected to.

***

### `engine_unsub`

Dispatched when an unsubscribe action is registered via an email body link or RFC 8058 one-click unsubscribe header.

```json
{
  "event_type": "engine_unsub",
  "timestamp": 1738908785,
  "email": "recipient@example.com",
  "from_address": "sender@yourdomain.com",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029"
}
```

***

### `scomp`

Dispatched when an ISP feedback loop reports that the recipient marked the email as spam.

```json
{
  "event_type": "scomp",
  "timestamp": 1738908785,
  "email": "recipient@example.com",
  "click_tracking_id": "a32993b8-cf2e-4ba7-beca-5297868478b3",
  "tags": "order-48291",
  "sendid": "snd-20261029"
}
```
