Skip to Content
Xeonr Developer Docs
API Specification

Devices and preferences

Everywhere one person can be reached and how they want to be: push devices, the Discord link, the preference grid and suppressed addresses.

postClear my Discord link

Stops Discord DM delivery to the caller. The connection at Xeonr Auth is untouched. The delegatable twin of UnlinkDiscord. **Required scopes:** `notify:discord:edit` — delegatable

postClear my preference

Removes an override so the cell inherits from a wider scope again. Distinct from setting it to off: off is a decision, absent is "whatever the product thinks". An unspecified channel clears every channel at that scope. **Required scopes:** `notify:devices:edit` — or `notify:preferences:edit` on a token a product obtained by RFC 8693 exchange to act for this person, in which case the call is confined to that product's own slice

postDelete suppression

Puts a suppressed address back in service: the caller's own, or any of them with `notify:platform:admin`. A bounce that was really an outage should not be permanent, and the person who fixed their mailbox should not need an operator. **Required scopes:** `notify:devices:edit`

postGet my delivery settings

Every place this person can be reached — devices, the address on their Xeonr account, their Discord link — together with which channels the deployment can actually use, and the caller's own suppressed addresses. Surfacing the suppressions to the person rather than only to an operator is deliberate: "you stopped getting our mail because it bounced" is something they can act on, and silence is not. **Required scopes:** `notify:devices:read`

postGet my Discord link

The Discord account notify will DM for the caller, if one is linked: id, username, and whether the bot found DMs closed last time. Absent when nothing is linked. **Required scopes:** `notify:discord:read` — delegatable, so a product's own settings screen can show it

postGet notify me

The caller's notify roles: whether they are a notify platform admin, which of their teams they administer, and the notify scopes their token carries. The console reads this to decide which screens to show; every RPC still enforces its own scopes. **Required scopes:** `notify:devices:read`

postGet push config

Whether web push can deliver in this deployment, the VAPID public key a browser subscribes against, and whether APNs/FCM credentials are held at all — so a native app knows before it asks whether registering a device token can work. **Required scopes:** `notify:devices:read` — or `notify:endpoints:read` on a token a product obtained by RFC 8693 exchange to act for this person, in which case the call is confined to that product's own slice

postImport endpoints

Registers a person's devices for the calling product, as the product's service account, with no user present. For migrating registrations a product already holds; a client registering a device it has in hand uses RegisterDevice with a delegated token instead. The bundle is the calling service account's own application (`delivery_app` is not a field), which must already hold the matching push credential. Idempotent on `(subject, install_id)`: a re-run replaces the token, as re-registering does. **Required scopes:** `notify:endpoints:import` (service-account only)

postImport preferences

Writes a person's preference cells for the calling product, as the product's service account, with no user present. For migrating rows a product already holds — a nightly job or a request handler that reaches for this instead of acting for the person is misusing it. The scope is the calling service account's own application (`app_slug` is not a field): a product cannot import another product's cells or the person's blanket rows. Idempotent: each cell upserts on `(subject, app, category, channel)`, so a re-run is safe. The in-app channel is refused, as it is everywhere. **Required scopes:** `notify:preferences:import` (service-account only)

postLink Discord

Reads the caller's **own** Discord connection from their Xeonr account and stores the id, so the bot can DM them. There is no second OAuth dance: the link already exists at the IDP, and this call is the consent to use it. Fails when the account has no Discord connection — connect it in the auth portal first — and needs a session that carries an access token, since notify asks auth as the caller. **Required scopes:** `notify:devices:edit`

postList my devices

The caller's own registered push endpoints, with their labels, platforms, last-seen times and the last error each one returned. Tokens are never included. Cursor-paginated: newest first, over an opaque cursor over `(created_at, id)`. `limit` is clamped to 500 (0 means the default of 50); pass `next_cursor` back as `cursor` for the next page. One person rarely has more than a handful of devices, so the first page is normally the whole list. **Required scopes:** `notify:devices:read` — or `notify:endpoints:read` on a token a product obtained by RFC 8693 exchange to act for this person, in which case the call is confined to that product's own slice

postList my preferences

The whole preference grid: a row per (app, category) the caller could plausibly hear from, a cell per channel, each cell carrying what the defaults would do, whether this person has overridden it, which wider scope an inherited answer came from, and whether the channel can serve them at all. Everything the console needs to render the grid without asking anything else. The stored rows are returned alongside it for a client that wants the overrides rather than the resolved grid. Cursor-paginated over `scopes`: the grid rows in `(app_slug, category)` ascending order — the everything row (both empty) sorts first — over an opaque cursor over that pair. `limit` is clamped to 500 (0 means the default of 50); pass `next_cursor` back as `cursor` for the next page. `preferences` is not paged: it is the caller's complete set of stored overrides and is repeated on every page. **Required scopes:** `notify:devices:read` — or `notify:preferences:read` on a token a product obtained by RFC 8693 exchange to act for this person, in which case the call is confined to that product's own slice

postList suppressions

Addresses notify has stopped sending to, with what the far end said and the delivery that caused it. A platform administrator (`notify:platform:admin`) sees all of them and may filter by channel or substring; anybody else sees their own, which is also on GetMyDelivery. Cursor-paginated: newest first, over an opaque cursor over `(created_at, id)`. `limit` is clamped to 500 (0 means the default of 50); pass `next_cursor` back as `cursor` for the next page. **Required scopes:** `notify:devices:read`

postReconcile managed rows

Deletes the rows a product created for a person through a delegated token — subscriptions, devices, preference cells and the Discord link stamped `managed_by` the calling product — as the product's service account, with no user present. Confined to the calling service account's own application: `managed_by` is never a field, so a product reaches only its own rows, and rows the person or another product created are untouched. Idempotent: a second call deletes nothing. **Required scopes:** `notify:managed:reconcile` (service-account only)

postRegister device

Registers a push endpoint for the caller. One row per (person, install id): re-registering replaces it, so token rotation is an upsert and a revoked device comes back to life. The token crosses this API exactly once and is sealed at rest; nothing ever returns it. A service account is refused — it has no devices. **Required scopes:** `notify:devices:edit` — or `notify:endpoints:edit` on a token a product obtained by RFC 8693 exchange to act for this person, in which case the call is confined to that product's own slice

postSend test

Sends a test notification to one of the caller's own devices — or over a named channel, to test email or Discord instead. It goes out for real but outside the ledger, so it proves the whole path from the console without leaving a delivery row. The response carries whatever the provider said when it failed. **Required scopes:** `notify:devices:edit`

postSet my Discord link

Stores the Discord account notify will DM for the caller. Verified before storing: the id must resolve, at Xeonr Auth, to the caller's own account — link Discord on the Xeonr account first (`/account/link/discord`), then call this. A product acting for a person uses this where the person would use LinkDiscord: it reads the person's connection from auth as them and hands notify the id, and notify checks it rather than trusting it. Re-linking clears a DM-blocked flag. **Required scopes:** `notify:discord:edit` — delegatable

postSet my preference

Sets one switch, at one scope: empty `app_slug` and empty `category` is the everything row, an app with no category is everything that product sends, and both together is one kind of event from one product. The most specific row that matches wins, per channel. Writing the state that already resolves is a no-op rather than an error, so a grid can submit whatever the person clicked. A channel that cannot serve this person at all is refused, and the in-app inbox cannot be switched off — it is the delivery record. **Required scopes:** `notify:devices:edit` — or `notify:preferences:edit` on a token a product obtained by RFC 8693 exchange to act for this person, in which case the call is confined to that product's own slice

postUnlink Discord

Stops Discord DM delivery to the caller. The connection at the IDP is untouched — this removes only notify's consent to use it. **Required scopes:** `notify:devices:edit`

postUnregister device

Revokes one of the caller's own push endpoints by install id. Pushes to it stop; registering the same install id again brings it back. **Required scopes:** `notify:devices:edit` — or `notify:endpoints:edit` on a token a product obtained by RFC 8693 exchange to act for this person, in which case the call is confined to that product's own slice