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

# Delete API Key

`DELETE /service-accounts/{id}/api-keys/{keyId}`

## Request

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

Hard-removes the key row. Unlike Revoke this leaves no row for audit; prefer the revoke route when the goal is to disable the credential while keeping a record it existed.

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