---
title: "Delete Api Key"
method: DELETE
path: "/api/v1/keys/{key_id}"
tags: ["API Keys"]
---

# Delete Api Key

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

## Request

- Base URL: `https://api.seoproai.co`
- URL: `https://api.seoproai.co/api/v1/keys/{key_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/authorize`, token URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/token`)

Permanently delete an API key.

This action cannot be undone. The API key will be immediately invalidated.

Args:
    key_id: The API key ID to delete
    user_id: Authenticated user ID (from JWT)
    db: Database client

Returns:
    Success confirmation

## Path parameters

- `key_id` string, required

## Headers

- `X-User-Id` string, nullable
- `X-Organization-Id` string, nullable
- `Authorization` string, nullable

## Response `200`

Successful Response

- APIKeyDeleteResponse: Response model for deleting an API key
  - `success` boolean, required
  - `message` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/seoproai/apis/seopro-ai.md) · [All operations](https://skmtc.dev/seoproai/apis/seopro-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/seoproai/apis/seopro-ai/revisions/5b4b6391ddc9?raw)
