---
title: "Revoke an API key"
method: DELETE
path: "/api/keys/{id}"
---

# Revoke an API key

`DELETE /api/keys/{id}`

## Request

- Base URL: `https://api.peelaway.io`
- URL: `https://api.peelaway.io/api/keys/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

Permanently revokes the key with the given id. Authenticated by the session cookie or a pk_ bearer key.

## Path parameters

- `id` string, required

## Response `200`

Revoked

- object
  - `ok` boolean, required

## Other responses

- `401`: Authentication required
- `404`: Key not found

---

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