---
title: "API keys"
description: "API key format, keys per environment, rotation, and common authentication errors."
doc_version: "1"
last_updated: "2026-11-19"
---

<a id="github-oauth-flow"></a>To sign in to the Monitive dashboard, follow the [sign-in guide](/docs/guides/sign-in/).

## API key format

API keys use the `mk_live_` prefix followed by a random string:

```bash
Authorization: Bearer mk_live_abc123def456...
```

Keys created before 17 November 2026 start `umk_live_` and keep working.

The prefix makes keys easy to identify in logs and secret scanners.

## Multiple keys by environment

Use separate keys for different environments and tools:

- `ci-prod` — GitHub Actions and deployment pipelines.
- `local-dev` — Development and testing.
- `mcp-claude` — Claude MCP integrations.
- `mcp-cursor` — Cursor MCP integrations.

Each account supports up to 10 API keys.

## Rotation and grace window

When you rotate a key:

1. Monitive issues a new key immediately.
2. The old key remains valid for a five-minute grace window.
3. After the grace window, Monitive permanently revokes the old key.

The grace window prevents downtime during key rotation in automated systems.

## Common auth errors

The error envelope is flat: `{"error": "<message>"}`. Match on the HTTP status first, and then match the literal validator message where needed.

| Status | Message | Meaning |
|--------|---------|---------|
| 401 | `missing authorization` | The `Authorization` header is absent. |
| 401 | `invalid credentials` | The API key isn't recognized or has been revoked. |
| 403 | `account suspended; contact support` | The account is suspended, for example, by the port-scan heuristic. Regular `/api/v1/*` calls return this error. |
| 403 | `forbidden` | A non-admin caller requested an admin-only route. The response doesn't disclose whether the route exists. |