---
title: "Disconnect a hosted gateway by revoking its key (workspace admin)"
method: POST
path: "/v1/hosted-gateway/keys/{key_id}/revoke"
---

# Disconnect a hosted gateway by revoking its key (workspace admin)

`POST /v1/hosted-gateway/keys/{key_id}/revoke`

## Request

- Base URL: `https://api.decionis.com`
- URL: `https://api.decionis.com/v1/hosted-gateway/keys/{key_id}/revoke`
- Auth: API key in cookie `decionis_account_session`

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.

## Path parameters

- `key_id` string, uuid, required

## Request body

- object

## Response `200`

Revoked

- HostedGatewayKeyRevocation
  - `key_id` string, uuid, required
  - `org_id` string, uuid, required
  - `tenant_label` string, nullable, required
  - `revoked_at` string, date-time, required
  - `revoked_reason` string, required

## Other responses

- `400`: Structured API error
- `401`: Structured API error
- `403`: Structured API error
- `404`: Structured API error
- `415`: Structured API error
- `429`: Structured API error

---

[API](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api.md) · [All operations](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/llms.txt) · [OpenAPI document](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/revisions/357f5e459d0c?raw)
