> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-dlc-insights/management-and-administration/api-keys.md).

# Harness AIDI API Keys

API Keys in AI DLC Insights enable programmatic access to SEI resources. You can create these keys to automate developer identity management, integrate external systems, and ingest engineering data into AI DLC Insights.

### API key roles <a href="#api-key-roles" id="api-key-roles"></a>

API keys are created and managed at the **project level** within your Harness account. Each key can be assigned an AIDI role to control its access scope and capabilities.

| Role               | Description                                                                                                                                                            | Recommended Use                                                                                 |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **AIDI Admin**     | Grants full control over AIDI configurations and data at both the account and project levels. Includes permissions to manage data settings, teams, profiles, and KPIs. | Use for administrative automation or integrations that configure Harness AIDI or sync metadata. |
| **AIDI Ingestion** | Grants limited access to submit or update engineering data (such as developer identities or metric events) without allowing configuration changes.                     | Use for continuous data ingestion or integration pipelines.                                     |

Each AIDI API key is scoped to a specific project and inherits the permissions of its assigned role. For more information, see [Harness RBAC in AI DLC Insights](/ai-dlc-insights/new-to-ai-dlc-insights/get-started/rbac.md).

### Create an AIDI API key <a href="#create-an-aidi-api-key" id="create-an-aidi-api-key"></a>

To create an API key in AI DLC Insights:

1. From the Harness AIDI navigation menu, click **Account Management** > **API Keys**.
2. Click **Create API Key**.
3. Enter a name and description for the API key.
4. Select a role to assign to the API key (`Admin` or `Ingestion`).
5. Click **Create**.
6. Copy the generated key. Store this securely; it won't appear again.

You can use this key to authenticate API requests by including it in the `Authorization` header.

For example:

```bash
curl -X GET \
  # Replace BASE_URL with your Harness cluster URL (e.g. https://app.harness.io)
  "${BASE_URL}/gateway/sei/api/v2/developers/schema" \ 
  -H "authorization: ApiKey <YOUR_API_KEY>" 
```

### Manage AIDI API keys <a href="#manage-aidi-api-keys" id="manage-aidi-api-keys"></a>

Manage your API keys to ensure your AIDI integrations remain secure and maintain least-privilege access.

Follow these best practices when managing your AIDI API keys:

* Use least privilege: Assign the **Ingestion** role for data ingestion use cases whenever possible.
* Rotate regularly: Recreate keys periodically or when a team member leaves.
* Avoid sharing keys: Each integration or automation should use its own dedicated key.
* Revoke unused keys: Delete keys that are no longer needed to reduce exposure risk.

You can view and delete keys from the **API Keys** page when they are no longer needed or have been compromised.

![](/files/X1cftt3VEZpJ45CFE9ss)

Click the **Delete** icon next to the key you want to remove. Once deleted, the key is invalidated and cannot be recovered.
