Skip to Content
Xeonr Developer Docs

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 include https://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

MethodNeeds
Publishpublish on the topic
ListMessagesany capability, or a public topic
GetMessageany 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
Streamany 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
topicIdrequired
title, bodyone of them required, unless a template supplies them
priority1–5; 0 means the default
tags, clickUrl
appSlugthe publishing product. Left empty, a service account's own application is used, else the topic's.
kindthe event kind, which selects a template
payloadtemplate variables, matched against the template's declared variables
recipients[{urn, role}] — direct it at people or teams instead of subscribers
idempotencyKeypublishing it twice on one topic is one message
coalesceKeycollapse an earlier message that has not left yet
deliverAthold it; at most 30 days out
actions[{label, url}], at most 3, http(s) only
markdownthe 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

MethodNeeds
ListMyTopics— every topic you have any capability on, across every owner
ListPublicTopicsnothing; answers an anonymous caller
ListTopicsnotify:topics:read, held by a platform administrator (notify:platform:admin)
GetTopicany capability, or a public topic
CreateTopicownership of the owner, or admin of the owning team
UpdateTopic / DeleteTopicmanage
ListGrants / AddGrant / RemoveGrantmanage
ListKeys / CreateKey / RevokeKeymanage
ListSubscribersmanage
Subscribe / Unsubscribe / ListMySubscriptionssubscribe, for yourself
ListSinks / AddSink / RemoveSinkmanage
RotateSinkSecretmanage — a webhook sink's new signing secret, returned once; the old one stops verifying immediately
DescribeDiscordChannel / DescribeDiscordGuildmanage
ListApps— the products you may configure, read from auth
SetAppEnabledadmin 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
GetNotifyMewho you are to notify: platform admin or not, the teams you administer, the notify scopes your token carries
GetPushConfigwhether web push works here, and the VAPID public key
RegisterDevice / UnregisterDevice / ListMyDevicesone row per (person, install id); re-registering replaces, so token rotation is an upsert
SendTestpushes a test outside the ledger, to prove the path
GetMyDeliveryevery place you can be reached, and any blocked addresses
LinkDiscord / UnlinkDiscordreads your own Discord connection from your Xeonr account — there is no second OAuth dance
GetMyDiscordLink / SetMyDiscordLink / ClearMyDiscordLinkthe same link, for a product acting for you: the id it supplies is verified against your Xeonr connections before it is stored
ListMyPreferences / SetMyPreference / ClearMyPreferencethe preference grid
ImportPreferencesa product's one-shot backfill of rows it already holds, as its service account — see acting for a user
ImportEndpointsthe 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)
ReconcileManageda 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 / DeleteSuppressionall of them with notify:platform:admin; your own otherwise

TemplateService

MethodNeeds
ListKinds / PutKind / DeleteKindadmin of the team that owns the app, or the app's own service account — a product owns its catalogue
ListTemplates / GetTemplateas above
SaveDraft / PublishTemplate / UnpublishTemplate / DeleteTemplateas above
PreviewTemplaterenders 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.

MethodNeeds
DescribeKinds— each kind's fields, so a UI can build its own form
ListCredentials / ListMyCredentialsadmin of the owning team, or notify:platform:admin; for an application's credentials, also that application's own service account
PutCredential / DeleteCredentialas above
VerifyCredentialas 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.

CodeUsually
unauthenticatedno usable credential
permission_deniedauthenticated, 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_foundno such thing — or a topic you have no capability on, which is deliberately indistinguishable
invalid_argumentthe message says what is wrong; it is meant to be shown
already_existsa unique constraint, e.g. a topic name
failed_preconditionthe channel is not configured on this deployment

On this page