> ## Documentation Index
> Fetch the complete documentation index at: https://factory-docs-auto-sync-jp-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List service account API keys

> Returns all API keys for a service account, active and inactive. Each item carries `isRevoked`, `expiresAt`, and `revokedAt` so clients can split them into active/inactive views.



## OpenAPI

````yaml https://api.factory.ai/api/v0/openapi.json get /api/v0/service-accounts/{serviceAccountId}/api-keys
openapi: 3.0.1
info:
  title: Factory Public API
  description: >-
    Public API for Factory platform. Requires authentication via the
    `Authorization: Bearer` header.
  version: 0.1.0
servers:
  - url: https://api.factory.ai/
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v0/service-accounts/{serviceAccountId}/api-keys:
    get:
      tags:
        - Service Accounts
      summary: List service account API keys
      description: >-
        Returns all API keys for a service account, active and inactive. Each
        item carries `isRevoked`, `expiresAt`, and `revokedAt` so clients can
        split them into active/inactive views.
      operationId: listServiceAccountApiKeys
      parameters:
        - name: serviceAccountId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            description: Service account ID
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceAccountApiKeys200ResponseBody'
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceAccountApiKeys401ResponseBody'
        '402':
          description: Response for status 402
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceAccountApiKeys402ResponseBody'
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceAccountApiKeys403ResponseBody'
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceAccountApiKeys404ResponseBody'
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceAccountApiKeys500ResponseBody'
components:
  schemas:
    ListServiceAccountApiKeys200ResponseBody:
      type: object
      properties:
        apiKeys:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
                description: API key ID
              name:
                type: string
                minLength: 1
                description: Human-readable name for the key
              fingerprint:
                type: string
                minLength: 1
                description: Non-reversible suffix for display
              createdAt:
                type: number
                description: Unix epoch milliseconds when the key was created
              expiresAt:
                type: number
                description: Unix epoch milliseconds when the key expires, if set
              isRevoked:
                type: boolean
                description: Whether the key has been revoked (soft-deleted)
              revokedAt:
                type: number
                description: Unix epoch milliseconds when the key was revoked, if revoked
            required:
              - id
              - name
              - fingerprint
              - createdAt
              - isRevoked
            additionalProperties: false
      required:
        - apiKeys
      additionalProperties: false
    ListServiceAccountApiKeys401ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    ListServiceAccountApiKeys402ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    ListServiceAccountApiKeys403ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    ListServiceAccountApiKeys404ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
    ListServiceAccountApiKeys500ResponseBody:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
        status:
          type: number
          description: HTTP status code
        title:
          type: string
          description: HTTP status title
        metadata:
          type: object
          additionalProperties: {}
          description: Additional error metadata
      required:
        - detail
        - status
        - title
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Factory API key or JWT token for authentication

````