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

# List API Keys

> Paginated list of keys, without `secret_hash`. Requires `api-key:find-all`.



## OpenAPI

````yaml GET /permission/api-key
openapi: 3.0.1
info:
  title: API Key API
  description: |
    Credentials for machines and external systems (ADR 0105).

    A key has a `kind`:

    - `secret` — created through this API. The key reads
      `hzk_<env>_<prefix>_<secret>` (`env` is `live` on production and
      `test` elsewhere). Horizon stores only the `prefix` and the sha256 of
      the secret, and returns the plaintext key **once**, from create and
      rotate. Send it in the `x-api-key` header.
    - `jwt` — the MaihueGO machine path: a Bearer JWT minted at machine
      provisioning whose payload carries the key id. It keeps working until
      the key is revoked, deactivated, deleted or expired.

    A revoked (`revoked_at`), expired (`expiration_date`), inactive or
    deleted key answers `401`. Each `secret` key spends a sliding window of
    `rate_limit_per_minute` requests (600 when null); past it the API answers
    `429` with `Retry-After` and `X-RateLimit-Limit|Remaining|Reset`.
    Revocation and rotation reach every instance within 60 seconds.

    The management endpoints below require the matching `api-key:*` or
    `api-key-notification-gateway:*` permission. `secret_hash` is never
    returned, filtered or sorted on.
  version: '2026-10-21'
servers:
  - description: Production
    url: https://api.bbrands.io/api/v3
  - description: Certification
    url: https://certification.api.bbrands.io/api/v3
  - description: Development
    url: https://development.api.bbrands.io/api/v3
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: API Key
    description: Keys, their secret lifecycle and revocation.
  - name: API Key Notification Gateway
    description: Notification gateways a key may send for.
paths:
  /permission/api-key:
    get:
      tags:
        - API Key
      summary: List API keys
      description: >-
        Paginated list of keys, without `secret_hash`. Requires
        `api-key:find-all`.
      operationId: apiKeyFindAll
      parameters:
        - $ref: '#/components/parameters/Fields'
        - $ref: '#/components/parameters/Filters'
        - $ref: '#/components/parameters/OrderBy'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/Populate'
      responses:
        '200':
          description: ApiKey records retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKey'
                  message:
                    type: string
                  meta:
                    $ref: '#/components/schemas/Meta'
                  paging:
                    $ref: '#/components/schemas/Paging'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    Fields:
      name: fields
      in: query
      description: >-
        Comma-separated list of columns to return (`secret_hash` is never
        returned).
      schema:
        type: string
    Filters:
      name: filters
      in: query
      description: >-
        `field|operator|value` conditions separated by commas. `secret_hash`
        cannot be filtered on.
      schema:
        type: string
      example: kind|eq|secret
    OrderBy:
      name: order_by
      in: query
      description: '`field:asc|desc` pairs separated by commas.'
      schema:
        type: string
      example: created_at:desc
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
    PageSize:
      name: page_size
      in: query
      schema:
        type: integer
        minimum: 1
        default: 20
    Populate:
      name: populate
      in: query
      description: Whether to expand foreign keys into nested objects.
      schema:
        type: boolean
        default: true
  schemas:
    ApiKey:
      type: object
      properties:
        document_id:
          type: string
          format: uuid
        account:
          type: string
          format: uuid
          description: Account the key acts for.
        name:
          type: string
        description:
          type: string
          nullable: true
        kind:
          type: string
          enum:
            - jwt
            - secret
          description: '`secret` keys use `x-api-key`; `jwt` keys are MaihueGO machines.'
        prefix:
          type: string
          nullable: true
          description: Public lookup part of a `secret` key (8 characters).
        expiration_date:
          type: string
          format: date-time
          nullable: true
          description: The key answers 401 from this instant; null never expires.
        rate_limit_per_minute:
          type: integer
          nullable: true
          description: >-
            Requests per minute for a `secret` key; null uses the platform
            default (600).
        last_used_at:
          type: string
          format: date-time
          nullable: true
          description: Last authenticated request, written at most once per minute.
        rotated_at:
          type: string
          format: date-time
          nullable: true
        revoked_at:
          type: string
          format: date-time
          nullable: true
        revoked_by:
          type: string
          format: uuid
          nullable: true
        revoked_reason:
          type: string
          nullable: true
        created_by:
          type: string
          format: uuid
          nullable: true
        is_actived:
          type: boolean
        is_deleted:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          nullable: true
        deleted_at:
          type: string
          format: date-time
          nullable: true
    Meta:
      type: object
      properties:
        correlation:
          type: string
          description: Request correlation id; quote it when reporting an issue.
        status:
          type: integer
        timestamp:
          type: string
          format: date-time
        version:
          type: string
          nullable: true
    Paging:
      type: object
      properties:
        page:
          type: integer
        page_size:
          type: integer
        total:
          type: integer
        total_pages:
          type: integer
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code.
            errors:
              type: array
              items: {}
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid, revoked or expired credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The caller lacks the required permission
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Rate limit exceeded
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  headers:
    RetryAfter:
      description: Seconds until the key's window frees a request.
      schema:
        type: integer
    RateLimitLimit:
      description: Requests per minute allowed for the key.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimitReset:
      description: Unix seconds when the window frees a request.
      schema:
        type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: A `secret` API key, `hzk_<env>_<prefix>_<secret>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.