> 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/transactional-api-smtp/webhooks/sample-webhook-response.md).

# Sample webhook response

### Delivery Attempt

**Sample JSON:**

```json
{
  "event_type": "delivery_attempt",
  "timestamp": 1738908434,
  "email": "recipient@example.com",
  "from_address": "sender@yourdomain.com",
  "injected_time": 1738908430,
  "sendid": "sendid",
  "listid": "testdev1",
  "message": "142.251.185.27 accepted message./Remote host said: 250 2.0.0 OK...",
  "status": "success",
  "outmtaid_ip": "103.94.241.19",
  "click_tracking_id": "9307750b-76cb-42e7-83b5-f83462e6b646:0",
  "tags": "custom-id-value-here"
}
```

**Field Descriptions:**

| Field               | Description                                                                                                  | Example Value                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
| `event_type`        | The type of event indicating a message delivery attempt was made                                             | `delivery_attempt`                       |
| `timestamp`         | The time the delivery attempt occurred, in seconds past the Unix epoch                                       | `1738908434`                             |
| `email`             | The email address to which the delivery was attempted                                                        | `recipient@example.com`                  |
| `from_address`      | The email address used in the "From" header of the message                                                   | `sender@yourdomain.com`                  |
| `injected_time`     | The time when the message was injected into the system, in seconds past the Unix epoch                       | `1738908430`                             |
| `sendid`            | The identifier for the mailing list the message belongs to                                                   | `sendid`                                 |
| `listid`            | The identifier for the mailing list the message belongs to                                                   | `testdev1`                               |
| `message`           | The response message from the receiving server regarding the delivery status                                 | `142.251.185.27 accepted message...`     |
| `status`            | Result of the delivery attempt. Can be: `success`, `failure`, `failure_toolong`, `deferral`, or `connmaxout` | `success`                                |
| `outmtaid_ip`       | The IP address of the outbound MTA (Mail Transfer Agent) that attempted the delivery                         | `103.94.241.19`                          |
| `click_tracking_id` | The click tracking ID from the X-Kasplo-Click-Tracking-ID header to trace the specific message               | `9307750b-76cb-42e7-83b5-f83462e6b646:0` |
| `tags`              | The value passed via X-kasplo-Click-Tracking-ID header, useful for grouping or filtering events              | `custom-id-value-here`                   |

***

### Open

**Sample JSON:**

```json
{
  "email": "test@kasplo.com",
  "event_type": "engine_open",
  "click_tracking_id": "9307750b-76cb-42e7-83b5-f83462e6b646:0",
  "sendid": "testdev250207",
  "from_address": "sender@yourdomain.com",
  "engine_ip": "185.X.X.X",
  "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36",
  "timestamp": 1738908485,
  "tags": "custom-id-value"
}
```

**Field Descriptions:**

<table><thead><tr><th width="215.8984375">Field</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td><code>event_type</code></td><td>The type of event representing that the recipient opened the email</td><td><code>engine_open</code></td></tr><tr><td><code>timestamp</code></td><td>The time the open was tracked, in seconds past the Unix epoch</td><td><code>1738908485</code></td></tr><tr><td><code>email</code></td><td>The email address of the recipient who opened the email</td><td><code>recipient@example.com</code></td></tr><tr><td><code>sendid</code></td><td>The internal identifier for the email send operation</td><td><code>testdev250207</code></td></tr><tr><td><code>from_address</code></td><td>The email address used in the "From" header of the message</td><td><code>sender@yourdomain.com</code></td></tr><tr><td><code>click_tracking_id</code></td><td>The click tracking ID from the X-Kasplo-Click-Tracking-ID header to trace the specific message</td><td><code>9307750b-76cb-42e7-83b5-f83462e6b646:0</code></td></tr><tr><td><code>engine_ip</code></td><td>The IP address of the client that triggered the open event</td><td><code>185.240.76.223</code></td></tr><tr><td><code>user_agent</code></td><td>The user agent string of the browser or client that performed the open</td><td><code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3)...</code></td></tr><tr><td><code>tags</code></td><td>The value passed via x-kasplo-click-tracking-id header, useful for grouping or filtering events</td><td><code>custom-id-value</code></td></tr></tbody></table>

***

### Click

**Sample JSON:**

```json
{
  "event_type": "engine_click",
  "timestamp": 1738908485,
  "email": "recipient@example.com",
  "sendid": "testdev250207",
  "from_address": "sender@yourdomain.com",
  "click_tracking_id": "9307750b-76cb-42e7-83b5-f83462e6b646:0",
  "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36",
  "click_url": "http://www.example.com",
  "tags": "custom-id-value"
}
```

**Field Descriptions:**

| Field               | Description                                                                                         | Example Value                                        |
| ------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| `event_type`        | The type of event representing a click on a tracked link                                            | `engine_click`                                       |
| `timestamp`         | The time the click was tracked, in seconds past the Unix epoch                                      | `1738908485`                                         |
| `email`             | The email address of the recipient who clicked the link                                             | `recipient@example.com`                              |
| `sendid`            | The internal identifier for the email send operation                                                | `testdev250207`                                      |
| `from_address`      | The email address used in the "From" header of the message                                          | `sender@yourdomain.com`                              |
| `click_tracking_id` | The click tracking ID from the X-Kasplo-Click-Tracking-ID header used to trace the specific message | `9307750b-76cb-42e7-83b5-f83462e6b646:0`             |
| `user_agent`        | The user agent string of the browser or client that performed the click                             | `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3)...` |
| `click_url`         | The actual URL that the user clicked                                                                | `http://www.example.com`                             |
| `tags`              | The value passed via the x-kasplo-click-tracking-id header, useful for grouping or filtering events | `custom-id-value`                                    |

***

### Bounce (All)

**Sample JSON:**

```json
{
  "event_type": "bounce_all",
  "timestamp": 1317305252,
  "email": "recipient@example.com",
  "listid": "t99",
  "sendid": "t9920110705",
  "bounce_type": "h",
  "bounce_code": "10",
  "bounce_text": "1.1.1.1 failed after I sent the message. Remote host said: 554 delivery error: dd This user doesn't have a yahoo.com account (user@yahoo.com) - mta1218.mail.mud.yahoo.com",
  "click_tracking_id": "1927393",
  "tags": "custom-id-value"
}
```

**Field Descriptions:**

| Field               | Description                                                                                                   | Example Value                                |
| ------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| `event_type`        | The type of event                                                                                             | `bounce_all`                                 |
| `timestamp`         | The time that the bounce happened, in seconds past the Unix epoch                                             | `1317305252`                                 |
| `email`             | The email address to which this message was sent                                                              | `recipient@example.com`                      |
| `listid`            | The lowercased identifier for the mailing list that this message is a part of                                 | `t99`                                        |
| `sendid`            | The lowercased internal identifier for the send                                                               | `t9920110705`                                |
| `bounce_type`       | The type of bounce: `h` for hard, `s` for soft, and `o` for other                                             | `h`                                          |
| `bounce_code`       | The code of the type of bounce                                                                                | `10`                                         |
| `bounce_text`       | The text of the failure message (up to the number of characters configured)                                   | `1.1.1.1 failed after I sent the message...` |
| `click_tracking_id` | The click tracking ID specified using the X-Kasplo-Click-Tracking-ID header and can be used to trace an event | `1927393`                                    |
| `tags`              | The x-kasplo-click-tracking-id custom header value will return in this field                                  | `custom-id-value`                            |

***

### Bounce (Bad Address)

**Sample JSON:**

```json
{
  "event_type": "bounce_bad_address",
  "timestamp": 1317305252,
  "email": "recipient@example.com",
  "listid": "t99",
  "sendid": "t9920110705",
  "bounce_type": "h",
  "bounce_code": "10",
  "bounce_text": "553 5.1.3 The recipient address is not a valid RFC 5321 address.",
  "click_tracking_id": "239485cc2d5a681db7a8337e740f8090",
  "tags": "custom-id-value"
}
```

**Field Descriptions:**

| Field               | Description                                                                                                   | Example Value                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| `event_type`        | The type of event                                                                                             | `bounce_bad_address`                                               |
| `timestamp`         | The time that the bounce happened, in seconds past the Unix epoch                                             | `1317305252`                                                       |
| `email`             | The email address that this message was sent to                                                               | `recipient@example.com`                                            |
| `listid`            | The lowercased identifier for the mailing list that this message is a part of                                 | `t99`                                                              |
| `sendid`            | The lowercased internal identifier for the send                                                               | `t9920110705`                                                      |
| `bounce_type`       | The type of bounce: `h` for hard, `s` for soft, and `o` for other                                             | `h`                                                                |
| `bounce_code`       | The code of the type of bounce                                                                                | `10`                                                               |
| `bounce_text`       | The text of the failure message. This typically indicates the reason why the address is undeliverable         | `553 5.1.3 The recipient address is not a valid RFC 5321 address.` |
| `click_tracking_id` | The click tracking ID specified using the X-Kasplo-Click-Tracking-ID header and can be used to trace an event | `239485cc2d5a681db7a8337e740f8090`                                 |
| `tags`              | The x-kasplo-click-tracking-id custom header value will return in this field                                  | `custom-id-value`                                                  |

***

### Unsubscribe

**Sample JSON:**

```json
{
  "event_type": "engine_unsub",
  "timestamp": 1738908785,
  "email": "recipient@example.com",
  "sendid": "testdev250207",
  "from_address": "sender@yourdomain.com",
  "click_tracking_id": "9307750b-76cb-42e7-83b5-f83462e6b646:0",
  "tags": "custom-id-value"
}
```

**Field Descriptions:**

| Field               | Description                                                                                     | Example Value                            |
| ------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------- |
| `event_type`        | The type of event indicating the recipient unsubscribed from future emails                      | `engine_unsub`                           |
| `timestamp`         | The time the unsubscribe action was recorded, in seconds past the Unix epoch                    | `1738908785`                             |
| `email`             | The email address of the recipient who unsubscribed                                             | `recipient@example.com`                  |
| `sendid`            | The internal identifier for the email send operation                                            | `testdev250207`                          |
| `from_address`      | The email address used in the "From" header of the message                                      | `sender@yourdomain.com`                  |
| `click_tracking_id` | The click tracking ID from the X-Kasplo-Click-Tracking-ID header to trace the specific message  | `9307750b-76cb-42e7-83b5-f83462e6b646:0` |
| `tags`              | The value passed via x-kasplo-click-tracking-id header, useful for grouping or filtering events | `custom-id-value`                        |

***

### Spam Complaint

**Sample JSON:**

```json
{
  "event_type": "scomp",
  "timestamp": 1738908785,
  "email": "recipient@example.com",
  "sendid": "testdev250207",
  "click_tracking_id": "9307750b-76cb-42e7-83b5-f83462e6b646:0",
  "tags": "custom-id-value"
}
```

**Field Descriptions:**

| Field               | Description                                                                                     | Example Value                            |
| ------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------- |
| `event_type`        | The type of event representing a spam complaint by the recipient                                | `scomp`                                  |
| `timestamp`         | The time the complaint was received, in seconds past the Unix epoch                             | `1738908785`                             |
| `email`             | The email address of the recipient who complained                                               | `recipient@example.com`                  |
| `sendid`            | The internal identifier for the email send operation                                            | `testdev250207`                          |
| `click_tracking_id` | The click tracking ID from the X-Kasplo-Click-Tracking-ID header to trace the specific message  | `9307750b-76cb-42e7-83b5-f83462e6b646:0` |
| `tags`              | The value passed via x-kasplo-click-tracking-id header, useful for grouping or filtering events | `custom-id-value`                        |
