Integrations

Cancel an in-flight connect session

Changed on

Terminate a still-active session at the user's request.

Gated like /status — the poll_token the SPA already holds, or the target agent's owner / org:admin without it.

A still-existing but already-terminal session is a 204 no-op — a "Cancel" click racing the poll scanner doesn't error. A session that has already been cascade-deleted (unhappy-terminal path in _mark_terminal) surfaces as 403, matching /status — the caller can't distinguish "gone" from "your poll_token is wrong", which is the enumeration-oracle guard. The SPA's cancel-on-unmount is fire-and-forget and .catches the 403, so this doesn't leak into the UX.

post/connect-sessions/{session_id}:cancel

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /connect-sessions/{session_id}:cancel
  • Auth: HTTP bearer

Path parameters

session_idstring required

Query parameters

poll_tokenstring nullable

Opaque poll capability returned by :connect. Optional for the target agent's owner (with credentials:write and agents:write) and org:admin

Response

Successful Response

Changes

    • info

      the query request parameter poll_token became optional

    • info

      query request parameter poll_token list-of-types was widened by adding types null

    • info

      for the query request parameter poll_token, the type was generalized from string to no type

    • info

      endpoint added