---
title: "Revoke Agent Api Key"
method: DELETE
path: "/agent/keys/{key_id}"
tags: ["agent"]
---

# Revoke Agent Api Key

`DELETE /agent/keys/{key_id}`

## Request

- Base URL: `https://api.threadchain.pro` (the document declares no server; this is the origin it was published from)
- URL: `https://api.threadchain.pro/agent/keys/{key_id}`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

Soft-revoke (never a hard delete — approval rows created under this key
keep their audit trail). Idempotent: revoking twice is not an error.

## Path parameters

- `key_id` string, uuid, required

## Response `200`

Successful Response

- ApiKeyResponse
  - `id` string, required
  - `name` string, required
  - `key_prefix` string, required
  - `scopes` string[], required
  - `daily_cost_cap_usd` number, nullable
  - `last_used_at` string, nullable
  - `revoked_at` string, nullable
  - `created_at` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/threadchain/apis/threadchain-backend.md) - [All operations](https://skmtc.dev/threadchain/apis/threadchain-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/threadchain/apis/threadchain-backend/revisions/8ee288a7e6bd?raw)
