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

# List API Keys

> List API keys for a team. Secrets are never returned.

**Required Role:** VIEWER or higher



## OpenAPI

````yaml GET /v1/teams/{team_id}/api-keys
openapi: 3.1.0
info:
  title: Data Raven API
  description: Cloud-to-cloud data transfer platform powered by RClone
  version: 0.5.0
servers: []
security: []
paths:
  /v1/teams/{team_id}/api-keys:
    get:
      tags:
        - API Keys
      summary: List Api Keys
      description: |-
        List API keys for a team. Secrets are never returned.

        **Required Role:** VIEWER or higher
      operationId: list_api_keys_v1_teams__team_id__api_keys_get
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search by name (case-insensitive)
            title: Q
          description: Search by name (case-insensitive)
        - name: include_revoked
          in: query
          required: false
          schema:
            type: boolean
            description: Include revoked keys in results
            default: true
            title: Include Revoked
          description: Include revoked keys in results
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Items per page
            default: 50
            title: Limit
          description: Items per page
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - name
                  - created_at
                  - last_used_at
                type: string
              - type: 'null'
            description: Field to sort by
            title: Sort By
          description: Field to sort by
        - name: sort_order
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortOrder'
              - type: 'null'
            description: 'Sort order: asc or desc'
            title: Sort Order
          description: 'Sort order: asc or desc'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ApiKeyResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SortOrder:
      type: string
      enum:
        - asc
        - desc
      title: SortOrder
      description: Sort order for list endpoints.
    PaginatedResponse_ApiKeyResponse_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ApiKeyResponse'
          type: array
          title: Data
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
      type: object
      required:
        - data
        - pagination
      title: PaginatedResponse[ApiKeyResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApiKeyResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        key_id:
          type: string
          title: Key Id
        name:
          type: string
          title: Name
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        revoked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Revoked At
        rotated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Rotated At
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          type: string
          format: uuid
          title: Created By
        is_active:
          type: boolean
          title: Is Active
          description: Whether the key is currently usable
      type: object
      required:
        - id
        - key_id
        - name
        - scopes
        - expires_at
        - revoked_at
        - rotated_at
        - last_used_at
        - created_at
        - created_by
        - is_active
      title: ApiKeyResponse
      description: Schema for API key metadata (without secret).
    PaginationResponse:
      properties:
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - limit
        - total
        - total_pages
      title: PaginationResponse
      description: Pagination metadata in responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````