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

# Authentication

> Provision and send an API key with Zero requests.

Zero currently allows anonymous read access to security data. Send an organization-scoped API key when you need a higher request quota or access to authenticated capabilities. MCP requests always require OAuth or an API key.

Provision a key from the [Developers area](https://zdlake.com/developers), then store the secret in your application's secret manager.

> [!WARNING]
>
> The complete key is displayed once. Zero stores only its hash and cannot recover the original secret.

## Send the key

Use the `Authorization` header with the `Bearer` scheme.

```bash theme={null}
export ZERO_API_KEY="sk_your_key"

curl --request POST "https://api.zdlake.com/search" \
  -H "Authorization: Bearer $ZERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"log4j"}'
```

`X-API-Key` is also accepted for clients that cannot set a bearer token.

```bash theme={null}
curl --request POST "https://api.zdlake.com/search" \
  -H "X-API-Key: $ZERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"log4j"}'
```

## Key lifecycle

* Create separate keys for each application and environment.
* Give keys only the permissions their application needs.
* Rotate keys without reusing or sharing secrets between services.
* Revoke a key immediately when it is exposed or no longer needed.

## Authentication errors

The API returns `401` when a key is missing, malformed, expired, revoked, or otherwise invalid. It returns `403` when the key is valid but lacks permission for the requested operation. Both responses use the standard [Problem Details](https://docs.zdlake.com/api/errors.md) shape and include a request ID.


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