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

# List API keys

> List all API keys for the organization (key values are not returned)

<Note>**Required scope:** `admin`</Note>


## OpenAPI

````yaml /openapi.json get /{org}/api-keys
openapi: 3.1.0
info:
  title: Depot API
  description: Depot HTTP API v1
  version: 1.0.0
servers:
  - url: https://api.mesa.dev/v1
security:
  - apiKey: []
paths:
  /{org}/api-keys:
    get:
      tags:
        - Org
      summary: List API keys
      description: List all API keys for the organization (key values are not returned)
      operationId: listApiKeys
      parameters:
        - in: query
          name: cursor
          schema:
            type: string
          description: Opaque pagination cursor from a previous response
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: Maximum number of items to return (max 100)
        - in: query
          name: query
          schema:
            type: string
            minLength: 1
          description: Filter API keys by name
        - in: query
          name: status
          schema:
            default: all
            type: string
            enum:
              - active
              - revoked
              - expired
              - all
        - in: query
          name: scope
          schema:
            type: string
            enum:
              - read
              - write
              - admin
          description: Filter API keys by scope membership
        - in: query
          name: repo_id
          schema:
            type: string
          description: Filter API keys scoped to a specific repository id
        - schema:
            type: string
          in: path
          name: org
          required: true
      responses:
        '200':
          description: API keys list
          content:
            application/json:
              schema:
                type: object
                properties:
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Cursor for the next page, or null when no more results
                      remain
                  has_more:
                    type: boolean
                    description: Whether another page of results is available
                  api_keys:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        scopes:
                          type: array
                          items:
                            type: string
                        repo_ids:
                          anyOf:
                            - type: array
                              items:
                                type: string
                            - type: 'null'
                        metadata:
                          anyOf:
                            - type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                            - type: 'null'
                        tags:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            type: string
                        last_used_at:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: 'null'
                        expires_at:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: 'null'
                        revoked_at:
                          anyOf:
                            - type: string
                              format: date-time
                            - type: 'null'
                        created_at:
                          type: string
                          format: date-time
                      required:
                        - id
                        - name
                        - scopes
                        - repo_ids
                        - metadata
                        - tags
                        - last_used_at
                        - expires_at
                        - revoked_at
                        - created_at
                required:
                  - next_cursor
                  - has_more
                  - api_keys
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      trace_id:
                        description: >-
                          Support correlation id attached to 5xx responses;
                          quote it when reporting an issue
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      trace_id:
                        description: >-
                          Support correlation id attached to 5xx responses;
                          quote it when reporting an issue
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      trace_id:
                        description: >-
                          Support correlation id attached to 5xx responses;
                          quote it when reporting an issue
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      trace_id:
                        description: >-
                          Support correlation id attached to 5xx responses;
                          quote it when reporting an issue
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      trace_id:
                        description: >-
                          Support correlation id attached to 5xx responses;
                          quote it when reporting an issue
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      trace_id:
                        description: >-
                          Support correlation id attached to 5xx responses;
                          quote it when reporting an issue
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      trace_id:
                        description: >-
                          Support correlation id attached to 5xx responses;
                          quote it when reporting an issue
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key

````