---
title: "Revoke API Key"
method: POST
path: "/service-accounts/{id}/api-keys/{keyId}/revoke"
tags: ["service-accounts"]
---

# Revoke API Key

`POST /service-accounts/{id}/api-keys/{keyId}/revoke`

## Request

- Base URL: `https://api.instruxi.dev/api/v1/enforcer`
- URL: `https://api.instruxi.dev/api/v1/enforcer/service-accounts/{id}/api-keys/{keyId}/revoke`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `X-API-Key`

Deactivates the key (kept for audit). For a hard removal use DELETE on the same path.

## Path parameters

- `id` string, required
- `keyId` string, required

## Response `200`

OK

- InternalDeliveryHttpHandlerOKResponse
  - `success` boolean

## Other responses

- `401`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/instruxi/apis/enforcer-api.md) · [All operations](https://skmtc.dev/instruxi/apis/enforcer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/instruxi/apis/enforcer-api/revisions/fa82bc1becc0?raw)
