{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/superdocs-app/json-schema/superdocs-app-approval-request-schema.json",
  "title": "ApprovalRequest",
  "description": "Approve or deny proposed AI document changes.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/superdocs-app-approval-api-openapi.yml#/components/schemas/ApprovalRequest",
  "properties": {
    "job_id": {
      "type": "string",
      "title": "Job Id",
      "description": "Job ID that is awaiting approval."
    },
    "change_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Change Id",
      "description": "Specific change to approve/deny (for individual decisions). Get change IDs from the job's pending_changes."
    },
    "approved": {
      "type": "boolean",
      "title": "Approved",
      "description": "Whether to approve (true) or deny (false) the change."
    },
    "feedback": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Feedback",
      "description": "Optional feedback explaining why a change was denied. Helps the AI adjust future suggestions."
    },
    "changes": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Changes",
      "description": "Batch decisions: array of {change_id, approved, feedback} objects. Use for 'Accept All' or 'Deny All'."
    }
  },
  "type": "object",
  "required": [
    "job_id",
    "approved"
  ]
}