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

# Revoke an API key

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

## Request

- Base URL: `https://api.astrocal.dev`
- URL: `https://api.astrocal.dev/v1/api-keys/{id}`
- Auth: HTTP bearer

Revokes an API key by setting its revoked_at timestamp. Revoked keys immediately fail authentication. Idempotent — revoking an already-revoked key returns 204.

## Path parameters

- `id` string, required

## Response `204`

API key revoked

## Other responses

- `401`: Unauthorized
- `404`: API key not found

---

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