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

# Log rule creation feedback

> Appends a rule creation feedback entry for the data flywheel and audit trail.



## OpenAPI

````yaml /api/openapi.json post /v1/rule-creation-logs
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/rule-creation-logs:
    post:
      tags:
        - Rule Creation Logs
      summary: Log rule creation feedback
      description: >-
        Appends a rule creation feedback entry for the data flywheel and audit
        trail.
      operationId: postV1RuleCreationLogs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                anonymised_user_id:
                  type: string
                task_type:
                  type: string
                input_nl:
                  minLength: 1
                  type: string
                context:
                  type: object
                  additionalProperties: {}
                model_id:
                  minLength: 1
                  type: string
                model_output: {}
                final_rule: {}
                outcome:
                  anyOf:
                    - type: string
                      enum:
                        - accepted
                    - type: string
                      enum:
                        - modified
                    - type: string
                      enum:
                        - rejected
                corrections:
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                      from: {}
                      to: {}
                    required:
                      - field
                      - from
                      - to
                edit_distance:
                  minimum: 0
                  type: integer
                confidence:
                  type: string
                latency_ms:
                  minimum: 0
                  type: integer
              required:
                - input_nl
                - model_id
                - model_output
                - outcome
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
        '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
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.

````