# invalid_api_key

**The API key is invalid, revoked or expired.**

| | |
|---|---|
| HTTP status | `401` |
| `code` | `invalid_api_key` |
| Retry? | No, fix the request first |

## What it means

The key does not have the right format, the checksum at the end does not match, or the key does not exist (any more), for example because it was revoked.

## How to fix it

Copy the key again in full, without spaces or line breaks. If it is lost or revoked, create a new one under **Settings › Developer / API**. Access keys for the MCP server (`ksa_…`) do not work here.

## Example

```json
{
  "type": "https://docs.kalender-sync.de/en/api/errors/invalid_api_key",
  "title": "Missing or invalid API key",
  "status": 401,
  "code": "invalid_api_key",
  "detail": "The API key is not valid. It may have been revoked or mistyped.",
  "request_id": "req_…"
}
```

→ [All error codes](https://docs.kalender-sync.de/en/api/errors/)