リファレンスHTTP APIAgents

Reject a private Slack channel

POST
/v1/agents/{id}/slack-bindings/{binding_id}/reject

Revokes a binding that waits for approval, so its channel slot is free again. The bot stays in the channel and takes no input; remove it in Slack to make it leave. revision is the revision the caller read; a binding that is not waiting (a left one included), or changed since, answers 409 REVISION_CONFLICT. The same rejection again answers the binding as it is with a null receipt_id. Owners and admins only; API keys are refused. Writes a resolve_surface_binding receipt.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__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.

Path Parameters

id*string

The agent's id.

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
binding_id*string

The Slack binding's id.

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

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
revision*integer
Range0 <= value <= 2147483647

Response Body

Success

application/json
  1. response
slack_binding*
receipt_id*|null
Example Request
curl -X POST 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/slack-bindings/497f6eca-6276-4993-bfeb-53cbbbba6f08/reject' \  -H 'Content-Type: application/json' \  -d '{  "revision": 0}'
Example Response
{  "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"}