# API keys

Source: https://docs.elnora.ai/docs/api/reference/api-keys
Last modified: 2026-09-08T22:34:42-06:00

> API keys endpoints of the Elnora REST API.

Base URL `https://platform.elnora.ai/api/v1`. Authenticate every request with the `X-API-Key` header — see [Authentication](https://docs.elnora.ai/docs/get-started/authentication).

## `GET` /api-keys

List API keys.

```bash
curl https://platform.elnora.ai/api/v1/api-keys \
  -H "X-API-Key: $ELNORA_API_KEY"
```

**Parameters**

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `scope` | query | string | no |

**Responses**: `200` · `403`

## `POST` /api-keys

Create a new API key for the user's active organization.

```bash
curl -X POST https://platform.elnora.ai/api/v1/api-keys \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "..." }'
```

**Request body**

| Field | Type | Required |
| --- | --- | --- |
| `name` | string | yes |
| `expiresAt` | date-time | no |

**Responses**: `200` · `403`

## `DELETE` /api-keys/&#123;id&#125;

Revoke an API key.

```bash
curl -X DELETE https://platform.elnora.ai/api/v1/api-keys/{id} \
  -H "X-API-Key: $ELNORA_API_KEY"
```

**Parameters**

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `id` | path | uuid | yes |

**Responses**: `204` · `404`

## `GET` /api-keys/policy

Get the API key creation policy for the organization.

```bash
curl https://platform.elnora.ai/api/v1/api-keys/policy \
  -H "X-API-Key: $ELNORA_API_KEY"
```

**Responses**: `200`

## `PUT` /api-keys/policy

Set the API key creation policy for the organization (Owner/Admin only).

```bash
curl -X PUT https://platform.elnora.ai/api/v1/api-keys/policy \
  -H "X-API-Key: $ELNORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```

**Request body**

| Field | Type | Required |
| --- | --- | --- |
| `policy` | string | no |

**Responses**: `204` · `403`
