# Notifications

SelfDocHub can notify your team when documentation changes and before your license ends. This page explains channels, rules and the delivery history.

> **Roles:** The **Notifications** page (`/notifications`) is for `admin` only. It needs the `notifications` feature in your license (Team tier and above).

The page has three tabs: **Channels**, **Rules** and **History**.

## Channels

A channel is one delivery target. Four types exist:

| Type | How it delivers |
|------|-----------------|
| Webhook | An HTTP(S) `POST` with a JSON body `{event, title, text, url, data, sent_at}`, optionally with `Authorization: Bearer <token>` and extra headers. Any 2xx answer counts as delivered. |
| Email | Plain-text and HTML mail to a list of recipients through one shared SMTP server (host, port, `none`/`STARTTLS`/`SSL`, optional login, from address), configured once below the channel list. |
| Telegram | The Bot API `sendMessage`: a bot token and a chat ID (personal chat, group or channel). |
| Slack | Either a bot token with a channel, or an Incoming Webhook URL. |

**Send test** delivers a test message right away and shows the outcome. Error texts never contain secrets.

Secrets (bearer token, SMTP password, bot tokens, Slack webhook URL) are stored encrypted with a key derived from `session_secret`. They are never returned by the API: the page only shows that one is saved, and leaving the field empty on edit keeps it. If you change `session_secret`, enter them again.

### Delivery guard

Outgoing requests only use `http` or `https`, allow no credentials in URLs, do not follow redirects and refuse connections to loopback, private, link-local and carrier-grade-NAT addresses, also after DNS resolution. Turn on `notifications_allow_private_targets` to allow private targets. A Slack Incoming Webhook URL must be an `https://hooks.slack.com/...` URL unless that setting is on. See [Configuration Reference](/documentation/configuration).

## Rules

### New documentation version

Sent when a new version **with changes** is published to a service's **main branch** (through the ingest API or a manual import). The first version of a service and versions without changes never notify. Per channel you choose **all services** or a list, and can switch on **only breaking changes**.

The message names the service and lists the change counts and, grouped by added, changed and removed, the first endpoints of each group (`notifications_max_endpoints`, default 5, then "and N more"). Breaking ones are marked. In email, Telegram and Slack, the service name and endpoints are links to the docs page. A removed endpoint links to the service page instead. Publishing the same version twice does not notify twice.

### License expiry

Warnings are sent **1 week, 3 days, 2 days and 1 day** before the license ends, in any combination you choose (calendar days, UTC). The license is checked once a day (`notifications_license_check_time`, 09:00 UTC by default) and at startup. Each warning is sent once per channel and license, also across restarts. If the server was down on the day, only the most urgent missed warning is sent. When the license has expired, one "expired" notice is sent and then nothing until a new license is uploaded.

## History

The **History** tab lists deliveries and their outcome, and lets you retry a delivery.

## Next steps

- [License and Tiers](/documentation/license)
- [Change Log](/documentation/change-log)

---
Source: https://selfdochub.com/documentation/notifications
