---
title: "Revoke an API key. Anything using it stops working immediately."
method: DELETE
path: "/api/v1/keys/{keyId}"
tags: ["keys"]
---

# Revoke an API key. Anything using it stops working immediately.

`DELETE /api/v1/keys/{keyId}`

## Request

- Base URL: `https://harvis.dev`
- URL: `https://harvis.dev/api/v1/keys/{keyId}`
- Auth: API key in cookie `better-auth.session_token`

## Path parameters

- `keyId` string, required

## Response `200`

Revoke an API key. Anything using it stops working immediately.

- OkResult
  - `ok` true, required

## Other responses

- `401`: `unauthorized`
- `403`: `crossOrigin`, `sessionRequired`
- `404`: `keyNotFound`

---

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