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

# Get API key request

> Get details of a specific API key request/usage log entry by ID



## OpenAPI

````yaml get /developers/api_keys/requests/{id}
openapi: 3.1.0
info:
  title: Prem API
  description: Full description of private and dev-availble API endpoints
  version: 1.0.0
  termsOfService: https://prem.io/terms
  contact:
    name: API Support
    url: https://help.prem.io
    email: support@premai.io
servers:
  - url: https://gateway.prem.io
    description: Production API server
security: []
paths:
  /developers/api_keys/requests/{id}:
    get:
      tags:
        - API Keys Requests
        - dev-api
      summary: Get API key request
      description: Get details of a specific API key request/usage log entry by ID
      operationId: getApiKeyRequest
      parameters:
        - name: id
          in: path
          required: true
          description: API Key Request ID
          schema:
            type: integer
      responses:
        '200':
          $ref: '#/components/responses/viewDeveloperApiKeyRequestResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
      security:
        - BearerAuth: []
          ApiKeyAuth: []
components:
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                enum:
                  - 400
                  - 401
                  - 403
                  - 404
                description: Status code of the response
              data:
                type:
                  - object
                  - 'null'
                description: Response data containing the requested object
              error:
                type:
                  - string
                  - 'null'
                examples:
                  - Some error message
                description: Error message of the response, human readable
              message:
                type: 'null'
              env:
                type: string
                enum:
                  - development
                  - production
                description: API environment
              log:
                type:
                  - string
                  - object
                  - 'null'
                examples:
                  - request_id: req_1234567890
                  - Some pertinent log message
                description: Useful informaiton, not always present, to debug the response
              validator:
                type:
                  - object
                  - array
                  - 'null'
                examples:
                  - email: Invalid email address
                    password: Password is required
                description: >-
                  Validator response object, each key is the field name and
                  value is the error message
              support_id:
                type:
                  - string
                  - 'null'
                format: uuid
                examples:
                  - support_uuidv7-something-else
                description: >-
                  Support ID linked to the response, used to identify it when
                  talking with our team
            required:
              - status
              - error
              - message
              - env
              - log
              - support_id
            additionalProperties: false
    '401':
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Some error message
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - array
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - support_id
                additionalProperties: false
              - properties:
                  status:
                    type: integer
                    enum:
                      - 401
    '403':
      description: You do not have the required permissions to access this resource
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Some error message
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - array
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - support_id
                additionalProperties: false
              - properties:
                  status:
                    type: integer
                    enum:
                      - 403
    '404':
      description: Resource not found
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Some error message
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - array
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - support_id
                additionalProperties: false
              - properties:
                  status:
                    type: integer
                    enum:
                      - 404
    viewDeveloperApiKeyRequestResponse:
      description: Successful API key request view response
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Response200'
              - $ref: '#/components/schemas/viewDeveloperApiKeyRequestResponse'
  schemas:
    Response200:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 200
            - 201
            - 202
          description: Status code of the response
        data:
          type:
            - object
            - array
            - 'null'
          description: Response data containing the requested object
        error:
          type:
            - string
            - 'null'
          examples:
            - Invalid email address
          description: Error message of the response, human readable
        message:
          type:
            - string
            - 'null'
          examples:
            - Resource created successfully
          description: Message of the response, human readable
        env:
          type: string
          enum:
            - development
            - production
          description: API environment
        log:
          type:
            - string
            - object
            - 'null'
          examples:
            - request_id: req_1234567890
            - Some pertinent log message
          description: Useful informaiton, not always present, to debug the response
        validator:
          type:
            - object
            - array
            - 'null'
          examples:
            - email: Invalid email address
              password: Password is required
          description: >-
            Validator response object, each key is the field name and value is
            the error message
        support_id:
          type:
            - string
            - 'null'
          format: uuid
          examples:
            - support_uuidv7-something-else
          description: >-
            Support ID linked to the response, used to identify it when talking
            with our team
      required:
        - status
        - data
        - message
        - env
      examples:
        - status: 200
          data:
            id: '123'
          error: null
          log: null
          validator: null
          support_id: null
          message: Resource created successfully
          env: development
    viewDeveloperApiKeyRequestResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/developersApiKeyRequest'
      required:
        - data
      examples:
        - data:
            id: 12345
            is_developer: 1
            organization_id: org_0197c0ec-a197-719f-84a9-99270a79b42a
            user_id: null
            api_key_id: api_key_0197c0ec-a197-719f-84a9-99270a79b42a
            support_id: null
            ip: 127.0.0.1
            auth: Bearer sk_live_MDE5N2MwZWMt...
            path: /products
            method: POST
            user_agent: MyApp/1.0.0 (https://myapp.com)
            ms: 234.5678
            response_code: '201'
            response_body:
              data:
                id: prod_0197c0ec-a197-719f-84a9-99270a79b42a
                name: Test Product
                price: 19.99
                currency: USD
                created_at: '2025-07-01 12:34:56'
            request_body: '{"name": "Test Product", "price": 19.99, "currency": "USD"}'
            request_headers: |-
              Content-Type: application/json
              Authorization: Bearer sk_live_...
              User-Agent: MyApp/1.0.0
              Content-Length: 67
            memory_peak: 2048.5
            created_at: '2025-07-01 12:34:56'
    developersApiKeyRequest:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the request log entry
        is_developer:
          type: number
          description: Whether this was a developer API request
        organization_id:
          type:
            - string
            - 'null'
          description: Organization ID that made the request
        user_id:
          type:
            - string
            - 'null'
          description: User ID that made the request
        api_key_id:
          type:
            - string
            - 'null'
          description: API key used for the request
        support_id:
          type:
            - string
            - 'null'
          description: Support ticket ID if applicable
        ip:
          type:
            - string
            - 'null'
          description: IP address that made the request
        auth:
          type:
            - string
            - 'null'
          description: Authentication information
        path:
          type: string
          description: Request path
        method:
          type:
            - string
            - 'null'
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
            - HEAD
            - null
          description: HTTP method used
        user_agent:
          type:
            - string
            - 'null'
          description: User agent string
        ms:
          type: number
          description: Request duration in milliseconds
        response_code:
          type: string
          description: HTTP response status code
        response_body:
          type:
            - object
            - string
            - 'null'
          description: Response body as JSON
        request_body:
          type:
            - string
            - 'null'
          description: Request body as text
        request_headers:
          type:
            - string
            - 'null'
          description: Request headers as text
        memory_peak:
          type:
            - number
            - 'null'
          description: Peak memory usage for the request
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the request was logged
      required:
        - id
        - is_developer
        - path
        - ms
        - response_code
        - response_body
        - created_at
      additionalProperties: false
      examples:
        - id: 12345
          is_developer: 1
          organization_id: org_0197c0ec-a197-719f-84a9-99270a79b42a
          user_id: null
          api_key_id: api_key_0197c0ec-a197-719f-84a9-99270a79b42a
          support_id: null
          ip: 127.0.0.1
          auth: Bearer sk_live_...
          path: /products
          method: POST
          user_agent: MyApp/1.0.0
          ms: 234.5678
          response_code: '201'
          response_body:
            data:
              id: prod_123
              name: Test Product
          request_body: '{"name": "Test Product", "price": 19.99}'
          request_headers: |-
            Content-Type: application/json
            Authorization: Bearer sk_live_...
          memory_peak: 2048
          created_at: '2025-07-01 12:34:56'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Send your access token as header Authorization: Bearer {accessToken}'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your API key that starts with sk_live or sk_test. You can create yours
        at go.prem.io/api-keys.

````