Overview
The Bots API allows you to create custom bots with specific permissions (scopes), manage bot lifecycle, regenerate API tokens, and provide a marketplace for installing public bots. Bots can respond to commands, send messages, and integrate with external services via webhooks.Bot Scopes
Scopes define what permissions a bot has:messages:read- Read messages in channelsmessages:write- Send messages to channelschannels:read- Read channel informationchannels:write- Create and modify channelsusers:read- Read user informationreactions:write- Add reactions to messagescommands:register- Register slash commands
Bot Management
These methods are for bot creators to manage their bots.bot.create
Create a new bot with specified scopes and permissions. Returns a plain API token that is only shown once.Bot name (1-100 characters)
Bot description (max 500 characters)
URL to receive bot events and command invocations
Array of permission scopes for the bot
Whether the bot is listed in the public marketplace
The created bot object
Plain API token - only returned on creation, store securely
Transaction ID for optimistic updates
UnauthorizedError- User is not authenticatedRateLimitExceededError- Too many requestsInternalServerError- Server error
bot.list
List all bots created by users in your organization.Array of bots created in your organization
UnauthorizedError- User is not authenticatedInternalServerError- Server error
bot.get
Get details for a specific bot by ID.Bot identifier
Bot object
Transaction ID for optimistic updates
BotNotFoundError- Bot doesn’t existUnauthorizedError- User is not org admin or bot creatorInternalServerError- Server error
bot.update
Update bot configuration including name, description, webhook URL, scopes, or visibility.Bot identifier
New bot name (1-100 characters)
New description (max 500 characters), set to null to clear
New webhook URL, set to null to clear
New array of permission scopes
Whether bot should be public in marketplace
Updated bot object
Transaction ID for optimistic updates
BotNotFoundError- Bot doesn’t existUnauthorizedError- User is not org admin or bot creatorRateLimitExceededError- Too many requestsInternalServerError- Server error
bot.delete
Soft delete a bot. The bot will be disabled and hidden but can potentially be restored.Bot identifier
Transaction ID for optimistic updates
BotNotFoundError- Bot doesn’t existUnauthorizedError- User is not org admin or bot creatorInternalServerError- Server error
bot.regenerateToken
Generate a new API token for a bot. The old token is invalidated immediately.Bot identifier
Bot object with updated token hash
New plain API token - store securely
Transaction ID for optimistic updates
BotNotFoundError- Bot doesn’t existUnauthorizedError- User is not org admin or bot creatorRateLimitExceededError- Too many requestsInternalServerError- Server error
bot.updateAvatar
Update the bot’s avatar image URL.Bot identifier
URL to the bot’s avatar image
Updated bot object
Transaction ID for optimistic updates
BotNotFoundError- Bot doesn’t existUnauthorizedError- User is not bot creatorInternalServerError- Server error
bot.getCommands
List all commands registered by a bot.Bot identifier
Array of bot commands
BotNotFoundError- Bot doesn’t existUnauthorizedError- User is not org adminInternalServerError- Server error
Bot Marketplace
These methods are for users to discover and install public bots.bot.listPublic
Browse all public bots available for installation. Returns bots with their installation status for your organization.Optional search query to filter bots
Array of public bots
UnauthorizedError- User is not authenticatedInternalServerError- Server error
bot.listInstalled
List all bots installed in your organization.Array of installed bots
UnauthorizedError- User is not authenticatedInternalServerError- Server error
bot.install
Install a public bot to your organization.ID of the public bot to install
Transaction ID for optimistic updates
BotNotFoundError- Bot doesn’t exist or is not publicBotAlreadyInstalledError- Bot is already installedUnauthorizedError- User is not org adminRateLimitExceededError- Too many requestsInternalServerError- Server error
bot.installById
Install a bot by ID, regardless of whether it’s public or private. This allows users to install bots by sharing their bot ID directly.ID of the bot to install
Transaction ID for optimistic updates
BotNotFoundError- Bot doesn’t existBotAlreadyInstalledError- Bot is already installedUnauthorizedError- User is not org adminRateLimitExceededError- Too many requestsInternalServerError- Server error
bot.uninstall
Remove a bot from your organization.ID of the bot to uninstall
Transaction ID for optimistic updates
BotNotFoundError- Bot is not installedUnauthorizedError- User is not org adminRateLimitExceededError- Too many requestsInternalServerError- Server error