Docs / Integration API contract

Slash commands

An administrator registers a command against a URL. When someone runs it, the app receives a form-encoded POST with command, text, team_id, team_domain, channel_id, channel_name, user_id, user_name, api_app_id, response_url and trigger_id. There is no legacy verification token; check the signature instead.

The app's immediate answer, within four seconds:

  • an empty body acknowledges the command and shows nothing;
  • plain text is shown privately to the person who ran it;
  • JSON with text or blocks is shown privately, or posted to the channel as the bot with "response_type": "in_channel".

A command run from inside a thread answers in that thread. If the app answers with an error status, or not in time, the person who ran it is told privately that the command failed.

response_url#

Accepts a JSON POST with the same fields as an immediate answer, five times within thirty minutes, as on Slack. It is spent early if the app is deleted or deactivated, its bot loses access to the conversation, the conversation is archived, or the person it answers is deactivated — and then answers 404 expired_url. It is held in memory, so a restart ends it.

This page is made from docs/INTEGRATIONS.md.