Approve a private Slack channel
A binding of a private channel starts as pending_approval and takes no input until an owner or admin approves it here: it becomes ready and approved_at is set, and a message sent before approved_at is not answered. revision is the revision the caller read; a binding that is not waiting (a left one included: the bot is not in the channel, and is invited again first, which makes it wait), or changed since, answers 409 REVISION_CONFLICT. The same approval again, after it landed, answers the binding as it is with a null receipt_id. Owners and admins only, not the agent's admins; API keys are refused. Writes a resolve_surface_binding receipt.
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSession__Host-werft_session<token>For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.
id*stringThe agent's id.
^([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)$uuidbinding_id*stringThe Slack binding's id.
^([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)$uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
"werft-web"application/json- body
revision*integer0 <= value <= 2147483647Success
application/json- response
slack_binding*receipt_id*|nullcurl -X POST 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/slack-bindings/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve' \ -H 'Content-Type: application/json' \ -d '{ "revision": 0}'{ "slack_binding": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9", "owner_id": "string", "surface": "web", "installation_id": "91166175-c6a9-4caf-88e9-3147ffc9c934", "external_surface_id": "string", "surface_kind": "public_channel", "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "mode": "off", "ceiling": { "actions": [ "session.read" ], "disclosure": "full" }, "home": true, "memory_write_policy": "deny", "status": "ready", "approved_at": "2019-08-24T14:15:22Z", "membership": { "state": "joined", "error": "string" }, "muted": true, "revision": 0, "created_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z" }, "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7"}