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

# List KMS contracts

> List available KMS contracts (API >= 2026-06-23). Older versions return the legacy paginated KMS node list.



## OpenAPI

````yaml /openapi.json get /api/v1/kms
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
    x-mint:
      href: https://cloud.phala.network/api-reference/cvms
  - name: Apps
    description: App template management and CVM deployment from app blueprints
    x-mint:
      href: https://cloud.phala.network/api-reference/apps
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
    x-mint:
      href: https://cloud.phala.network/api-reference/webhooks
  - name: SSH Keys
    description: SSH public key management for CVM access
    x-mint:
      href: https://cloud.phala.network/api-reference/ssh-keys
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
    x-mint:
      href: https://cloud.phala.network/api-reference/kms
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
    x-mint:
      href: https://cloud.phala.network/api-reference/instance-types
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
    x-mint:
      href: https://cloud.phala.network/api-reference/attestations
paths:
  /api/v1/kms:
    get:
      tags:
        - public
        - KMS
      summary: List KMS contracts
      description: >-
        List available KMS contracts (API >= 2026-06-23). Older versions return
        the legacy paginated KMS node list.
      operationId: list_kms_api_v1_kms_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number (1-indexed)
            default: 1
            title: Page
          description: Page number (1-indexed)
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Items per page (1-100)
            default: 20
            title: Page Size
          description: Items per page (1-100)
        - name: is_onchain
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: 'Filter: true=onchain only, false=offchain only, omit=all'
            title: Is Onchain
          description: 'Filter: true=onchain only, false=offchain only, omit=all'
        - name: X-Phala-Version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Phala-Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/KmsContractListResponse'
                  - $ref: '#/components/schemas/KmsListResponse'
                title: Response List Kms Api V1 Kms Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    KmsContractListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/KmsContractInfo'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        pages:
          type: integer
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - page_size
        - pages
      title: KmsContractListResponse
      description: Paginated KMS contract list (API >= 2026-06-23).
    KmsListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/KMSInfo'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        pages:
          type: integer
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - page_size
        - pages
      title: KmsListResponse
      description: Paginated KMS node list (legacy, API < 2026-06-23).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KmsContractInfo:
      properties:
        id:
          type: string
          pattern: ^kc_.+
          format: hashid
          title: HashedId[kms_contracts]
          description: A hashed identifier that maps to an internal database ID
          examples:
            - kc_0123abcd
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        contract_address:
          type: string
          title: Contract Address
        chain_id:
          type: integer
          title: Chain Id
        k256_pubkey:
          anyOf:
            - type: string
            - type: 'null'
          title: K256 Pubkey
        ca_pubkey:
          anyOf:
            - type: string
            - type: 'null'
          title: Ca Pubkey
        node_count:
          type: integer
          title: Node Count
      type: object
      required:
        - id
        - slug
        - label
        - contract_address
        - chain_id
        - k256_pubkey
        - ca_pubkey
        - node_count
      title: KmsContractInfo
      description: A KMS contract (group of equivalent KMS node replicas).
    KMSInfo:
      properties:
        id:
          type: string
          pattern: ^kms_.+
          format: hashid
          title: HashedId[kms]
          description: Hashed KMS identifier (kms_xxxxx)
          examples:
            - kms_0123abcd
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
          description: Human-readable KMS name
        url:
          type: string
          title: Url
          description: KMS endpoint URL
        version:
          type: string
          title: Version
          description: KMS software version
        chain_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chain Id
          description: Blockchain chain ID if onchain
        kms_contract_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Kms Contract Address
          description: Smart contract address if onchain
        gateway_app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gateway App Id
          description: Gateway application ID
        ca_pubkey:
          anyOf:
            - type: string
            - type: 'null'
          title: Ca Pubkey
          description: KMS CA public key used as key_provider_id
        k256_pubkey:
          anyOf:
            - type: string
            - type: 'null'
          title: K256 Pubkey
          description: KMS k256 public key used to verify env encryption pubkey signatures
      type: object
      required:
        - id
        - url
        - version
      title: KMSInfo
      description: KMS instance information.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.