---
title: "Removes a given API key for the user. Deprecated in favor of DELETE /api/auth/api-keys/:id."
method: DELETE
path: "/api/auth/api-key"
tags: ["Authentication"]
deprecated: true
---

# Removes a given API key for the user. Deprecated in favor of DELETE /api/auth/api-keys/:id.

`DELETE /api/auth/api-key`

## Request

- Base URL: `https://passivelogic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://passivelogic.com/api/auth/api-key`
- Auth: one of:
  - API key in header `X-PL-AUTH`
  - API key in header `Authorization: PL-API-KEY`
  - API key in header `PL-API-KEY`
  - HTTP basic
- TypeScript: <https://skmtc.dev/passivelogic/apis/passivelogic-http-api/docs/api/auth/api-key/delete.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Validates that the given token is linked to the currently authenticated user and removes it if so.

## Request body

- RemoveApiKeyRequest: API key to revoke
  - `key` string, required: API key to revoke.

## Response `200`

OK

- GenericMessageResponse: Generic response information
  - `message` string, required: Informative message relating to the specific response

---

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