Skip to Content
Xeonr Developer Docs
API SpecificationTopics

Add grant

POST
/xeonr.notify.v1.TopicService/AddGrant

Confers a capability on a topic to a user, service-account or team URN. Adding one that already exists is a no-op rather than an error. Manage implies publish and subscribe: whoever can rewrite the grants can give themselves the rest. 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
granteeUrn?string
Length1 <= length <= 191
capability?not unknown

Capability is what a grant confers on a topic. Manage implies the other two: whoever can rewrite the grants can give themselves the rest.

Value in"CAPABILITY_UNSPECIFIED" | "CAPABILITY_PUBLISH" | "CAPABILITY_SUBSCRIBE" | "CAPABILITY_MANAGE"
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://notify.xeonr.io/xeonr.notify.v1.TopicService/AddGrant" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "grant": "map[capability:CAPABILITY_PUBLISH createdAt:2026-10-22T09:30:00Z createdBy:urn:xeonr:auth:uid:user:3 granteeUrn:urn:xeonr:auth:uid:service_account:57 id:gr_1e8c3f7a2d9b4e6c0a5f8b21 topicId:tp_3f9a1c7e2b8d4a6f0c5e9b12]"
}