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

# Notifications

> Tell the right people when something arrives, comes back, spikes or sits too long.

```ts theme={null}
import { notify, slack } from "pult"

export const moderation = notify("moderation", {
  inboxes: [reports, abuse],
  on: ["created", "reopened", "overdue"],
  to: [mod, slack("moderation")],
})

export const crashSpikes = notify("crash-spikes", {
  inboxes: [crashes],
  on: [{ spike: 20 }, "reopened"],
  to: [slack("eng")],
})
```

Notification rules are separate from inboxes and roles, so they can point at both without import cycles.

## Triggers

* `"created"`: a new item arrives.
* `"reopened"`: a closed item comes back.
* `"overdue"`: an item passes its [response time](/build/inboxes#response-times).
* `{ spike: n }`: an item happens `n` times within an hour.

A new item notifies once, a reopened one at most hourly, a spike at most every six hours, and an overdue one each time it passes its due time.

## Recipients

Roles are emailed: everyone with the role gets the message. `slack("channel")` posts to a Slack channel through an incoming webhook that an admin adds in the project's Slack settings, so the webhook URL never lives in your code.

Notices wait about twenty seconds before they go out, so a burst arrives as one message listing the items, each with a link.

## Personal notices

Some notices go to one person without any rule: when someone else assigns them an item, mentions them in a note, or a customer writes back on an item assigned to them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.