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

# API Keys

> Generate and manage API keys for authenticating with the Telemetron API

## Overview

API keys authenticate requests to the Telemetron REST API and MCP server. Each organization has a single API key that can be used across all API integrations, including telemetry ingestion, MCP connections, and direct API calls.

## Prerequisites

* Admin access to your Telemetron organization

## Setup

<Steps>
  <Step title="Locate Your API Key">
    Go to **Settings > Integrations**. Your API key is displayed in the **Developer** section of the page.
  </Step>

  <Step title="Copy the Key">
    Click the **Copy** button next to the API key to copy it to your clipboard.
  </Step>
</Steps>

## Configuration

### Using Your API Key

Include the API key in the `x-api-key` header for all REST API requests:

```bash theme={null}
curl -X GET https://admin.telemetron.ai/api/v1/cases \
  -H "x-api-key: YOUR_API_KEY"
```

### Regenerating Your API Key

If your API key is compromised or you need to rotate it:

1. Go to **Settings > Integrations**
2. Click **Regenerate Key**
3. Confirm the action

<Warning>
  Regenerating your API key **invalidates the current key immediately**. All existing integrations using the old key will stop working until updated with the new key. This action cannot be undone.
</Warning>

After regenerating, update the API key in all integrations:

* AWS IoT Core Terraform configuration
* MCP server connections
* Custom API tool configurations
* Any scripts or services calling the Telemetron API

## How It Works

The API key identifies and authenticates your organization when making requests to the Telemetron API. Every API request must include a valid key — requests without a key or with an invalid key receive a `401 Unauthorized` response.

<Warning>
  Never expose API keys in client-side code, public repositories, or version control. Store keys in environment variables or a secrets manager.
</Warning>

## Troubleshooting

| Issue                                      | Resolution                                                                                                     |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| **401 Unauthorized responses**             | Verify the API key is correct and has not been regenerated. Copy the current key from Settings > Integrations. |
| **Key not appearing on the page**          | Ensure you have admin access to the organization. Contact your organization admin if needed.                   |
| **Integrations broken after regeneration** | Update the API key in all services and integrations that reference it. The old key is permanently invalidated. |
