> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On subscriber complained

> Subscribes when a subscriber reports an email as spam.

`kit.onSubscriberComplained` subscribes when a subscriber reports an email as spam.

```ts automations/on-subscriber-complained.automation.ts theme={null}
import { automation, markSignificant } from "automate.ax"
import { kit } from "automate.ax/kit"

export default automation("On subscriber complained", () => {
  const event = kit.onSubscriberComplained()
  markSignificant(event)
})
```

## Event

| Field     | Type                      | Required | Description                                     |
| --------- | ------------------------- | -------- | ----------------------------------------------- |
| `id`      | `string (UUID)`           | Yes      | Stable event identifier used for deduplication. |
| `type`    | `"subscriber.complained"` | Yes      | Kit provider event type.                        |
| `created` | `string (date-time)`      | Yes      | When the event occurred.                        |
| `data`    | `object`                  | Yes      | Provider payload for this event.                |

`data.subscriber` contains the complaining subscriber. Provider snake case fields are exposed as camelCase. Subscriber custom-field keys under `fields` are preserved exactly.

Automate.ax creates and maintains one account-level Kit webhook endpoint, verifies the timestamped `X-Kit-Signature` against the raw body, and deduplicates each event by `id`. Kit can batch up to 100 same-type events in one delivery; each event starts independently. Use `kit.onEvent` when one automation should receive every available event.
