Apps and bots
An app is how a program joins an org as itself instead of as a person. Each app installed in an org has its own bot user: its posts carry a BOT badge, it never takes a seat, it can't sign in, and it never appears in a direct message or group chat.
Make an app
- Open Org Settings → Integrations → Apps & bots → New app. You need the Manage integrations permission (Owner, Admin, or a custom role that grants it).
- Give it a name (also the bot's name; people @mention it by its handle), an optional icon and links, and the scopes it needs. Pick the fewest that work.
messages:read:all(read every channel) is for Owners and Admins to grant, with a warning. - Make token gives the app a token (
msv_bot_…), shown once. It acts as the bot, in this org only, within the install's scopes.
An app from another maker is installed through Browse apps or its "Add to Missived" link (OAuth). Either way the result is the same: an install with a bot user and scopes.
Adding an app to channels
A bot sees the org's public text channels, but it reads messages only in channels it was added to, and that is the only way it ever sees a private channel. Add it from the channel's ⋯ menu → Add an app (anyone who can manage that channel, or who has Manage integrations), or over the API:
curl -X PUT https://api.missived.com/v1/channels/<channelId>/apps/<installId> \
-H "Authorization: Bearer $MISSIVED_TOKEN"
Removing it cuts it off at once: its token stops reading that channel, and its event subscriptions and gateway stop receiving that channel's events. GET /v1/me with the app's token lists the channels it is in (app.channel_ids).
An app can't be added to a direct message, a group chat, a personal channel or a voice channel. Nor to a channel in a category shared with another workspace: no token (an app's, a person's or an AI assistant's) reaches a shared channel, and apps already in one are removed when the share is accepted.
What a bot can do
- Post with
POST /v1/channels/{channelId}/messages. A bot may sendembeds(cards) andcomponents(buttons and menus), and attach files it uploaded. - Mentions are quiet by default. A bot's @mentions notify nobody unless it passes
allowed_mentions(Discord's rules).@everyone,@hereand roles also need the person who set the app up to be allowed to use them. - Read messages in the channels it was added to (
messages:read), or everywhere it can see withmessages:read:all. - Hear about things through event subscriptions or the bot gateway, and answer slash commands.
- Never read direct messages, group chats or people's email addresses.
A bot edits, deletes and changes only its own messages.
Pause, change and uninstall
In Apps & bots, each app has:
- Pause / Resume. While paused, its tokens, commands, buttons and gateway connection are refused. Nothing is revoked; resuming puts it back as it was.
- Change scopes. Its tokens take the new scopes at once; a gateway connection that loses an intent's scope is closed.
- Uninstall. Every token is revoked, it leaves every channel, and the event subscriptions its tokens made are deleted. Its past messages stay, with their BOT badge.
The TypeScript SDK
@missived/bot (Node 22.18 or later, no dependencies) wraps the REST API with typed operations, paging and 429 back-off, runs a gateway connection with heartbeats and resume, verifies signed interactions, and builds components. It isn't on npm yet; use it from the Missived repository's integrations/missived-bot-sdk folder.
import { RestClient } from "@missived/bot";
const rest = new RestClient({ token: process.env.MISSIVED_TOKEN });
await rest.createMessage("<channelId>", { content: "Build passed" }, { idempotencyKey: "build-123" });
const file = await rest.uploadFile("<orgId>", { name: "build.log", type: "text/plain", data: logBytes });
await rest.createMessage("<channelId>", { content: "Log attached", attachment_ids: [file.id] });
rest.call(operationId, { path, query, body }) reaches every operation in the API reference.