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

# Authentication

> How to authenticate with the Manage.Management API

## API Keys

API keys are used to authenticate requests to the Manage.Management API.

### Generating an API Key

<Steps>
  <Step title="Navigate to Settings">
    Go to your building dashboard and click **Settings**
  </Step>

  <Step title="Open API Settings">
    Select the **API** tab
  </Step>

  <Step title="Generate Key">
    Click **Generate API Key** and give it a descriptive name
  </Step>

  <Step title="Copy Key">
    Copy the key immediately - it won't be shown again
  </Step>
</Steps>

<Warning>
  Keep your API keys secure. Never commit them to version control or share them publicly.
</Warning>

## Using Your API Key

Include your API key in the `Authorization` header:

```bash theme={null}
curl -X GET "https://api.manage.management/v1/buildings" \
  -H "Authorization: Bearer mm_live_abc123..."
```

## Key Types

| Type | Prefix     | Use Case                |
| ---- | ---------- | ----------------------- |
| Live | `mm_live_` | Production access       |
| Test | `mm_test_` | Development and testing |

## Key Permissions

API keys can be scoped to specific permissions:

* **Read** - View data only
* **Write** - Create and update data
* **Delete** - Remove data
* **Admin** - Full access including settings

## Revoking Keys

To revoke an API key:

1. Go to **Settings > API**
2. Find the key you want to revoke
3. Click **Revoke**
4. Confirm the action

<Note>
  Revoked keys stop working immediately. Any applications using the key will receive 401 errors.
</Note>

## Best Practices

<Check>Use separate keys for different applications</Check>
<Check>Rotate keys regularly (every 90 days recommended)</Check>
<Check>Use the minimum permissions required</Check>
<Check>Store keys in environment variables, not code</Check>
<Check>Monitor key usage for unusual activity</Check>
