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

# List API keys

> List non-secret metadata for your account API keys.

The response includes active, expired, and revoked keys. It never includes plaintext key values.

<Card title="Manage API keys in Darwin" icon="key" horizontal href="https://darwin.so/settings?tab=api-keys">
  Review your keys in Developer settings.
</Card>


## OpenAPI

````yaml openapi-v2.json GET /account/api-keys
openapi: 3.1.0
info:
  title: Darwin API
  version: 2.0.0
  description: >-
    Search executable capabilities, manage durable work through explicit Action
    operations, and administer developer credentials for the signed-in account.
    Operations marked planned-preview are contract scaffolding and are not
    callable in production.
servers:
  - url: https://api.darwin.so/api/v2
security:
  - apiKey: []
  - bearer: []
paths:
  /account/api-keys:
    get:
      summary: List API keys
      description: >-
        List API-key metadata for the signed-in Darwin account. Plaintext
        secrets are never included. Requires an authenticated account session.
      operationId: list_api_keys
      responses:
        '200':
          description: >-
            Every API key owned by the account, including expired and revoked
            keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyList'
        '401':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - AccountSession: []
components:
  schemas:
    ApiKeyList:
      type: object
      additionalProperties: false
      required:
        - apiKeys
      properties:
        apiKeys:
          type: array
          items:
            $ref: '#/components/schemas/ApiKey'
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
        fields:
          type: array
          items:
            type: object
            additionalProperties: true
    ApiKey:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - prefix
        - scopes
        - requestCount
        - lastUsedAt
        - expiresAt
        - revokedAt
        - createdAt
      properties:
        id:
          type: string
          description: Stable non-secret identifier for the API key.
        name:
          type: string
          description: Human-readable key name supplied at creation.
        prefix:
          type: string
          description: >-
            Non-secret prefix you can use to identify the key in logs and
            settings.
        scopes:
          type: array
          items:
            type: string
          description: >-
            Permissions granted to the key. Every API operation still enforces
            its required scope.
        requestCount:
          type: integer
          minimum: 0
          description: Lifetime number of requests authenticated with this key.
        lastUsedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When Darwin most recently authenticated a request with this key, or
            null if unused.
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the key expires, or null when it has no scheduled expiration.
        revokedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the key was revoked, or null while it has not been revoked.
        createdAt:
          type: string
          format: date-time
          description: When the key was created.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      x-fern-header:
        name: apiKey
        env: DARWIN_API_KEY
      description: >-
        Pass your Darwin API key in the x-api-key header. You can also
        authenticate with Authorization: Bearer <apiKey>.
    bearer:
      type: http
      scheme: bearer
      bearerFormat: Darwin API key or OAuth access token
      x-fern-bearer:
        name: token
        env: DARWIN_API_KEY
      description: >-
        Pass a Darwin API key or OAuth access token as Authorization: Bearer
        <token>. You can also pass a Darwin API key in x-api-key.
    AccountSession:
      type: apiKey
      in: cookie
      name: __Secure-better-auth.session_token
      description: >-
        The HTTP-only Darwin account session cookie set after sign-in. Local
        development uses better-auth.session_token without the __Secure- prefix.

````