> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kash.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# API_KEY_EXPIRED

> HTTP 401 — API key expired

**HTTP status:** 401 · **Title:** "API key expired"

## When it fires

The key has an expiry date and the current time is past it.

## Why it happens

* The key was issued with an expiry (recommended for CI keys, contractor access and demos).
* An expiry was set on a long-lived key during a security review.
* Nothing about the key changed; the clock simply passed its expiry.

## How to fix

* Issue a new key from the Kash web app (Settings → API Keys), or contact ZeroID support if your keys are managed for you.
* For automated rotation, issue and roll out the replacement key well before (for example 24 hours before) the old one expires.
* The new key has a different id and prefix, so update every consumer.

See [Authentication](https://docs.kash.bot/developer-docs/rest-api/authentication.md) for key management.

## Related codes

* [`API_KEY_REVOKED`](https://docs.kash.bot/developer-docs/api-errors/API_KEY_REVOKED) — the key was withdrawn explicitly, not by time


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.