---
title: "Revoke an API key"
method: DELETE
path: "/teams/{id}/keys/{key_id}"
tags: ["API Keys"]
---

# Revoke an API key

`DELETE /teams/{id}/keys/{key_id}`

## Request

- Base URL: `https://api.indexone.io`
- URL: `https://api.indexone.io/teams/{id}/keys/{key_id}`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Deletes the key at API Gateway, immediately invalidating it everywhere. Deleting a key that does not exist is not an error — the handler swallows the exception and returns `{}`.

## Path parameters

- `id` string, required
- `key_id` string, required

## Response `200`

Revoked. Returns `{"id": ...}` on success, or `{}` if the key did not exist.

- object
  - `id` string

## Other responses

- `401`: Missing or invalid id token.
- `403`: Missing or invalid `x-api-key`.
- `429`: API key usage-plan rate limit exceeded.

---

[API](https://skmtc.dev/indexone/apis/index-one-rest-api.md) · [All operations](https://skmtc.dev/indexone/apis/index-one-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/indexone/apis/index-one-rest-api/revisions/df5a92216a9c?raw)
