Skip to content

Scopes

A scope is a permission string that a Kit requests in its manifest: bot scopes in bot.scopes, user scopes in userScopes. The two sets are separate. A token holds the scopes granted when it was issued, limited to what the installed manifest version still requests; GET /auth/test shows them.

  • A scope never bypasses membership. A bot token sees only channels the Kit bot was added to. A user token sees only what its member can see.
  • Own messages only. messages:write edits and deletes only messages the token’s actor posted.
  • Missing scope: 403 with code missing_scope and the header X-Ketvia-Required-Scope: <scope>.
  • Wrong token type: 403 with code forbidden. In v1, Kit bots cannot add or remove reactions or upload files; use a user token for those even if the bot holds the scope. GET /runs/{id} takes user tokens only.
  • Least privilege. Request only what the Kit uses. Every scope is shown to the admin who installs the Kit, and users:read.email is shown as sensitive.

The method column is generated from the Web API route table. Methods without a scope (GET /auth/test, POST /auth/rotate, GET /users/me, GET /installation) work with any valid token of the right type.

ScopeBotUserGrantsWeb API methods
conversations:readYesYesList conversations the actor is in and read their metadata and members.GET /conversations
GET /conversations/{id}
GET /conversations/{id}/members
messages:readYesYesRead message history and threads in those conversations. Private assistant results are never included.GET /conversations/{id}/messages
GET /messages/{id}
GET /messages/{id}/replies
messages:writeYesYesPost messages (with Blocks), and edit and delete the actor’s own messages.POST /messages
PATCH /messages/{id}
DELETE /messages/{id}
messages:write.ephemeralLater phase (no v1 method)–Post messages visible to one member only.POST /messages/ephemeral
reactions:readYesYesRead reactions.None in v1
reactions:writeYes (method refused for bots in v1)YesAdd and remove the actor’s own reactions.POST /reactions
DELETE /reactions
files:readYesYesRead file metadata and content in visible conversations.GET /files/{id}
GET /files/{id}/content
files:writeYes (method refused for bots in v1)YesUpload files.POST /files
users:readYesYesRead the member directory: id, display name and role.GET /users
GET /users/{id}
users:read.emailYesYesAdds email addresses to member records. Shown as sensitive at install.Adds email to the users:read methods
commandsLater phase–Register the manifest’s slash commands.None in v1
incoming-webhookYes–Incoming webhooks into channels chosen by an admin.Incoming webhook URLs
assistant:toolsLater phase–Expose the manifest’s tools to Ketvia assistants.None in v1
feeds:publishYes–List the declared feeds with their connected-room counts and publish an event of a feed once; Ketvia posts it into every room the feed is connected to (none connected: 202, nothing posted).GET /feeds
POST /feeds/{type}/events
external-token:readYes–Fetch the installation’s current external access token (30 per minute).POST /installation/external-token
assistant-records:readYes–Read the notes linked to the Kit’s own records, in channels the Kit bot was added to.GET /installation/records/{type}/{id}/notes
assistant-records:writeYes–Add a note linked to one of the Kit’s own records, shown as written by the Kit.POST /installation/records/{type}/{id}/notes
runs:read–YesRead the member’s assistant runs (private runs only for their requester).GET /runs/{id}

Private Kits in this phase may request these bot scopes: conversations:read, messages:read, messages:write, reactions:read, reactions:write, files:read, files:write, users:read, users:read.email and incoming-webhook, commands and messages:write.ephemeral, plus any user scope. assistant:tools is rejected until a later phase. messages:write.ephemeral is the scope of POST /messages/ephemeral.

feeds:publish is bot-only and required by every Kit whose manifest declares feeds (a manifest with feeds but without the scope, or the scope without feeds, is rejected). The Kit publishes an event once with POST /feeds/{type}/events; it never learns which rooms the people of a workspace connected the feed to, and Ketvia posts the Kit bot’s message into each of them. The admin sees this scope at install time as “Posts events from the Kit to the channels you connect”. See Event feeds; 202 with subscriptions: 0 (nobody connected the feed) is not an error.

external-token:read is bot-only and may be requested only by a Kit that declares externalAuth and sets tools.auth to signature+externalToken. It hands the Kit the connected external account’s current access token (refreshed when it is about to expire) through POST /installation/external-token, so scheduled work and webhook-driven cards can run without a user request. It gives the Kit nothing the signed tool calls do not already carry. Calls are limited to 30 per minute per installation; each one, and each refusal, is audited with ids and the expiry (never the token), and the response is Cache-Control: no-store. 409 external_auth_required means the external account must be reconnected: skip the work and post nothing. 503 external_auth_unavailable with Retry-After: 30 means the account is temporarily unavailable: retry later, do not reconnect. Never keep the token beyond its expiresAt; the SDK’s installation.externalToken() does not retry after a 5xx.

assistant-records:read and assistant-records:write are bot-only. They let a Kit read and add notes linked to its own records (the types its manifest declares under records), through GET|POST /installation/records/{type}/{id}/notes. A note is always a plain note shared with one channel the Kit bot was added to; members see it beside their own notes of that record, marked as written by the Kit. A Kit never reads private notes, notes in channels it was not added to, or notes linked by another Kit. See Records. The admin sees them at install time as “Reads notes linked to its own records” and “Adds notes linked to its own records”.

GET /installation/settings needs no scope (bot tokens only): it returns the installation settings an admin saved.

There are deliberately no admin scopes: no scope lets a Kit manage members or channels, read the audit log, change assistant permissions, or create, approve or reject approvals.