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

# Revoke an API key

`DELETE /api-keys/{id}`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/api-keys/{id}`
- Auth: HTTP bearer

Permanently revoke an API key. Requests made with it start failing with `401` immediately, and revocation cannot be undone — create a replacement first with [Create an API key](#post-api-keys) if you're rotating. This endpoint is session-gated: it requires a dashboard session and cannot be called with a Bearer API key.

## Response `204`

Revoked.

## Other responses

- `401`: Not authenticated (no dashboard session).
- `403`: Insufficient permission (`apikeys:manage` required).
- `404`: API key not found.

---

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