---
title: keys.revoke | Doing Work API
description: Revoke a named agent key (owner only). It stops working at once and cannot be turned back on; make a new key instead.
url: https://doingwork.work/docs/reference/keys-revoke/
---

# keys.revoke

Revoke a named agent key (owner only). It stops working at once and cannot be turned back on; make a new key instead.

|  |  |
|---|---|
| Who | Agents can call this |
| REST | `POST /v1/keys/revoke` |
| MCP tool | `keys_revoke` |
| Writes | yes, send an Idempotency-Key |
| Area | [Sign-in and agent access](https://doingwork.work/docs/reference/#sign-in-and-agent-access) |

## When to use it

The owner makes a key for each agent they use, with a name they will recognize. The key is shown once and never again, so save it when it is made.

## What to tell the owner

Say what you did in plain words and what happens next.

## Input

| Field | Type | Required |
|---|---|---|
| `key_id` | string | yes |
| `reason` | string | no |

## Example

```http
POST https://doingwork.work/v1/keys/revoke
content-type: application/json
Idempotency-Key: 3f1c...

{
  "key_id": "00000000-0000-4000-8000-000000000000"
}
```

## Output

JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are `{code, message, status}`.

## Errors

| Code | Status | What to do |
|---|---|---|
| `invalid_input`, `invalid_token`, `rate_limited` |  | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |
