{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaquill-ai/json-schema/vaquill-ai-workflow-run-request-schema.json",
  "title": "WorkflowRunRequest",
  "description": "Launch a run of one definition inside one matter.\n\n`inputs` is `dict[str, Any]` because each definition declares its own field\nset, which `workflows.list` publishes and the definition itself validates.\nTyping it here would mean generating one request model per workflow and\nregenerating the OpenAPI document every time a definition gained a field.\n\nThere is no `countryCode`. Every active workflow is US-scoped after the 2026\npivot, and the internal route stopped accepting one for the same reason.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaquill-ai-workflows-api-openapi.yml#/components/schemas/WorkflowRunRequest",
  "properties": {
    "title": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Title",
      "description": "Display title for this run. Omit to take the definition's own title."
    },
    "documents": {
      "items": {
        "$ref": "#/$defs/WorkflowRunDocument"
      },
      "type": "array",
      "title": "Documents",
      "description": "Documents to attach, each in a role the definition declares."
    },
    "inputs": {
      "additionalProperties": true,
      "type": "object",
      "title": "Inputs",
      "description": "Answers to the definition's questions, keyed by each input field's `key`. Untyped here because every definition declares its own field set; read `workflows.list` for the shape this workflow expects."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "$defs": {
    "WorkflowRunDocument": {
      "properties": {
        "documentId": {
          "type": "string",
          "title": "Documentid",
          "description": "`doc_` identifier of the document to attach. Must be in this matter."
        },
        "role": {
          "type": "string",
          "enum": [
            "subject",
            "playbook",
            "reference",
            "exhibit",
            "opposing",
            "context"
          ],
          "title": "Role",
          "description": "What part this document plays in the run. Must be a role the definition declares in its `documentSlots`.",
          "default": "subject"
        },
        "position": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Position",
          "description": "Order within the role, counting from 0. Matters when a role accepts more than one document.",
          "default": 0
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "documentId"
      ],
      "title": "WorkflowRunDocument",
      "description": "One document attached to a run, in a role the definition declares."
    }
  }
}