taking longer than usual.

skip to content
sometimes/ developers

developers / bots / resources

commands and interactions

commands are available to their installing user in eligible chats. they do not expose ambient conversation history.

API 1 · REST + gatewaydownload reference

command definitions

each application can publish up to 100 commands. name is 1–32 lowercase ASCII letters, digits, hyphens or underscores, description is 1–100 visible characters. each command has up to 25 named options of type string, integer, number, boolean, user, message or attachment, with required flags and optional choices. choices are limited to 25. strings are at most 4,000 characters. no arbitrary HTML, scripts, forms or executable components. the command picker shows bot identity to disambiguate names.

using commands in chat

type / as the first character in the message bar to open the command picker. use the arrow keys and Tab to complete a command, then fill its named options. Escape closes the picker. the invocation and its arguments remain private to the person submitting it; a bot’s public replies appear in the shared chat. a single-chat installation takes precedence over the same user’s account-wide installation, including when commands were declined for that chat.

invocation routing

only the installing user can invoke that installation’s commands. a different member needs their own installation; another user’s click never borrows the installer’s authority. include installer_id, installation_id, application_id, chat_id, command_id, configuration_revision and validated options in Interaction. user/message/attachment options contain IDs and basic labels only unless their normal read/download grants permit more. command input itself is explicit user-submitted data and needs no ambient message-read grant. the server verifies command existence and scope against the installation’s pinned revision.

acknowledgement and replies

acknowledge within three seconds with ephemeral:true or false. a missed deadline expires the interaction and shows a user-facing failure. after ACK, one initial response and up to four follow-ups are allowed for 15 minutes from creation; the visibility choice is fixed. public responses need bot.messages.send, private responses need bot.messages.ephemeral, in addition to commands. all responses use bot identity. other actions, including delegated sends, still require their own grants. error messages sent by the platform are not a grant to send arbitrary content.

command routes

command definition routes are application-level and update the draft; commands must be enabled in the draft configuration. response routes require the interaction’s exact installation header and still-active grants. only responses associated with that interaction can be edited or deleted through its response routes.

scroll the table horizontally to see all columns.

method and pathrequestresult
GET /applications/@me/commandscursor, limitdraft Command list
POST /applications/@me/commandsname, description, options[]201 Command{id,revision,...}
PATCH /applications/@me/commands/{id}definition patch; If-MatchCommand
DELETE /applications/@me/commands/{id}If-Match204; remove from draft
POST /interactions/{id}/ackephemeral: boolean204; fixed response visibility
POST /interactions/{id}/responsescontent, ephemeral201 Message; initial then follow-ups
PATCH /interactions/{id}/responses/{message}content; If-MatchMessageReceipt with changed content and revision; bot.messages.edit required
DELETE /interactions/{id}/responses/{message}If-Match204; bot.messages.delete required

interaction payload

an interaction is not a user session or bearer credential. the application token, installation and live permission checks remain necessary.

JSON
{
  "id": "interaction_example",
  "application_id": "app_example",
  "installation_id": "install_example",
  "installer_id": "user_example",
  "chat_id": "chat_example",
  "command_id": "command_hello",
  "configuration_revision": "3",
  "options": {},
  "created_at": "2026-10-20T07:00:00Z",
  "ack_deadline": "2026-10-20T07:00:03Z",
  "expires_at": "2026-10-20T07:15:00Z"
}