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

# Retrieve an existing API key by ID

> Retrieve an existing API key by ID



## OpenAPI

````yaml /api/openapi.json get /api/auth/api-key/get
openapi: 3.1.0
info:
  title: Aquila API
  version: 1.0.0
  description: >-
    Event-driven reconnaissance platform API. All /api/* routes except
    /api/public/* require an authenticated session (cookie), an X-Api-Key
    header, or a bearer token. Auth endpoints under /api/auth/* are generated by
    Better Auth.
servers:
  - url: https://aquila.attaxr.com
  - url: http://localhost
security: []
tags:
  - name: AI
  - name: Agents
  - name: Bulk Delete
  - name: Chat
  - name: Constraints
  - name: Dashboard
  - name: Events
  - name: JS
  - name: JS Analysis
  - name: JS Monitoring
  - name: Leads
  - name: MCP Key
  - name: Models
  - name: Notification Channels
  - name: Notification Event Preferences
  - name: Notifications
  - name: OOB
  - name: Provider Keys
  - name: Public Shares
  - name: Reinforcements
  - name: Reports
  - name: Scans
  - name: Schedules
  - name: Shares
  - name: Tools
  - name: User Profiles
  - name: V1
  - name: Vulnerabilities
  - name: Workflows
paths:
  /api/auth/api-key/get:
    get:
      tags:
        - Auth
      summary: Retrieve an existing API key by ID
      description: Retrieve an existing API key by ID
      parameters:
        - name: configId
          in: query
          schema:
            type: string
            description: >-
              The configuration ID to use for the API key lookup. If not
              provided, the default configuration will be used.
        - name: id
          in: query
          schema:
            type: string
            description: The id of the Api Key
      responses:
        '200':
          description: API key retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID
                  name:
                    type: string
                    nullable: true
                    description: The name of the key
                  start:
                    type: string
                    nullable: true
                    description: >-
                      Shows the first few characters of the API key, including
                      the prefix. This allows you to show those few characters
                      in the UI to make it easier for users to identify the API
                      key.
                  prefix:
                    type: string
                    nullable: true
                    description: The API Key prefix. Stored as plain text.
                  userId:
                    type: string
                    description: The owner of the user id
                  refillInterval:
                    type: number
                    nullable: true
                    description: >-
                      The interval in milliseconds between refills of the
                      `remaining` count. Example: 3600000 // refill every hour
                      (3600000ms = 1h)
                  refillAmount:
                    type: number
                    nullable: true
                    description: The amount to refill
                  lastRefillAt:
                    type: string
                    format: date-time
                    nullable: true
                    description: The last refill date
                  enabled:
                    type: boolean
                    description: Sets if key is enabled or disabled
                    default: true
                  rateLimitEnabled:
                    type: boolean
                    description: Whether the key has rate limiting enabled
                  rateLimitTimeWindow:
                    type: number
                    nullable: true
                    description: The duration in milliseconds
                  rateLimitMax:
                    type: number
                    nullable: true
                    description: Maximum amount of requests allowed within a window
                  requestCount:
                    type: number
                    description: >-
                      The number of requests made within the rate limit time
                      window
                  remaining:
                    type: number
                    nullable: true
                    description: >-
                      Remaining requests (every time api key is used this should
                      updated and should be updated on refill as well)
                  lastRequest:
                    type: string
                    format: date-time
                    nullable: true
                    description: When last request occurred
                  expiresAt:
                    type: string
                    format: date-time
                    nullable: true
                    description: Expiry date of a key
                  createdAt:
                    type: string
                    format: date-time
                    description: created at
                  updatedAt:
                    type: string
                    format: date-time
                    description: updated at
                  metadata:
                    type: object
                    nullable: true
                    additionalProperties: true
                    description: Extra metadata about the apiKey
                  permissions:
                    type: string
                    nullable: true
                    description: Permissions for the api key (stored as JSON string)
                required:
                  - id
                  - userId
                  - enabled
                  - rateLimitEnabled
                  - requestCount
                  - createdAt
                  - updatedAt
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
          description: >-
            Bad Request. Usually due to missing parameters, or invalid
            parameters.
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
          description: Unauthorized. Due to missing or invalid authentication.
        '403':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: >-
            Forbidden. You do not have permission to access this resource or to
            perform this action.
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: Not Found. The requested resource was not found.
        '429':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: >-
            Too Many Requests. You have exceeded the rate limit. Try again
            later.
        '500':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: >-
            Internal Server Error. This is a problem with the server that you
            cannot fix.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal API key sent as a bearer token.

````