---
title: "Revoke Api Key"
method: POST
path: "/api/api-keys/{key_id}/revoke"
tags: ["api_keys"]
---

# Revoke Api Key

`POST /api/api-keys/{key_id}/revoke`

## Request

- Base URL: `https://api-v1.unusual.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-v1.unusual.ai/api/api-keys/{key_id}/revoke`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Revoke API key. Superusers may pass org_id to revoke keys from another org.

## Path parameters

- `key_id` string, required

## Query parameters

- `org_id` string, nullable

## Headers

- `x-view-as` string, nullable

## Response `200`

Successful Response

- ApiKeyOut
  - `id` string, uuid, required
  - `name` string, nullable
  - `key_prefix` string, required
  - `created_at` string, date-time, required
  - `last_used_at` string, date-time, nullable
  - `revoked_at` string, date-time, nullable
  - `user_email` string, nullable
  - `is_superuser` boolean
  - `expires_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/unusual/apis/dashboard-server.md) - [All operations](https://skmtc.dev/unusual/apis/dashboard-server/llms.txt) - [OpenAPI document](https://skmtc.dev/unusual/apis/dashboard-server/revisions/89f716930ead?raw)
