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

# Notices to your app

> Beacon tells your app's server when something changes, so the app re-reads only then: what a notice holds, how to check its signature, and how Beacon tries again.

A notice is a short message Beacon sends to your app's own server when something changes. It says what happened and when, never a figure. Your app then asks the Data API what changed and re-reads it with its key, so it stays current without reading everything on a timer.

## The notices

| Notice | Sent when | Availability |
| - | - | - |
| **Nightly update finished** (`nightly_run_finished`) | Beacon's nightly update has finished for your company | Available |
| **Month locked** (`month_locked`) | An admin closes a month on **Close the month** | Available |
| **Guardrail crossed** (`guardrail_crossed`) | A guardrail in your strategy is first found crossed. A guardrail that stays crossed isn't sent again. | Available |
| **Signal fired** (`signal_fired`) | A signal fires | Not yet available |
| **Score moved** (`score_moved`) | A score moves | Not yet available |

## Give an app key an address

Notices go to one address per [app key](https://docs.beaconrevenue.io/app-keys.md). Only an admin sets it, and only on an app key that is switched on. Agent keys don't get notices.

1. Go to **Build → Notices to apps**. Or open the app key: its side panel has a **Notices** part.
2. Next to the app key, select **Add address** and enter your server's address. It must start with `https://` and be on a public network.
3. Select **Save address**, then copy the **signing value**, which starts `bcn_ntc_`. Beacon shows it once. Your app uses it to check that each notice came from Beacon.

To get a new signing value, select **Change** and save the address again; the old value stops at once.

**Stop notices** (in the address form, or in the app key's side panel) stops notices for that key, including any Beacon is still trying to deliver. The key keeps working, so your app can still read Beacon. You can add an address again at any time.

## See each delivery

Under **Deliveries** on the **Notices** card, each notice shows the app key, when it happened, its status, the next try and how many tries so far. Select a notice to see every try.

| Status | Meaning |
| - | - |
| **Delivered** | Your server answered OK. |
| **Not answered yet** | Beacon will try again at the time shown under **Next try**. |
| **Failed after 24 hours** | Beacon tried 8 times over 24 hours with no OK answer. The card shows a warning while any failed delivery is listed. |
| **Stopped** | Notices to that app were stopped, or its key was switched off, so Beacon stopped trying. |

## What a notice holds

Beacon sends a `POST` with a JSON body. The body holds exactly these fields:

| Field | Meaning |
| - | - |
| `schema` | The notice format, `notice-v0.1` |
| `notice` | Which notice, for example `nightly_run_finished` |
| `notice_id` | The notice's ID. A notice tried again keeps the same ID, so your app can ignore one it has already handled. |
| `company_id` | Your company in Beacon |
| `happened_at` | When it happened (UTC) |
| `read_changes_since` | The moment to ask what changed since: the last notice of this kind to this address, or when the address was saved |
| `check_changes` | The call to make with your key: `/data/v1/changes?since=…` |

There is no figure, name or amount in a notice. What your app may read is decided at the re-read, by the key's access, and that read is recorded.

Each request also carries `Beacon-Signature` and `Beacon-Notice-Id` headers.

## Check the signature

`Beacon-Signature` reads `t=<unix seconds>,v1=<signature>`. The signature is an HMAC-SHA256, in hex, of `<t>.<raw body>`, keyed with your signing value. Check it against the raw body, before parsing, and refuse a notice signed more than five minutes ago.

```javascript theme={null}
import { createHmac, timingSafeEqual } from "node:crypto";

function isFromBeacon(signingValue, rawBody, header) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > 300) return false;
  const want = createHmac("sha256", signingValue).update(`${t}.${rawBody}`).digest("hex");
  return /^[0-9a-f]{64}$/.test(parts.v1 ?? "") &&
    timingSafeEqual(Buffer.from(parts.v1, "hex"), Buffer.from(want, "hex"));
}
```

## Answer, and how Beacon tries again

Answer with any `2xx` status within 10 seconds. Beacon doesn't read your reply and doesn't follow redirects.

Any other answer, or none, and Beacon tries again, with growing gaps: up to 8 tries in all, at about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours after the first. Beacon checks for tries due every 5 minutes, so on Beacon Demo the first tries again came about 5, 10 and 30 minutes after the first. After the last try Beacon marks the delivery failed. Nothing is lost: ask what changed since `read_changes_since` and your app catches up.

Switching the key off, stopping notices or changing the address stops the tries still waiting. Beacon stops at the next try that is due, and the delivery shows **Stopped**.

## Example

A notice received on Beacon Demo. The notice ID is shortened here.

```json theme={null}
{
  "schema": "notice-v0.1",
  "notice": "nightly_run_finished",
  "notice_id": "e6f2b394-…",
  "company_id": "co-beacon-demo",
  "happened_at": "2026-11-18T06:40:32Z",
  "read_changes_since": "2026-11-18T05:33:14.256Z",
  "check_changes": "/data/v1/changes?since=2026-11-18T05%3A33%3A14.256Z"
}
```

## Related

> [card] [Keep a dashboard current](https://docs.beaconrevenue.io/build/stay-current.md)
>
> Ask what changed since, then re-read only that.

> [card] [Build an app on the Data API](https://docs.beaconrevenue.io/build/app-on-the-api.md)
>
> Sign in with a key, read and page.

> [card] [App keys](https://docs.beaconrevenue.io/app-keys.md)
>
> Make a key and switch it off.


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