---
title: "API Keys API"
description: "Manage API keys"
canonical_url: https://reelmirror.com/docs/api/api-keys
markdown_url: https://reelmirror.com/docs/api/api-keys.md
last_updated: 2026-11-09
---
# ReelMirror API reference: API Keys

> Manage API keys

The ReelMirror API is in beta. Base URL: `https://reelmirror.com/api` (every path starts with `/v1`). Authenticate every request with `Authorization: Bearer rm_...`. Machine-readable contract: https://reelmirror.com/docs/openapi.json.

## Endpoints

- [List API keys](https://reelmirror.com/docs/api/api-keys#list-api-keys): `GET /v1/api-keys`
- [Create API key](https://reelmirror.com/docs/api/api-keys#create-api-key): `POST /v1/api-keys`
- [Update API key spending limit](https://reelmirror.com/docs/api/api-keys#update-api-key): `PATCH /v1/api-keys/{key_id}`
- [Delete API key](https://reelmirror.com/docs/api/api-keys#delete-api-key): `DELETE /v1/api-keys/{key_id}`

### List API keys

`GET /v1/api-keys`

Authentication: bearer token · Operation ID: `listApiKeys`

#### Response 200

List of API keys

Fields inside `data`:

- `id` (string; optional)
- `name` (string; optional)
- `key_hint` (string; optional)
- `scopes` (array of string; optional)
- `created_at` (string, date-time; optional)
- `last_used_at` (string | null, date-time; optional)
- `monthly_limit_cents` (integer | null; optional): Monthly spending limit in cents, or null for unlimited
- `monthly_spent_cents` (integer; optional): Current month spending in cents (0 if no limit set)

#### Example request

```bash
curl "https://reelmirror.com/api/v1/api-keys" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
```

### Create API key

`POST /v1/api-keys`

Authentication: bearer token · Operation ID: `createApiKey`

#### Request body (application/json, required)

- `name` (string; required): Display name for the key
- `scopes` (array of string; optional): Permission scopes. Defaults to all except billing:read, billing:write, feedback:read, and feedback:write.
- `monthly_limit_cents` (integer | null, 100–1000000; optional): Optional monthly spending limit in cents. Min 100 ($1), max 1000000 ($10,000). Null for unlimited.

#### Response 201

API key created. The full key is only returned once.

Fields inside `data`:

- `id` (string; optional)
- `name` (string; optional)
- `key` (string; optional): Full API key (only shown once)
- `scopes` (array of string; optional)
- `created_at` (string, date-time; optional)
- `monthly_limit_cents` (integer | null; optional): Monthly spending limit in cents, or null for unlimited

#### Example request

```bash
curl -X POST "https://reelmirror.com/api/v1/api-keys" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My integration"
}'
```

### Update API key spending limit

`PATCH /v1/api-keys/{key_id}`

Authentication: bearer token · Operation ID: `updateApiKey`

#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `key_id` | string | Yes |  |

#### Request body (application/json, required)

- `monthly_limit_cents` (integer | null, 100–1000000; optional): Monthly spending limit in cents. Set to null to remove limit.

#### Response 200

Key updated

Fields inside `data`:

- `id` (string; optional)
- `name` (string; optional)
- `monthly_limit_cents` (integer | null; optional)

#### Example request

```bash
curl -X PATCH "https://reelmirror.com/api/v1/api-keys/$KEY_ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Delete API key

`DELETE /v1/api-keys/{key_id}`

Authentication: bearer token · Operation ID: `deleteApiKey`

#### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `key_id` | string | Yes |  |

#### Response 200

Key deleted

Fields inside `data`:

- `id` (string; optional)
- `deleted` (boolean, one of `true`; optional)

#### Example request

```bash
curl -X DELETE "https://reelmirror.com/api/v1/api-keys/$KEY_ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
```

