Disconnect a hosted gateway by revoking its key (workspace admin)
From the page itself (same-origin, a JSON body such as {}, as approve). An ADMIN or above of the session's workspace revokes a key that a hosted gateway sign-on issued there (it appears in the workspace key list as agentsafe-hosted-<tenant_label> with scopes ["decision:shadow"]), including one that lapsed undelivered; the gateway records nothing more. Any other key answers 404.
Authorization
AccountSessionCookie The signed HttpOnly account session the web app holds after sign-in (also accepted as a Bearer acct_ token).
In: cookie
Path Parameters
uuidRequest Body
application/json
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/hosted-gateway/keys/497f6eca-6276-4993-bfeb-53cbbbba6f08/revoke" \ -H "Content-Type: application/json" \ -d '{}'{ "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "tenant_label": "string", "revoked_at": "2019-08-24T14:15:22Z", "revoked_reason": "self_revoked"}Deny a hosted gateway sign-on request (signed-in owner) POST
From the page itself (same-origin, JSON body, as approve), by the owner the request names, signed in by a sign-in that proved the email; the operator's next poll answers `access_denied`.
Confirm a just-issued hosted gateway key was received (the key itself) POST
Called with the key the token endpoint returned, as Bearer, before `confirm_by`. The key then no longer expires, and in the same transaction the tenant's earlier keys it replaces are revoked (`revoked_key_ids`). Idempotent: a second call revokes nothing more. A key no sign-on issued answers 404 HOSTED_GATEWAY_KEY_NOT_FOUND. A key that is revoked (superseded, disconnected, revoked by itself) or past `confirm_by` is refused by the org-key authentication before this route runs: 401 UNAUTHORIZED ("Invalid API key"). The 409s HOSTED_GATEWAY_KEY_RETIRED and HOSTED_GATEWAY_KEY_INACTIVE answer only a race with a concurrent retirement.

