---
title: "Revoke the calling organization key (offboarding, rotation, failed onboarding)"
method: POST
path: "/v1/hosted-gateway/keys/revoke-self"
---

# Revoke the calling organization key (offboarding, rotation, failed onboarding)

`POST /v1/hosted-gateway/keys/revoke-self`

## Request

- Base URL: `https://api.decionis.com`
- URL: `https://api.decionis.com/v1/hosted-gateway/keys/revoke-self`
- Auth: HTTP bearer

Any database-backed organization key may revoke itself; a hosted gateway key also stops being its tenant's current key. Protocol and AWS service credentials and platform keys are refused (403). A key already revoked or expired gets 401 UNAUTHORIZED from the org-key authentication.

## 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

- `401`: Structured API error
- `403`: Structured API error
- `404`: 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)
