---
title: "List Retriever API Keys"
method: GET
path: "/v1/retrievers/{retriever_id}/api-keys"
tags: ["Retriever API Keys"]
---

# List Retriever API Keys

`GET /v1/retrievers/{retriever_id}/api-keys`

List all API keys for this retriever.

    **Fields:**
    - key_id: Public identifier for the key
    - key_prefix: First 10 characters + "..." for identification (e.g., "ret_sk_abc...")
    - name: Human-friendly label
    - created_at: When the key was created
    - last_used_at: When the key was last used (if ever)
    - status: ACTIVE, REVOKED, or EXPIRED
    - expires_at: Expiration timestamp (if set)

    **Note:**
    - Plaintext key is NEVER returned in list responses
    - Only shown once in creation response
    - Use key_prefix to identify keys in the UI

## Path parameters

- `retriever_id` string, required

## Query parameters

- `include_revoked` boolean — Include revoked and expired keys in the response

## Response `200`

Successful Response

- RetrieverAPIKeyListResponse — Response for listing retriever API keys.
  - `results` APIKeyModel[] — List of API keys for the retriever (plaintext key never included).
    - `key_id` string — Public identifier for the API key.
    - `key_hash` string, required — SHA-256 hash of the plaintext key.
    - `key_prefix` string, nullable — Visible prefix of the API key for user identification (e.g., 'sk_abc123...'). Shows the first 10 characters of the plaintext key to help users identify which key is which in lists, without exposing the full secret. This follows industry best practices from GitHub, Stripe, and AWS. Generated automatically for new keys. Older keys may not have this field.
    - `key_type` 'standard' | 'marketplace_subscription' | 'retriever' | 'user_scoped' | 'session' — Type of API key determining its purpose and scope. - STANDARD: Regular organization API key with standard permissions. - MARKETPLACE_SUBSCRIPTION: Special key generated for marketplace subscriptions, allowing cross-org access to specific marketplace retrievers. - RETRIEVER: Per-retriever API key scoped to execute a specific retriever. Only the retriever owner can create these keys. Prefix: ret_sk_ - SESSION: Short-lived key minted by Studio on each login to back the authenticated UI. Hidden from the user-facing key list endpoints.
    - `subscription_id` string, nullable — Marketplace subscription ID if this is a marketplace subscription key. Only set when key_type is MARKETPLACE_SUBSCRIPTION.
    - `is_internal` boolean — SERVER-VERIFIED internal-actor marker (BACKE-2564). When True, this key belongs to Mixpeek's own operations (e.g. the in-org ops/health probe that must authenticate under a dedicated tenant's internal_id because the single-tenant pod gate fail-closes cross-org auth) and its usage is NOT billed to the org: accrue_mvs_usage skips the accrual and consume_credits skips the direct charge. FAIL CLOSED — absent/False means BILL. This is the ONLY server-side source a billing skip may key on; never the client-influenced X-Mixpeek-Traffic header or mixpeek-loop-* User-Agent. Set only by an admin provisioning an internal key, never from a create request.
    - `internal_id` string, required — Organization internal identifier.
    - `organization_id` string, nullable — Organization public identifier (denormalized).
    - `user_id` string, required — Identifier of the user who owns the key.
    - `name` string, required — Human-friendly key label.
    - `description` string — Optional description explaining the key usage.
    - `permissions` Permission[] — Permissions granted to the key.
    - `scopes` ResourceScopeOutput[] — Resource-level scopes restricting the key.
      - `resource_type` 'organization' | 'user' | 'api_key' | 'namespace' | 'collection' | 'document' | 'bucket' | 'retriever' | 'cluster' | 'taxonomy' | 'storage_connection' | 'alert' | 'annotation' | 'secret' | 'webhook', required — Resource surfaces supported by scoped API keys and audit events. These resource types can be used in: - API key scopes to restrict access to specific resources - Audit logs to identify what type of resource was affected - Permission systems to grant/deny access to resource categories Resource hierarchy: ORGANIZATION -> USER, API_KEY, STORAGE_CONNECTION NAMESPACE -> COLLECTION, BUCKET, RETRIEVER, CLUSTER, TAXONOMY Resource types: - ORGANIZATION: Top-level tenant entity - USER: Organization member with authentication credentials - API_KEY: Authentication token for programmatic access - NAMESPACE: Isolated environment for data and compute resources - COLLECTION: Vector database collection for searchable documents - DOCUMENT: A single searchable document within a collection - BUCKET: Object storage container for raw files - RETRIEVER: Configured search/retrieval pipeline - CLUSTER: Ray compute cluster for distributed processing - TAXONOMY: Hierarchical classification system for documents - STORAGE_CONNECTION: External storage provider integration
      - `resource_id` string, required — Identifier or pattern for the resource. Accepts a literal ID (e.g. 'ns_production') or wildcard forms such as '*' or 'ns_customer_*'.
      - `operations` NamespaceOperation[], nullable — Subset of operations allowed within the scope. When omitted the key may perform any operation permitted by its Permission list.
    - `rate_limit_override` integer, nullable — Optional per-key rate limit override in requests per minute.
    - `status` 'active' | 'revoked' | 'expired' — Lifecycle state of an API key. Status determines whether an API key can be used for authentication: - ACTIVE: Key is valid and can be used for API requests. Last_used_at timestamp is updated on each successful authentication. - REVOKED: Key has been manually revoked by an admin or user. Cannot be reactivated. A new key must be created instead. - EXPIRED: Key has passed its expires_at timestamp. Automatically set by the authentication system. Cannot be reactivated.
    - `expires_at` string, date-time, nullable — UTC timestamp when the key automatically expires.
    - `last_used_at` string, date-time, nullable — UTC timestamp of the last successful request using the key.
    - `created_at` string, date-time — UTC timestamp when the key was created.
    - `created_by` string, nullable — User identifier that created the key.
    - `revoked_at` string, date-time, nullable — UTC timestamp when the key was revoked (if applicable).
    - `revoked_by` string, nullable — User identifier that revoked the key (if applicable).
    - `allowed_origins` string[], nullable — Optional list of allowed HTTP origins for this API key. When set, requests must include an Origin header matching one of these values. Supports exact matches (e.g., 'https://docs.example.com') and wildcard subdomains (e.g., 'https://*.example.com'). Only enforced for browser requests (defense-in-depth, not a security boundary). Null means no origin restriction.
    - `principal_id` string, nullable — End-user identifier for document-level ACL (row-level security). When set, this key is user-scoped: all document reads are automatically filtered to documents the principal owns or has been granted access to. This represents an end-user in your application, NOT an org user.
  - `total` integer — Total number of keys (including revoked if requested).

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/revisions/220a3b263fda/schema)
