{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mantic/json-schema/mantic-service-api-routes-core-types-questions-question-1-schema.json",
  "title": "Question",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mantic-openapi.json#/components/schemas/service__api__routes__core__types__questions__Question__1",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id",
      "description": "Unique identifier for the question."
    },
    "title": {
      "type": "string",
      "title": "Title",
      "description": "Question that the Mantic forecast answers."
    },
    "declarative_title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Declarative Title",
      "description": "Statement-form version of the question. Null when no declarative title is available."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "Time when the question was created."
    },
    "visibility": {
      "$ref": "#/$defs/QuestionVisibility",
      "description": "`public` for a question Mantic created, which every user sees; `private` for one a user created, which their organisation and dashboards shared with others see."
    },
    "latest_forecast": {
      "anyOf": [
        {
          "oneOf": [
            {
              "$ref": "#/$defs/service__api__routes__core__types__forecasts__UnknownTypeForecastSummary__1"
            },
            {
              "$ref": "#/$defs/service__api__routes__core__types__forecasts__RedactedForecastSummary__1"
            },
            {
              "$ref": "#/$defs/service__api__routes__core__types__forecasts__EventForecastSummary__1"
            },
            {
              "$ref": "#/$defs/service__api__routes__core__types__forecasts__CategoricalForecastSummary__1"
            },
            {
              "$ref": "#/$defs/service__api__routes__core__types__forecasts__NumericalForecastSummary__1"
            },
            {
              "$ref": "#/$defs/service__api__routes__core__types__forecasts__DateForecastSummary__1"
            }
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Latest Forecast",
      "description": "Most recent completed forecast available for the question. When `show_forecasts` is false, the forecast contains only its ID, completion time, and `redacted` type; probabilities and other forecast values are omitted. Null means no summary is available."
    },
    "supplementary_information": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Supplementary Information",
      "description": "Background and context for the question."
    },
    "clarifications": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Clarifications",
      "description": "Criteria that determine how the question resolves."
    },
    "resolution": {
      "anyOf": [
        {
          "$ref": "#/$defs/QuestionResolution"
        },
        {
          "type": "null"
        }
      ],
      "description": "Resolution details."
    },
    "tags": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tags",
      "description": "Tags assigned to the question."
    }
  },
  "type": "object",
  "required": [
    "id",
    "title",
    "declarative_title",
    "created_at",
    "visibility",
    "latest_forecast",
    "resolution",
    "tags"
  ],
  "$defs": {
    "CategoricalForecastSummaryCategory": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "probability": {
          "type": "number",
          "title": "Probability"
        }
      },
      "type": "object",
      "required": [
        "label",
        "probability"
      ],
      "title": "CategoricalForecastSummaryCategory"
    },
    "ForecastSummaryIntervalExclusiveLowerBoundInclusiveUpperBound_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "gt": {
          "title": "Gt",
          "description": "The interval's exclusive lower bound. Greater than"
        },
        "le": {
          "title": "Le",
          "description": "The interval's incluse upper bound. Less than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "gt",
        "le"
      ],
      "title": "ForecastSummaryIntervalExclusiveLowerBoundInclusiveUpperBound"
    },
    "ForecastSummaryIntervalExclusiveLowerBoundInclusiveUpperBound_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "gt": {
          "title": "Gt",
          "description": "The interval's exclusive lower bound. Greater than"
        },
        "le": {
          "title": "Le",
          "description": "The interval's incluse upper bound. Less than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "gt",
        "le"
      ],
      "title": "ForecastSummaryIntervalExclusiveLowerBoundInclusiveUpperBound"
    },
    "ForecastSummaryIntervalExclusiveLowerBound_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "gt": {
          "type": "string",
          "format": "date-time",
          "title": "Gt",
          "description": "The interval's exclusive lower bound. Greater than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "gt"
      ],
      "title": "ForecastSummaryIntervalExclusiveLowerBound"
    },
    "ForecastSummaryIntervalExclusiveLowerBound_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "gt": {
          "type": "number",
          "title": "Gt",
          "description": "The interval's exclusive lower bound. Greater than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "gt"
      ],
      "title": "ForecastSummaryIntervalExclusiveLowerBound"
    },
    "ForecastSummaryIntervalExclusiveRange_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "gt": {
          "title": "Gt",
          "description": "The interval's exclusive lower bound. Greater than"
        },
        "lt": {
          "title": "Lt",
          "description": "The interval's exclusive upper bound. Less than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "gt",
        "lt"
      ],
      "title": "ForecastSummaryIntervalExclusiveRange"
    },
    "ForecastSummaryIntervalExclusiveRange_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "gt": {
          "title": "Gt",
          "description": "The interval's exclusive lower bound. Greater than"
        },
        "lt": {
          "title": "Lt",
          "description": "The interval's exclusive upper bound. Less than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "gt",
        "lt"
      ],
      "title": "ForecastSummaryIntervalExclusiveRange"
    },
    "ForecastSummaryIntervalExclusiveUpperBound_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "lt": {
          "type": "string",
          "format": "date-time",
          "title": "Lt",
          "description": "The interval's exclusive upper bound. Less than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "lt"
      ],
      "title": "ForecastSummaryIntervalExclusiveUpperBound"
    },
    "ForecastSummaryIntervalExclusiveUpperBound_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "lt": {
          "type": "number",
          "title": "Lt",
          "description": "The interval's exclusive upper bound. Less than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "lt"
      ],
      "title": "ForecastSummaryIntervalExclusiveUpperBound"
    },
    "ForecastSummaryIntervalInclusiveLowerBoundExclusiveUpperBound_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "ge": {
          "title": "Ge",
          "description": "The interval's inclusive lower bound. Greater than or equal to"
        },
        "lt": {
          "title": "Lt",
          "description": "The interval's exclusive upper bound. Less than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "ge",
        "lt"
      ],
      "title": "ForecastSummaryIntervalInclusiveLowerBoundExclusiveUpperBound"
    },
    "ForecastSummaryIntervalInclusiveLowerBoundExclusiveUpperBound_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "ge": {
          "title": "Ge",
          "description": "The interval's inclusive lower bound. Greater than or equal to"
        },
        "lt": {
          "title": "Lt",
          "description": "The interval's exclusive upper bound. Less than"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "ge",
        "lt"
      ],
      "title": "ForecastSummaryIntervalInclusiveLowerBoundExclusiveUpperBound"
    },
    "ForecastSummaryIntervalInclusiveLowerBound_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "ge": {
          "type": "string",
          "format": "date-time",
          "title": "Ge",
          "description": "The interval's inclusive lower bound. Greater than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "ge"
      ],
      "title": "ForecastSummaryIntervalInclusiveLowerBound"
    },
    "ForecastSummaryIntervalInclusiveLowerBound_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "ge": {
          "type": "number",
          "title": "Ge",
          "description": "The interval's inclusive lower bound. Greater than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "ge"
      ],
      "title": "ForecastSummaryIntervalInclusiveLowerBound"
    },
    "ForecastSummaryIntervalInclusiveRange_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "ge": {
          "title": "Ge",
          "description": "The interval's inclusive lower bound. Greater than or equal to"
        },
        "le": {
          "title": "Le",
          "description": "The interval's incluse upper bound. Less than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "ge",
        "le"
      ],
      "title": "ForecastSummaryIntervalInclusiveRange"
    },
    "ForecastSummaryIntervalInclusiveRange_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "ge": {
          "title": "Ge",
          "description": "The interval's inclusive lower bound. Greater than or equal to"
        },
        "le": {
          "title": "Le",
          "description": "The interval's incluse upper bound. Less than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "ge",
        "le"
      ],
      "title": "ForecastSummaryIntervalInclusiveRange"
    },
    "ForecastSummaryIntervalInclusiveUpperBound_datetime_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "le": {
          "type": "string",
          "format": "date-time",
          "title": "Le",
          "description": "The interval's incluse upper bound. Less than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "le"
      ],
      "title": "ForecastSummaryIntervalInclusiveUpperBound"
    },
    "ForecastSummaryIntervalInclusiveUpperBound_float_": {
      "properties": {
        "probability": {
          "type": "number",
          "title": "Probability",
          "description": "The probability that the value falls within this interval"
        },
        "le": {
          "type": "number",
          "title": "Le",
          "description": "The interval's incluse upper bound. Less than or equal to"
        }
      },
      "type": "object",
      "required": [
        "probability",
        "le"
      ],
      "title": "ForecastSummaryIntervalInclusiveUpperBound"
    },
    "ForecastSummaryInterval_datetime_": {
      "anyOf": [
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveLowerBound_datetime_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveUpperBound_datetime_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveLowerBound_datetime_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveUpperBound_datetime_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveRange_datetime_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveRange_datetime_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveLowerBoundExclusiveUpperBound_datetime_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveLowerBoundInclusiveUpperBound_datetime_"
        }
      ]
    },
    "ForecastSummaryInterval_float_": {
      "anyOf": [
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveLowerBound_float_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveUpperBound_float_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveLowerBound_float_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveUpperBound_float_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveRange_float_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveRange_float_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalInclusiveLowerBoundExclusiveUpperBound_float_"
        },
        {
          "$ref": "#/$defs/ForecastSummaryIntervalExclusiveLowerBoundInclusiveUpperBound_float_"
        }
      ]
    },
    "ForecastSummaryIntervals_datetime_": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ForecastSummaryInterval_datetime_"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "A list of intervals that are relevant to the question. These mostly pertain to categorical questions that specify categories over a continous range. For example, a quesiton may ask: \"Will X happen in June, July or later?\" In which case we may provide the probabilites for each of these intervals here."
    },
    "ForecastSummaryIntervals_float_": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ForecastSummaryInterval_float_"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "A list of intervals that are relevant to the question. These mostly pertain to categorical questions that specify categories over a continous range. For example, a quesiton may ask: \"Will X happen in June, July or later?\" In which case we may provide the probabilites for each of these intervals here."
    },
    "ForecastSummaryPercentiles_datetime_": {
      "additionalProperties": {
        "type": "string",
        "format": "date-time"
      },
      "type": "object",
      "description": "Dictionary containing percentiles from the underlying forecast distribution. This endpoint returns the 25th, 50th (median), and 75th percentiles by default. Note that, for date distributions in particular, one or more of these percentiles may not exist, eg: if the likelihood of an event never exceeds 5%. In these cases we provide the maximum percentile\n\nNote that the keys in this dictionary that are prefixed with a \"p\" (\"p25\" and \"p75\") are deprecated, use the numeric keys instead (\"25\" and \"75\")"
    },
    "ForecastSummaryPercentiles_float_": {
      "additionalProperties": {
        "type": "number"
      },
      "type": "object",
      "description": "Dictionary containing percentiles from the underlying forecast distribution. This endpoint returns the 25th, 50th (median), and 75th percentiles by default. Note that, for date distributions in particular, one or more of these percentiles may not exist, eg: if the likelihood of an event never exceeds 5%. In these cases we provide the maximum percentile\n\nNote that the keys in this dictionary that are prefixed with a \"p\" (\"p25\" and \"p75\") are deprecated, use the numeric keys instead (\"25\" and \"75\")"
    },
    "ForecastSummaryThresholds_datetime_": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "propertyNames": {
            "format": "date-time"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "description": "Dictionary containing threshold probabilities that are relevant to the question. For example: a \"date\" question may specify a deadline like, \"Will X happen before the end of July?\" In which case we may provide the probability of the event happening before the end of July here"
    },
    "ForecastSummaryThresholds_float_": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "description": "Dictionary containing threshold probabilities that are relevant to the question. For example: a \"date\" question may specify a deadline like, \"Will X happen before the end of July?\" In which case we may provide the probability of the event happening before the end of July here"
    },
    "QuestionResolution": {
      "properties": {
        "resolved_at": {
          "type": "string",
          "format": "date-time",
          "title": "Resolved At",
          "description": "Time when the question was resolved."
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value",
          "description": "Outcome used to resolve the question. Null when the resolution has no outcome value."
        },
        "notes": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Notes",
          "description": "Evidence or context supporting the resolution."
        }
      },
      "type": "object",
      "required": [
        "resolved_at",
        "value",
        "notes"
      ],
      "title": "QuestionResolution"
    },
    "QuestionVisibility": {
      "type": "string",
      "enum": [
        "public",
        "private"
      ]
    },
    "service__api__routes__core__types__forecasts__CategoricalForecastSummary__1": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "title": "Date"
        },
        "type": {
          "type": "string",
          "const": "categorical",
          "title": "Type"
        },
        "categories": {
          "items": {
            "$ref": "#/$defs/CategoricalForecastSummaryCategory"
          },
          "type": "array",
          "title": "Categories"
        }
      },
      "type": "object",
      "required": [
        "id",
        "date",
        "type",
        "categories"
      ],
      "title": "CategoricalForecastSummary"
    },
    "service__api__routes__core__types__forecasts__DateForecastSummary__1": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "title": "Date"
        },
        "type": {
          "type": "string",
          "const": "date",
          "title": "Type"
        },
        "median_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Median Date",
          "deprecated": true
        },
        "percentiles": {
          "$ref": "#/$defs/ForecastSummaryPercentiles_datetime_"
        },
        "thresholds": {
          "$ref": "#/$defs/ForecastSummaryThresholds_datetime_"
        },
        "intervals": {
          "$ref": "#/$defs/ForecastSummaryIntervals_datetime_"
        }
      },
      "type": "object",
      "required": [
        "id",
        "date",
        "type",
        "percentiles"
      ],
      "title": "DateForecastSummary"
    },
    "service__api__routes__core__types__forecasts__EventForecastSummary__1": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "title": "Date"
        },
        "type": {
          "type": "string",
          "const": "event",
          "title": "Type"
        },
        "probability": {
          "type": "number",
          "title": "Probability"
        },
        "by": {
          "type": "string",
          "format": "date-time",
          "title": "By"
        }
      },
      "type": "object",
      "required": [
        "id",
        "date",
        "type",
        "probability",
        "by"
      ],
      "title": "EventForecastSummary"
    },
    "service__api__routes__core__types__forecasts__NumericalForecastSummary__1": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "title": "Date"
        },
        "type": {
          "type": "string",
          "const": "numerical",
          "title": "Type"
        },
        "median_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Median Value",
          "deprecated": true
        },
        "percentiles": {
          "$ref": "#/$defs/ForecastSummaryPercentiles_float_"
        },
        "thresholds": {
          "$ref": "#/$defs/ForecastSummaryThresholds_float_"
        },
        "intervals": {
          "$ref": "#/$defs/ForecastSummaryIntervals_float_"
        }
      },
      "type": "object",
      "required": [
        "id",
        "date",
        "type",
        "percentiles"
      ],
      "title": "NumericalForecastSummary"
    },
    "service__api__routes__core__types__forecasts__RedactedForecastSummary__1": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "title": "Date"
        },
        "type": {
          "type": "string",
          "const": "redacted",
          "title": "Type"
        }
      },
      "type": "object",
      "required": [
        "id",
        "date",
        "type"
      ],
      "title": "RedactedForecastSummary"
    },
    "service__api__routes__core__types__forecasts__UnknownTypeForecastSummary__1": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "title": "Date"
        },
        "type": {
          "type": "string",
          "const": "unknown",
          "title": "Type"
        }
      },
      "type": "object",
      "required": [
        "id",
        "date",
        "type"
      ],
      "title": "UnknownTypeForecastSummary"
    }
  }
}