> ## 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.

# List API keys

> List all API keys for the organization



## OpenAPI

````yaml get /developers/api_keys
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:
    get:
      tags:
        - API Keys
        - dev-api
      summary: List API keys
      description: List all API keys for the organization
      operationId: listApiKeys
      responses:
        '200':
          $ref: '#/components/responses/listDeveloperApiKeyResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
      security:
        - BearerAuth: []
          ApiKeyAuth: []
components:
  responses:
    '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
    listDeveloperApiKeyResponse:
      description: Successful API keys list response
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Response200'
              - $ref: '#/components/schemas/listDeveloperApiKeyResponse'
  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
    listDeveloperApiKeyResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/developersApiKey'
      required:
        - data
      examples:
        - data:
            - id: api_key_0197c0ec-a197-719f-84a9-99270a79b42a
              secret: sk_live_MDE5N2MwZWMt...GdwdA
              scopes:
                - api_keys.read
              ip_allow_list:
                - 127.0.0.1
              label: Development API Key
              description: Key for development environment
              expires_at: '2026-05-30 20:23:16'
              created_at: '2025-06-30 15:00:22'
              updated_at: null
            - id: api_key_0197c0ef-6750-7e93-be70-32cef133b06a
              secret: sk_live_MDE5N2MwZWYt...GdwdA
              scopes:
                - api_keys.read
              ip_allow_list:
                - 127.0.0.1
              label: My API Key
              description: Key for reading API Keys
              expires_at: '2026-05-30 20:23:16'
              created_at: '2025-06-30 15:03:24'
              updated_at: null
            - id: api_key_0197c0f1-71ca-7fac-bece-9723783fb48b
              secret: sk_live_MDE5N2MwZjEt...GdwdA
              scopes:
                - api_keys.read
              ip_allow_list:
                - 127.0.0.1
              label: My API Key 2
              description: Key for reading API Keys
              expires_at: '2026-05-30 20:23:16'
              created_at: '2025-06-30 15:05:38'
              updated_at: null
          message: null
    developersApiKey:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the API key
        label:
          type: string
          description: Human-readable label for the API key
          maxLength: 255
        description:
          type:
            - string
            - 'null'
          description: Optional description for the API key
        scopes:
          type: array
          description: List of scopes this API key has access to
          items:
            type: string
        ip_allow_list:
          type: array
          description: List of IP addresses allowed to use this API key
          items:
            type: string
        expires_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          examples:
            - '2025-06-29 16:03:44'
          description: Timestamp when the API key expires
        secret:
          type: string
          description: Secret key value (only returned when creating a new API key)
        created_at:
          type: string
          format: mysql-date-time
          examples:
            - '2025-06-29 16:03:44'
          description: Timestamp when the API key was created
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          examples:
            - '2025-06-29 16:03:44'
          description: Timestamp when the API key was last updated
        metrics:
          oneOf:
            - $ref: '#/components/schemas/apiKeyMetrics'
            - type: 'null'
      required:
        - id
        - scopes
        - created_at
        - updated_at
      additionalProperties: false
      examples:
        - id: api_key_0197c0f1-9589-7990-b421-4b806f637b0c
          secret: sk_live_MDE5N2MwZjEtOTU4OS03N2U0LWJiY2YtNGQ0OWQ4YTM5NzUzX2JpdGdwdA
          scopes:
            - api_keys.read
          ip_allow_list:
            - 127.0.0.1
          label: My API Key
          description: Key for reading API Keys
          expires_at: '2026-05-30 20:23:16'
          created_at: '2025-06-30 15:05:47'
          updated_at: null
          metrics:
            api_key_id: api_key_0197c0f1-9589-7990-b421-4b806f637b0c
            total_requests: 150
            last_used_at: '2025-06-30 16:03:44'
    apiKeyMetrics:
      type: object
      properties:
        api_key_id:
          type: string
          description: Unique identifier for the webhook
        total_requests:
          type: integer
          description: Total number of webhook deliveries
        last_used_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          examples:
            - '2025-06-29 16:03:44'
          description: Timestamp when the API key was last used
      additionalProperties: false
  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.

````