Using the API
The ConnectRPC surface, authentication, and the methods by service.
Everything the console does is an HTTP call to https://notify.xeonr.io, and so
is everything an SDK does. Requests are POST with a JSON body; responses are
JSON.
POST https://notify.xeonr.io/xeonr.notify.v1.<Service>/<Method>
Content-Type: application/json
Authorization: Bearer <token>Generated clients for Go and TypeScript come from the BSR module
proto.prod.wtf/xeonr/notify. Every method, with its request and response in
full and the scope it requires, is in the API reference,
generated from that module; this page is the map.
Authentication
- An access token from
auth.xeonr.io, for a person or a service account. The token's audience must includehttps://notify.xeonr.io. - A browser session from the console, on the same endpoints, so the console needs no separate surface.
- A publish key — but only on
/p/<key>, never here.
A service account exchanges its assertion for a token the usual way.
Two checks, in order. First the scope: each method requires one, named in
the reference — notify:topics:read, notify:messages:edit,
notify:devices:edit and so on, where admin implies edit implies read
within one resource. A token without it is refused with permission_denied
before anything else is looked at. Then the capability: on a topic, what you
may do is decided by your grant on it (see topics), so a
token carrying notify:topics:edit still cannot touch a topic it holds no grant
on. notify:platform:admin marks a platform administrator (it replaced
notify:admin on 2026-11-04).
A service account reaches only the methods built for a product — publishing, topics and their sinks, kinds and templates, its application's credentials and the backfills. Everything about a person (devices, subscriptions, preferences, the inbox) refuses one, because a service account has nowhere to be notified.
A product can also call the person-level methods as one of its users, with a token it obtained for them by RFC 8693 exchange; notify then confines the call to that product's own slice. See acting for a user.
MessageService
| Method | Needs |
|---|---|
Publish | publish on the topic |
ListMessages | any capability, or a public topic |
GetMessage | any capability, or a public topic. The full ledger needs manage; otherwise you see your own rows. |
ListRecent | — the newest across every topic you can see |
Stream | any capability, or a public topic. since replays first. |
ListInbox / MarkRead / UnreadCount | — your own in-app deliveries |
GetStats | — headline numbers over your topics |
PublishRequest in full:
| Field | |
|---|---|
topicId | required |
title, body | one of them required, unless a template supplies them |
priority | 1–5; 0 means the default |
tags, clickUrl | |
appSlug | the publishing product. Left empty, a service account's own application is used, else the topic's. |
kind | the event kind, which selects a template |
payload | template variables, matched against the template's declared variables |
recipients | [{urn, role}] — direct it at people or teams instead of subscribers |
idempotencyKey | publishing it twice on one topic is one message |
coalesceKey | collapse an earlier message that has not left yet |
deliverAt | hold it; at most 30 days out |
actions | [{label, url}], at most 3, http(s) only |
markdown | the body is markdown |
fields | [{name, value, inline}], at most 10 — labelled facts, laid out per channel (below) |
colour | #rrggbb accent for channels that tint; empty leaves the priority colour |
attachments | [{url, filename, contentType, sizeBytes}], at most 10 — files that go with the message (below) |
Fields are for the facts a reader scans — Status: In Progress → Done,
Assignee: Ada — rather than prose. Discord shows them as embed fields, inline
ones up to three to a row; email as a two-column list under the body, in both the
HTML and the text part; the console's inbox under the body; a webhook receives
them as fields. Push leaves them out. They go through the same neutraliser as
the title and body, so a field can neither format itself nor mention anybody, and
on a sensitive message they are withheld and scrubbed with the body.
Colour tints the Discord embed in place of the priority colour, except at
priority 5, where red is the point. Anything but #rrggbb is refused.
Attachments are files that belong with the message — a screenshot on a bug
report, a log on a comment. Each is an https URL you sign, a filename, and
optionally a content type and size. Notify fetches the file at send time,
through a client that refuses private and link-local addresses and does not follow
redirects, so make the link last as long as a delivery may be retried. Discord
gets the files uploaded (up to 8 MB each, 9 MB in all; the first image becomes the
embed's picture) and an Attachments field naming every one, including any that
did not fit or could not be fetched. Email lists them by name under the body, and
a webhook receives attachments as names, types and sizes. The URL is never
returned: reading the message back gives the filename, type and size only. On a
sensitive message they are withheld and scrubbed with the body.
PublishResponse returns the message, created (false when an idempotency key
matched an earlier publish — that is the key working, not an error), and
superseded, the number of earlier messages this one collapsed.
TopicService
| Method | Needs |
|---|---|
ListMyTopics | — every topic you have any capability on, across every owner |
ListPublicTopics | nothing; answers an anonymous caller |
ListTopics | notify:topics:read, held by a platform administrator (notify:platform:admin) |
GetTopic | any capability, or a public topic |
CreateTopic | ownership of the owner, or admin of the owning team |
UpdateTopic / DeleteTopic | manage |
ListGrants / AddGrant / RemoveGrant | manage |
ListKeys / CreateKey / RevokeKey | manage |
ListSubscribers | manage |
Subscribe / Unsubscribe / ListMySubscriptions | subscribe, for yourself |
ListSinks / AddSink / RemoveSink | manage |
RotateSinkSecret | manage — a webhook sink's new signing secret, returned once; the old one stops verifying immediately |
DescribeDiscordChannel / DescribeDiscordGuild | manage |
ListApps | — the products you may configure, read from auth |
SetAppEnabled | admin of the team that owns the application, or notify:platform:admin. Display only: it never affects whether that app may publish |
A topic is owned by a person or a team, never a service account: CreateTopic
refuses a service-account ownerUrn. A product's service account that leaves
ownerUrn empty creates the topic for its product — owned by the team that owns
its application, with a manage grant to the service account.
CreateTopic returns AlreadyExists for a name the owner already has, which is
safe for a product minting a topic per user to treat as success.
DeviceService
Everywhere one person can be reached, and how they want to be.
| Method | |
|---|---|
GetNotifyMe | who you are to notify: platform admin or not, the teams you administer, the notify scopes your token carries |
GetPushConfig | whether web push works here, and the VAPID public key |
RegisterDevice / UnregisterDevice / ListMyDevices | one row per (person, install id); re-registering replaces, so token rotation is an upsert |
SendTest | pushes a test outside the ledger, to prove the path |
GetMyDelivery | every place you can be reached, and any blocked addresses |
LinkDiscord / UnlinkDiscord | reads your own Discord connection from your Xeonr account — there is no second OAuth dance |
GetMyDiscordLink / SetMyDiscordLink / ClearMyDiscordLink | the same link, for a product acting for you: the id it supplies is verified against your Xeonr connections before it is stored |
ListMyPreferences / SetMyPreference / ClearMyPreference | the preference grid |
ImportPreferences | a product's one-shot backfill of rows it already holds, as its service account — see acting for a user |
ImportEndpoints | the same for devices: a product's service account registers the push endpoints it already holds for a person, under notify:endpoints:import. Idempotent on (person, install id) |
ReconcileManaged | a product's service account deletes what its delegated calls and imports created for one person, under notify:managed:reconcile — see acting for a user |
ListSuppressions / DeleteSuppression | all of them with notify:platform:admin; your own otherwise |
TemplateService
| Method | Needs |
|---|---|
ListKinds / PutKind / DeleteKind | admin of the team that owns the app, or the app's own service account — a product owns its catalogue |
ListTemplates / GetTemplate | as above |
SaveDraft / PublishTemplate / UnpublishTemplate / DeleteTemplate | as above |
PreviewTemplate | renders against sample values, server-side, so the preview is what would be sent |
Versions are immutable once published, and a message records the version it rendered through — so the log can show what the wording came from after the template has moved on.
CredentialService
What notify sends as: a Discord bot, an SMTP relay, an APNs key, an FCM account, a VAPID pair. Owned by an application, a team, or a person.
| Method | Needs |
|---|---|
DescribeKinds | — each kind's fields, so a UI can build its own form |
ListCredentials / ListMyCredentials | admin of the owning team, or notify:platform:admin; for an application's credentials, also that application's own service account |
PutCredential / DeleteCredential | as above |
VerifyCredential | as above — does real work where it can and says so where it cannot |
Resolution is publishing app → topic owner → the deployment's own. A secret is write-only: send an empty one to keep what is stored, and delete the credential to clear it.
Errors
Standard Connect codes.
| Code | Usually |
|---|---|
unauthenticated | no usable credential |
permission_denied | authenticated, but not for this — the token lacks the method's scope, a service account called a person-level method, or no grant allows it |
not_found | no such thing — or a topic you have no capability on, which is deliberately indistinguishable |
invalid_argument | the message says what is wrong; it is meant to be shown |
already_exists | a unique constraint, e.g. a topic name |
failed_precondition | the channel is not configured on this deployment |