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

# Revoke Organization Api Key

`DELETE /v1/api-keys/{api_key_id}/`

## Request

- Base URL: `https://logfire-api.pydantic.dev/api`
- URL: `https://logfire-api.pydantic.dev/api/v1/api-keys/{api_key_id}/`
- Auth: OAuth 2
  - Authorization code: `api/oauth/authorize`
  - Token URL: `/api/oauth/token` scopes: `organization:write_api_key`
- TypeScript: <https://skmtc.dev/pydantic/apis/pydantic-logfire-api/docs/v1/api-keys/:api_key_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Revoke (soft-delete) an API key. The key stops authenticating immediately.

## Path parameters

- `api_key_id` string, uuid, required

## Response `204`

Successful Response

## Other responses

- `400`: Cannot retire a token belonging to a frontend application
- `404`: API key not found
- `422`: Validation Error
- `429`: Rate limit exceeded

---

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