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

# Get or Update API Key

> Inspect or update a single API key

## Get API Key

```
GET https://api.documind.cloud/api/v1/auth/api-keys/{key_id}
```

Requires `api_keys:read` scope.

## Update API Key

```
PUT https://api.documind.cloud/api/v1/auth/api-keys/{key_id}
```

Requires `api_keys:write` scope.

## Path Parameters

| Parameter | Type          | Required | Description       |
| --------- | ------------- | -------- | ----------------- |
| `key_id`  | string (UUID) | Yes      | ID of the API key |

## Update Body

| Field             | Type      | Required | Description                      |
| ----------------- | --------- | -------- | -------------------------------- |
| `name`            | string    | No       | API key name                     |
| `description`     | string    | No       | API key description              |
| `scopes`          | string\[] | No       | Permission scopes                |
| `is_active`       | boolean   | No       | Enable or disable the key        |
| `expires_in_days` | integer   | No       | Reset expiration relative to now |

## Response

```json theme={null}
{
  "id": "key-id",
  "name": "Production Key",
  "description": "Production automation",
  "prefix": "abc12345",
  "scopes": ["extractions:read", "extractions:write"],
  "is_active": true,
  "is_revoked": false,
  "project_name": "Invoices",
  "expires_at": null,
  "last_used_at": null,
  "revoked_at": null,
  "created_at": "2026-06-02T10:00:00Z",
  "updated_at": "2026-06-02T10:00:00Z"
}
```
