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

# Get API Key

> Retrieve details for a specific API key, including its instance access and permissions.

Look up a single API key by ID. This endpoint returns the full picture — key metadata plus which instances the key can access and with what permissions.

## Authorization

Requires an **organization-level** API key in the `Authorization` header.

## Path Parameters

<ParamField path="key_id" type="string" required>
  The ID of the key to retrieve.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique identifier for the key.
</ResponseField>

<ResponseField name="name" type="string">
  The human-readable name assigned at creation.
</ResponseField>

<ResponseField name="key_prefix" type="string">
  The key prefix (`chd_sk_`).
</ResponseField>

<ResponseField name="is_active" type="boolean">
  Whether the key is currently active.
</ResponseField>

<ResponseField name="expires_at" type="string | null">
  Expiration datetime, if one was set.
</ResponseField>

<ResponseField name="last_used_at" type="string | null">
  The last time this key was used to authenticate a request.
</ResponseField>

<ResponseField name="created_at" type="string">
  When the key was created.
</ResponseField>

<ResponseField name="instances" type="object[]">
  The instances this key has access to, along with the granted permissions.

  <Expandable title="Instance object">
    <ResponseField name="instance_id" type="string">
      The instance this access grant applies to.
    </ResponseField>

    <ResponseField name="permissions" type="string[]">
      The permission scopes granted for this instance (e.g. `["read", "interact"]`).
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  curl https://api.chowder.dev/v1/keys/key_9f8a7b6c \
    -H "Authorization: Bearer chd_sk_your_org_key"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  {
    "id": "key_9f8a7b6c",
    "name": "Production Bot Key",
    "key_prefix": "chd_sk_",
    "is_active": true,
    "expires_at": "2026-12-31T23:59:59Z",
    "last_used_at": "2026-02-14T08:30:00Z",
    "created_at": "2026-02-14T12:00:00Z",
    "instances": [
      {
        "instance_id": "inst_abc123",
        "permissions": ["read", "interact", "channels"]
      },
      {
        "instance_id": "inst_def456",
        "permissions": ["read", "interact", "channels"]
      }
    ]
  }
  ```
</ResponseExample>
