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

# Submit form (public)

> Evaluates form fields against the policy and returns a signed receipt.



## OpenAPI

````yaml /api/openapi.json post /v1/forms/{formId}/submit
openapi: 3.1.0
info:
  title: MeshQu API
  description: >-
    Governance infrastructure for policy-aware AI decisions. MeshQu does not run
    tools. It governs decisions about them.
  version: 1.9.0
  contact:
    name: MeshQu Support
    email: support@meshqu.com
  license:
    name: Proprietary
servers:
  - url: https://api.meshqu.com
    description: Deployed environment
security:
  - apiKey: []
    tenantId: []
tags:
  - name: Operations
    description: Health, readiness, metrics, and signing keys
  - name: Policies
    description: Policy management
  - name: Policy Groups
    description: Policy group management
  - name: Decisions
    description: Policy evaluation and recording
  - name: Chains
    description: Decision chain verification and sealing
  - name: Receipts
    description: Public receipt and bundle retrieval
  - name: Forms
    description: Attestation forms and public submission
  - name: Alerts
    description: Alert management and webhooks
  - name: Audit
    description: Audit log retrieval and verification
  - name: API Keys
    description: API key administration
  - name: Admin
    description: Tenant and platform administration
  - name: Dashboard
    description: Console dashboard data
  - name: Metrics
    description: Decision and overview metrics
  - name: Fields
    description: Field catalogue
  - name: Settings
    description: Tenant settings
  - name: Rule Creation Logs
    description: Rule authoring telemetry
paths:
  /v1/forms/{formId}/submit:
    post:
      tags:
        - Forms
      summary: Submit form (public)
      description: Evaluates form fields against the policy and returns a signed receipt.
      operationId: postV1FormsByFormIdSubmit
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: formId
          required: true
          description: Form UUID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fields:
                  description: Field values to evaluate
                  type: object
                  additionalProperties: {}
                action:
                  type: object
                  properties:
                    type:
                      type: string
                    reference_id:
                      type: string
                    metadata:
                      type: object
                      additionalProperties: {}
                  required:
                    - type
                    - reference_id
                source_artifact:
                  type: object
                  properties:
                    hash:
                      pattern: ^[a-f0-9]{64}$
                      type: string
                  required:
                    - hash
                password:
                  description: Password for password-protected forms
                  type: string
                identifier_value:
                  maxLength: 500
                  description: Value for the form identifier field (e.g., invoice number)
                  type: string
                chain:
                  description: Decision chain linkage for workflow traceability
                  type: object
                  properties:
                    chain_id:
                      format: uuid
                      description: Chain to join
                      type: string
                    chain_step:
                      minimum: 1
                      description: Step number (auto-assigned if omitted)
                      type: integer
                    parent_decision_id:
                      format: uuid
                      description: Parent decision in same chain
                      type: string
                  required:
                    - chain_id
                actor:
                  description: Actor attribution — who or what made this decision
                  type: object
                  properties:
                    id:
                      minLength: 1
                      maxLength: 255
                      description: Stable identifier for the actor
                      type: string
                    type:
                      description: Whether the actor is human or automated
                      anyOf:
                        - type: string
                          enum:
                            - human
                        - type: string
                          enum:
                            - automated
                    role:
                      maxLength: 255
                      description: >-
                        Caller-defined role label (e.g., MLRO,
                        compliance_analyst)
                      type: string
                    authority:
                      maxLength: 255
                      description: Freeform authority context (e.g., final_disposition)
                      type: string
                    display_name:
                      maxLength: 255
                      description: Human-readable name for UI/reports
                      type: string
                  required:
                    - id
                    - type
              required:
                - fields
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  decision_id:
                    format: uuid
                    type: string
                  context:
                    description: >-
                      Full decision context (needed for integrity hash
                      verification)
                    type: object
                    additionalProperties: {}
                  result:
                    description: >-
                      Full evaluation result (needed for integrity hash
                      verification)
                    type: object
                    additionalProperties: {}
                  evaluated_policies:
                    description: >-
                      Policies evaluated in this decision (populated for group
                      evaluations)
                    type: array
                    items:
                      type: object
                      properties:
                        policy_id:
                          type: string
                        policy_code:
                          type: string
                        policy_name:
                          type: string
                        version:
                          type: integer
                        shadow_mode:
                          type: boolean
                        policy_group_id:
                          type: string
                        policy_group_code:
                          type: string
                        rules:
                          type: array
                          items:
                            type: object
                            properties:
                              code:
                                type: string
                              name:
                                type: string
                            required:
                              - code
                              - name
                      required:
                        - policy_id
                        - policy_code
                        - policy_name
                        - version
                        - shadow_mode
                  verification_url:
                    type: string
                  chain_id:
                    description: Chain ID if this decision is part of a decision chain
                    anyOf:
                      - format: uuid
                        type: string
                      - type: 'null'
                  chain_step:
                    description: Step number within the chain
                    anyOf:
                      - type: integer
                      - type: 'null'
                  parent_decision_id:
                    description: Parent decision within the same chain
                    anyOf:
                      - format: uuid
                        type: string
                      - type: 'null'
                  chain_integrity_hash:
                    anyOf:
                      - type: string
                      - type: 'null'
                  chain_signature:
                    anyOf:
                      - type: string
                      - type: 'null'
                  chain_signature_kid:
                    anyOf:
                      - type: string
                      - type: 'null'
                  chain_signature_algorithm:
                    anyOf:
                      - type: string
                      - type: 'null'
                  actor:
                    description: Actor attribution — who or what made this decision
                    type: object
                    properties:
                      id:
                        minLength: 1
                        maxLength: 255
                        description: Stable identifier for the actor
                        type: string
                      type:
                        description: Whether the actor is human or automated
                        anyOf:
                          - type: string
                            enum:
                              - human
                          - type: string
                            enum:
                              - automated
                      role:
                        maxLength: 255
                        description: >-
                          Caller-defined role label (e.g., MLRO,
                          compliance_analyst)
                        type: string
                      authority:
                        maxLength: 255
                        description: Freeform authority context (e.g., final_disposition)
                        type: string
                      display_name:
                        maxLength: 255
                        description: Human-readable name for UI/reports
                        type: string
                    required:
                      - id
                      - type
                required:
                  - decision_id
                  - context
                  - result
                  - chain_id
                  - chain_step
                  - parent_decision_id
                  - chain_integrity_hash
                  - chain_signature
                  - chain_signature_kid
                  - chain_signature_algorithm
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        description: Error code
                        type: string
                      message:
                        description: Human-readable message
                        type: string
                      details:
                        description: Additional error details
                    required:
                      - code
                      - message
                  correlation_id:
                    description: Request correlation ID
                    type: string
                required:
                  - error
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        description: Error code
                        type: string
                      message:
                        description: Human-readable message
                        type: string
                      details:
                        description: Additional error details
                    required:
                      - code
                      - message
                  correlation_id:
                    description: Request correlation ID
                    type: string
                required:
                  - error
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        description: Error code
                        type: string
                      message:
                        description: Human-readable message
                        type: string
                      details:
                        description: Additional error details
                    required:
                      - code
                      - message
                  correlation_id:
                    description: Request correlation ID
                    type: string
                required:
                  - error
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        description: Error code
                        type: string
                      message:
                        description: Human-readable message
                        type: string
                      details:
                        description: Additional error details
                    required:
                      - code
                      - message
                  correlation_id:
                    description: Request correlation ID
                    type: string
                required:
                  - error
      security: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: mqu_<token>
      description: >-
        MeshQu API key passed as a bearer token: `Authorization: Bearer mqu_…`.
        Mint one in the console (Settings → API keys).
    tenantId:
      type: apiKey
      name: X-MeshQu-Tenant-Id
      in: header
      description: >-
        Tenant UUID for multi-tenant isolation. Required on all authenticated
        routes — validated before authentication (middleware/tenant.ts), so a
        missing or non-UUID header returns 400 (MISSING_TENANT_ID /
        INVALID_TENANT_ID) before the API key is checked.

````