---
title: "Revoke an API key"
method: DELETE
path: "/api/v1/account/keys/{id}"
tags: ["Account"]
---

# Revoke an API key

`DELETE /api/v1/account/keys/{id}`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/account/keys/{id}`
- Auth: HTTP bearer

Revokes the key. It stops working right away.

## Path parameters

- `id` string, required

## Headers

- `X-Dotsy-Workspace` string

## Response `200`

The key was revoked.

- object
  - `ok` true, required

## Other responses

- `401`: Missing or invalid credentials.
- `403`: `admin_required`: the key's scope is not `admin`. `workspace_admin_required`: you are a workspace Member, and only an Owner or Admin can manage keys. `guest_only`: this account can't create keys. `guest_requires_account`: a guest token can't manage keys.
- `404`: `key_not_found`: no such key in this workspace.

---

[API](https://skmtc.dev/dotsy/apis/dotsy-api.md) · [All operations](https://skmtc.dev/dotsy/apis/dotsy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dotsy/apis/dotsy-api/revisions/4272ed3b85d7?raw)
