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

# Cybreeze API authentication

> The Cybreeze API authenticates with an organization API key sent as x-api-key. Who can mint one, what it reaches, and how disable differs from delete.

The Cybreeze API authenticates every request with an organization API key, sent in the `x-api-key` header. There is no OAuth flow, no bearer token and no session: one header, on every call.

```bash theme={null}
curl -sS https://public-api.cybreeze.io/v1/ping \
  -H "x-api-key: $CYBREEZE_API_KEY"
```

A request with no key, an unknown key or a revoked key is answered `401` by the gateway before it reaches Cybreeze.

## A key is the whole organization

A key acts as the organization that created it. It has no user behind it, no second factor, and no narrower grant: there is no read-only key and no per-resource scope today. That is why minting one is restricted.

> [!NOTE]
>
> Only an organization's **owners and admins** can create, disable or delete a key, through **Settings → API keys** in the app. Members do not see the page.

The practical consequence: a key belongs in server-side code with a secret manager behind it. The API sends no CORS headers on purpose, so a browser cannot call it, and a key shipped to a browser would hand your whole organization to anyone who opens the console.

## The secret is shown once

The secret is returned once, in the response that creates the key, and is stored nowhere on our side. Cybreeze keeps four things about a key:

| Stored | Why |
| - | - |
| The key id | How a request is traced back to a key |
| Your label | How you tell two keys apart in the list |
| The first eight characters | How you recognize a key you already deployed |
| Who created it, and when it was last used | An ownership and recency signal |

Last-used is written at most once an hour. Read it as "this key is still in use", not as an audit log.

Losing a secret means deleting that key and creating another. Nobody at Cybreeze can read it back to you.

## Rotating a key

There is no in-place rotation, because there is nothing to rotate into: a key's value never changes. Rotate by overlap.

**1. Create the replacement**

Mint a second key with a label that says which deployment it is for.

**2. Deploy it, and wait**

Give the new key about 45 seconds to reach the gateway, then confirm it with `GET /v1/ping` from the environment that will use it.

**3. Disable the old key**

Disable rather than delete. Disable is reversible, so a caller you forgot is one click away from working again instead of locked out permanently.

**4. Delete it once nothing breaks**

Delete the old key when last-used stops moving and nothing has failed.

> [!WARNING]
>
> **Disable is reversible. Delete is not.** Both changes go to the gateway first and to Cybreeze's own record second, so a failure leaves a key you can retry on rather than one nothing can reach.

## Limits on keys

* **Twenty keys per organization.** This is a ceiling on a creation loop, not a tier you can buy out of. If you are near it, you are probably minting one key per deploy instead of per integration.
* **A new key is live after about 45 seconds.** Before that the gateway answers `401 invalid_api_key`.
* **A disable takes effect at the gateway eventually, and at Cybreeze immediately.** Cybreeze checks the key against its own record on every request, so a disabled key stops working even in the window where the gateway would still accept it.

## What a key cannot do

| Not supported | What to do instead |
| - | - |
| Read-only or scoped keys | Use one key per integration so you can disable one without the others |
| Calling the API from a browser | Call it from your server; the API sends no CORS headers |
| Acting as a specific user | Every call is the organization, so attribute actions on your own side |
| Choosing your own rate limit | Your limits follow your organization. See [Rate limits and quotas](https://developer.cybreeze.io/concepts/rate-limits.md) |


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