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

# Get API Keys

> List API keys with optional filters

## Query Parameters

<ParamField query="tenantId" type="string">
  Filter by tenant ID
</ParamField>

<ParamField query="environmentId" type="string">
  Filter by environment ID
</ParamField>

<ParamField query="status" type="string">
  Filter by status. One of: `active`, `revoked`, `expired`
</ParamField>

<ParamField query="subjectId" type="string">
  Filter by associated subject ID
</ParamField>

## Response

Returns an array of API key objects. Note: The actual key value is never returned after creation.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.example.com/api-keys?tenantId=tenant_acme&status=active' \
    -H 'Authorization: Bearer YOUR_TOKEN'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "id": "apk_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
      "subjectId": "subject_api_key_001",
      "tenantId": "tenant_acme",
      "environmentId": "environment_prod",
      "name": "CI Pipeline",
      "description": "Used for automated deployments",
      "prefix": "qs_live_xxxx",
      "lastFour": "a1b2",
      "hashAlgo": "argon2id",
      "createdBySubjectId": "subject_jane",
      "createdAt": "2024-01-15T10:30:00Z",
      "expiresAt": "2025-01-15T10:30:00Z",
      "status": "active",
      "lastUsedAt": "2024-01-20T14:00:00Z",
      "lastUsedIp": "192.168.1.1",
      "intendedUse": "ci-cd",
      "kind": "service"
    }
  ]
  ```
</ResponseExample>
