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

# Custom Headers

> Unique headers used in API v3 to control authentication, data selection, and request routing.

# Authentication Header

<ParamField header="X-Qanapi-Authorization" type="string" required>
  Your unique API key. All v3 API keys are prefixed with `qapi_`.
</ParamField>

<Tip>
  You can manage and rotate your API keys in the [API Keys section](/api-reference/list-api-keys).
</Tip>

# Content Control

<ParamField header="Content-Type" type="string" required>
  Must be set to `application/json` for all requests containing a JSON payload.
</ParamField>

<ParamField header="X-Qanapi-Fields" type="string">
  A comma-separated list of fields in the JSON payload to be processed (encrypted or decrypted).

  <Info>
    This header is **required** for encryption and decryption requests. For other API calls, it can be omitted.
  </Info>

  **Dot Notation:** You can use dot notation to target nested fields within multi-dimensional objects.
</ParamField>

## Dot Notation Example

When working with nested JSON structures, use the `X-Qanapi-Fields` header to specify exactly which fields should be
touched.

```bash Request theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/encrypt \
  -H "X-Qanapi-Authorization: qapi_..." \
  -H "X-Qanapi-Fields: user.email, user.address.zip" \
  -d '{
    "user": {
      "name": "John Doe",
      "email": "john@example.com",
      "address": {
        "city": "New York",
        "zip": "10001"
      }
    }
  }'
```

# Classifications

<ParamField header="X-Qanapi-Classification" type="string">
  The ID or slug of a classification to assign to the encrypted data.
</ParamField>

If you use this header with an encryption request, the key(s) it generates will be tagged with that classification.
This means that if any other user or api key tries to decrypt the data, they MUST have access to the classification.
If they do not, they will not be able to decrypt the data.  This adds an extra layer of security on the data you encrypt
through our system.

# Advanced Routing

<ParamField header="X-Qanapi-Destination" type="string">
  A URL to forward the request to after processing. If provided, Qanapi will act as a transparent proxy.
</ParamField>

<Warning>
  When using `X-Qanapi-Destination`, all non-Qanapi headers (e.g., `Authorization`, `Custom-App-Header`) will be
  forwarded to the destination URL along with the processed payload.
</Warning>

<Card title="Try it out" icon="vial" href="/v3/encryption/{proxy}/encrypt">
  See these headers in action by testing the Encryption endpoints.
</Card>
