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

# Check if app deployment is allowed on-chain



## OpenAPI

````yaml /openapi.json post /api/v1/apps/{app_id}/is-allowed
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
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/apps/{app_id}/is-allowed:
    post:
      tags:
        - Apps
      summary: Check if app deployment is allowed on-chain
      operationId: handle_app_is_allowed_api_v1_apps__app_id__is_allowed_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            title: App Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppIsAllowedRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppIsAllowedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AppIsAllowedRequest:
      properties:
        compose_hash:
          type: string
          title: Compose Hash
          description: Compose hash to check (hex)
        node_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Node Id
          description: Node ID (resolves device_id from DB)
        device_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Id
          description: Device ID (hex, direct)
        chain_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chain Id
          description: >-
            Chain ID for RPC URL resolution. If omitted, resolved from DB via
            CVM/KMS records.
      type: object
      required:
        - compose_hash
      title: AppIsAllowedRequest
    AppIsAllowedResponse:
      properties:
        app_contract_address:
          type: string
          title: App Contract Address
        compose_hash:
          type: string
          title: Compose Hash
        device_id:
          type: string
          title: Device Id
        compose_hash_allowed:
          type: boolean
          title: Compose Hash Allowed
        allow_any_device:
          type: boolean
          title: Allow Any Device
        device_id_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Device Id Allowed
        is_allowed:
          type: boolean
          title: Is Allowed
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - app_contract_address
        - compose_hash
        - device_id
        - compose_hash_allowed
        - allow_any_device
        - is_allowed
      title: AppIsAllowedResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````