---
title: "Revoke Key"
method: POST
path: "/api/keys/revoke"
tags: ["api-keys"]
---

# Revoke Key

`POST /api/keys/revoke`

## Request

- Base URL: `https://api.halalterminal.com`
- URL: `https://api.halalterminal.com/api/keys/revoke`
- Auth: API key in header `X-API-Key`

Deactivate a key by its public prefix. Internal-plan callers only.

Used by the admin dashboard to revoke a customer key without ever
handling the raw key value (which is bcrypt-hashed at rest and not
recoverable after creation).

## Request body

- RevokeKeyRequest: Internal-only: revoke a key by its public prefix.
  - `key_prefix` string, required: Public 10-char prefix (e.g. ht_abc12345)

## Response `200`

Revoked status

- unknown

## Other responses

- `403`: Internal-only endpoint
- `404`: Key not found
- `422`: Validation Error

---

[API](https://skmtc.dev/halalterminal/apis/halal-terminal-api.md) · [All operations](https://skmtc.dev/halalterminal/apis/halal-terminal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/halalterminal/apis/halal-terminal-api/revisions/78768b250943?raw)
