레퍼런스HTTP APIAgents

Slack's interactivity request URL for one agent's app

POST
/v1/slack/interactions/{agent_id}

Called by Slack, not by people: each agent app's interactivity points here, beside its events route (Finalize registers both when an https events address is known, as for the events route). It takes the buttons and the modal of the messages the agent posts in a thread when its session waits on a person: allow or deny a tool permission, answer a question, approve or reject a push request. The form body is read up to 256 KiB (413 above that) and checked as events are: the v0 signature over the raw bytes with the app's signing secret and the timestamp within 300 seconds, else the same 401. The payload field is Slack's JSON. Each press is judged for the Slack user who pressed it, through their linked account, as the same session.approve decision the web makes; a refusal, or a request already answered, is told to that person alone and nothing is answered twice. A request settled here updates its message in place with who settled it and how. A block_actions press answers {"ok": true}; a submitted question modal answers {"response_action": "clear"}, or errors naming the blocks to fix. Rate limited per agent and overall before any database read (429).

Auth: public; no credential. Idempotency-Key: ignored.

Path Parameters

agent_id*string

The agent whose Slack app sends the interactions.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/x-www-form-urlencoded
  1. body
payload*string
Length2 <= length

Response Body

{"ok": true} for a button press, {"response_action": "clear"} or {"response_action": "errors", ...} for a submitted modal.

application/json
  1. response
ok*boolean
Example Request
curl -X POST 'https://example.com/v1/slack/interactions/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'payload=%7B%22type%22%3A%22block_actions%22%2C%22api_app_id%22%3A%22A0B1C2D3E4F%22%2C%22team%22%3A%7B%22id%22%3A%22T0A1B2C3D%22%7D%2C%22user%22%3A%7B%22id%22%3A%22U0PERSON1%22%7D%2C%22channel%22%3A%7B%22id%22%3A%22C0CHANNEL1%22%7D%2C%22message%22%3A%7B%22ts%22%3A%221761300000.000200%22%2C%22thread_ts%22%3A%221761300000.000100%22%7D%2C%22trigger_id%22%3A%221761300000.1234.abcdef%22%2C%22actions%22%3A%5B%7B%22action_id%22%3A%22permission.allow%22%2C%22value%22%3A%22%7B%5C%22s%5C%22%3A%5C%22019a0000-0000-7000-8000-0000000000d1%5C%22%2C%5C%22r%5C%22%3A%5C%22toolu_01%5C%22%7D%22%7D%5D%7D'
Example Response
{  "ok": true}