Topics, keys and access
What a topic is, who can publish to it or read it, and how publish keys work.
A topic is a stream. It is owned by a person or a team, has a slug path for a name, and is created before anything publishes to it.
owner urn:xeonr:auth:team:59a7308e-… or a user URN
name ci/builds xmb/requests/u-3 a slug path, unique within the ownerNames are paths so thousands of per-user topics stay legible: a product that
mints xmb/requests/u-3 per person gets them grouped under the product that
created them, each with a display name of its own.
Capabilities
Three, and they are not scopes — they are per topic.
| Means | |
|---|---|
publish | send to it |
subscribe | follow it and receive it |
manage | rename, set defaults, rewrite grants, mint keys |
manage implies the other two: somebody who can rewrite the grants can trivially
give themselves the rest, so pretending otherwise only adds a step.
Where they come from, in order:
- the owner holds all three;
- a team-owned topic gives every member publish and subscribe; managing it needs the team's owner role;
- a grant —
(topic, grantee, capability)— where the grantee is a user, a service account, or a team URN. A team grant resolves through membership when the message is sent, not when the grant was made.
Team membership is never required to receive a notification
This is the part worth reading twice. A direct user grant is the normal way to
give an end user a topic: they get subscribe on a topic a team owns, they see it
in their own list, they receive it — and they have no relationship with that team
at all, now or ever. Nobody has to be added to a team to be notified.
So "my topics" is every topic where you have any capability, across every owner, regardless of which team you are looking at.
Public topics
public_subscribe makes a topic readable without a credential — a status feed.
Reading is anonymous; publishing never is.
curl -X POST https://notify.xeonr.io/xeonr.notify.v1.TopicService/ListPublicTopics \
-H 'Content-Type: application/json' -d '{}'GetTopic, ListMessages, GetMessage and Stream also answer an
unauthenticated caller for a public topic. A delivery ledger is filtered to the
caller's own rows, which for an anonymous caller is none of them.
Publish keys
A key is a Xeonr API key bound to one topic:
xk_A54Ey4WXKZ3wB2MA6f0AZ911SIchOeUKNyGxRfIzTljUJ3POST https://notify.xeonr.io/p/<key> needs no token and no handshake. That is
the point: it is the form you paste into Grafana, a GitLab webhook, a phone
shortcut or a one-line shell alias — anything that cannot do OAuth.
Because the URL is the whole secret, a key is deliberately small:
- bound to one topic, and publish-only — a key can never read or manage;
- individually revocable without renaming the topic, and several per topic so you can rotate one consumer at a time. A revoked key stops working within 30 seconds;
- optionally expiring;
- rate-limited per key;
- never echoed or logged. A wrong key and a revoked key get the same 404.
The secret is shown once, when you create it. Only its prefix is visible afterwards. Keys are held by Xeonr Auth, so every key that acts as you is also listed at your account's API keys page.
By default a key is identityless: it belongs to the topic, keeps working
whoever leaves, and messages published with it are attributed to the key itself,
urn:xeonr:auth:api-key:<id>. A key can instead publish as you — it is then
attributed to you and stops working if you lose access to notify — and only you
can create a key in your own name. A key that publishes as one of a product's
service accounts is created through the API (CreateKey with identity_urn).
Keys created before October 2026 start pk_…. They keep working unchanged.
Sinks
A sink is a shared destination a topic routes to independently of anybody's subscription: a Discord channel the whole guild reads, or a webhook. It narrows exactly as a subscription does — a priority floor, and allow-lists on the publishing app, tags, event kinds and categories.
Use the floor. A shared channel drowned in routine traffic is a whole team that stops reading it, and then stops reading the thing that mattered.
Checking a Discord channel before you route to it
A product usually runs one Discord bot in many of its tenants' servers, so the
bot being able to post in a channel says nothing about whose channel it is. Two
read-only calls answer the questions a product needs before adding a sink for a
tenant. Both look as the bot a sink on the topic would post as, and need
manage on the topic:
DescribeDiscordChannel(topic_id, channel_id)returns the channel's server (guild_id) and name. Check the server belongs to the tenant before callingAddSink.FAILED_PRECONDITIONmeans the bot cannot see the channel;INVALID_ARGUMENTmeans it is a DM, not a server channel.DescribeDiscordGuild(topic_id, guild_id, manager_subject)returns the server's name and, if you pass a person, whether the Discord account they linked in notify owns the server or holds Manage Server or Administrator there (manager_linked,manager). Ask this before letting someone claim a server for a tenant, so nobody can claim a server they do not run.FAILED_PRECONDITIONmeans the bot is not in the server.
Retention
Each topic sets its own, in hours. Messages past it are deleted with their
deliveries. It is also what makes Stream's since= replay work: a client that
was offline catches up from the server's copy, so the retention window is the
catch-up window.