Skip to Content
Xeonr Developer Docs
API SpecificationTopics

Add sink

POST
/xeonr.notify.v1.TopicService/AddSink

Routes a topic to a shared destination. An upsert on (topic, channel, target): re-adding a destination edits its filters rather than being refused. Only Discord and webhook are sinks — the other channels reach a person rather than a place. A webhook sink's signing secret is returned exactly once, here. Needs manage on the topic.

Required scopes: notify:topics:edit

Authorization

BearerAuth
AuthorizationBearer <token>

An access token from Xeonr Auth, presented as Authorization: Bearer <token>. Its audience must include https://notify.xeonr.io, and it must carry the scope the method lists.

In: header

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

topicId?string
Length1 <= length <= 32
channel?not unknown

Channel is how a delivery reaches somebody. In-app is the inbox row and always exists for a matched subscriber, so the ledger names every person a message reached even when nothing was pushed.

Value in"CHANNEL_UNSPECIFIED" | "CHANNEL_IN_APP" | "CHANNEL_WEB_PUSH" | "CHANNEL_NATIVE_PUSH" | "CHANNEL_EMAIL" | "CHANNEL_DISCORD" | "CHANNEL_WEBHOOK"
target?string

For discord: the channel snowflake the bot posts in. The bot must already be in that guild and able to post.

For webhook: the https URL to POST to. Refused if it resolves to a private or link-local address — notify will not be used to reach something only it can see.

Length1 <= length <= 1024
label?string
Lengthlength <= 191
minPriority?integer

0 means every message.

Formatint32
Range0 <= value <= 5
apps?array<>

The same narrowing a subscription takes. Empty means no restriction.

Itemsitems <= 32
tags?array<>
Itemsitems <= 32
kinds?array<>
Itemsitems <= 64
categories?array<>
Itemsitems <= 32
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://notify.xeonr.io/xeonr.notify.v1.TopicService/AddSink" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "sink": "map[apps:[xmb] categories:[requests] channel:CHANNEL_WEBHOOK createdAt:2026-10-22T09:30:00Z createdBy:urn:xeonr:auth:uid:user:3 hasSecret:true id:sk_8a2f6c1e9d4b7a3e0c5f2d64 kinds:[] label:Ops webhook minPriority:4 tags:[] target:https://hooks.example.com/notify/xmb-requests topicId:tp_3f9a1c7e2b8d4a6f0c5e9b12]",
  "secret": "whsec_EXAMPLE_ONLY_not_a_real_secret_000000000000"
}