{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/awraiter-ai/json-schema/awraiter-ai-create-report-input-schema.json",
  "title": "CreateReportInput",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/awraiter-ai-openapi.json#/components/schemas/CreateReportInput",
  "type": "object",
  "properties": {
    "folderId": {
      "type": "number",
      "description": "One of your channel folders (get_report_data lists them). Omit for channelIds, or for all your channels."
    },
    "channelIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "minItems": 1,
      "maxItems": 100,
      "description": "Exactly these channels. Omit (with folderId) for all channels you can access in the active team."
    },
    "period": {
      "type": "string",
      "enum": [
        "week",
        "month",
        "custom"
      ],
      "description": "week (default) or month end on `to`; custom = from..to."
    },
    "from": {
      "type": "string",
      "description": "YYYY-MM-DD, first day of a custom period."
    },
    "to": {
      "type": "string",
      "description": "YYYY-MM-DD, last day (default today, UTC)."
    },
    "conclusions": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string",
          "maxLength": 1500,
          "description": "The period in 2-3 sentences, with the key numbers."
        },
        "worked": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 300
          },
          "maxItems": 8,
          "description": "What worked, with numbers."
        },
        "notWorked": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 300
          },
          "maxItems": 8,
          "description": "What did not work, with numbers."
        },
        "next": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 300
          },
          "maxItems": 8,
          "description": "What to test or change next."
        }
      },
      "additionalProperties": false
    },
    "template": {
      "type": "string",
      "enum": [
        "brief",
        "agency",
        "detailed"
      ],
      "description": "brief, agency or detailed; default = saved settings."
    },
    "includeHypotheses": {
      "type": "boolean",
      "description": "Print the hypotheses section (default true)."
    },
    "lang": {
      "type": "string",
      "enum": [
        "en",
        "ru",
        "it",
        "de",
        "fr"
      ],
      "description": "Report language; default = the user's panel language."
    },
    "deliver": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "link",
          "telegram"
        ]
      },
      "uniqueItems": true,
      "description": "link (default): a public link to the PDF, valid 7 days - share it with the user. telegram: the PDF is also sent to the user's chat with the AwrAIter bot (needs the bot linked in the panel)."
    }
  },
  "additionalProperties": false
}