---
title: "Delete API keys"
method: POST
path: "/api/v1/delete/api-key"
tags: ["API Keys"]
---

# Delete API keys

`POST /api/v1/delete/api-key`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/delete/api-key`
- Auth: API key in header `X-API-Key`

Delete API keys by ID. Service keys from mailcow.conf cannot be deleted (`api_key_service_locked`).

## Request body

- object
  - `items` object: contains list of API key IDs you want to delete

## Response `200`

OK

- object
  - `log` unknown[]: contains request object
    - unknown
  - `msg` unknown[]
    - unknown
  - `type` 'success' | 'danger' | 'error'

## Other responses

- `401`: Unauthorized

## Changes

- **2026-10-23** `679bcc1881c6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mailcow/apis/mailcow-api/changes/api/v1/delete/api-key/post.md)

---

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