{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qrvote-org/json-schema/qrvote-org-campaign-schema.json",
  "title": "Campaign",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qrvote-org-openapi.json#/components/schemas/Campaign",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "contest",
        "survey",
        "hunt",
        "board"
      ],
      "description": "board: the crowd writes it (see boardMode). A nomination is a contest with nominate = true."
    },
    "boardMode": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "qa",
        "ideas",
        "wall",
        null
      ],
      "description": "Boards: qa (questions, upvoted, one on the big screen), ideas (upvoted, with statuses, categories and one reply each) or wall (messages, no voting)."
    },
    "approve": {
      "type": "boolean",
      "description": "Boards and nominations: new posts wait for the organizer's approval."
    },
    "names": {
      "type": "boolean",
      "description": "Boards and nominations: people may add their name to a post."
    },
    "paused": {
      "type": "boolean",
      "description": "Boards: new posts are paused."
    },
    "replyAs": {
      "type": "string",
      "description": "Ideas: how the organizer's replies are signed."
    },
    "labels": {
      "type": "array",
      "description": "Ideas: the categories people pick from.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "nominate": {
      "type": "boolean",
      "description": "Contests: the entries were suggested by the crowd first."
    },
    "suggesting": {
      "type": "boolean",
      "description": "Nominations: still taking suggestions; nobody votes and results are hidden until suggestions close."
    },
    "suggestUntil": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Nominations: when suggestions close by themselves (Unix ms), keeping every approved suggestion."
    },
    "quiz": {
      "type": "boolean",
      "description": "Surveys: a quiz. Questions may have correct answers and each response gets a score. Correct answers are public only once the quiz closes."
    },
    "leaderboard": {
      "type": "boolean",
      "description": "Quizzes: players may add a name and scores are ranked."
    },
    "hostSecs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 300,
      "description": "Live quizzes: seconds per question on the auto clock (0 = the organizer moves it on)."
    },
    "host": {
      "type": "boolean",
      "description": "Quizzes: run live by the organizer, one question at a time. The public sees only questions already asked and answers already revealed."
    },
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "single",
        "each"
      ],
      "description": "Contests: pick one favorite, or like several."
    },
    "results": {
      "type": "string",
      "enum": [
        "live",
        "after",
        "private"
      ]
    },
    "requireScan": {
      "type": "boolean"
    },
    "requireBallot": {
      "type": "boolean"
    },
    "allowChange": {
      "type": "boolean"
    },
    "categories": {
      "type": "array",
      "description": "Contests: award categories. Each phone gets one vote in each. Empty = one overall vote.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "judging": {
      "type": "boolean",
      "description": "Contests: judges score the entries too. Their award is public once voting closes (unless results are private)."
    },
    "opensAt": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Unix ms"
    },
    "closesAt": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Unix ms"
    },
    "status": {
      "type": "string",
      "enum": [
        "scheduled",
        "open",
        "closed"
      ]
    },
    "resultsVisible": {
      "type": "boolean"
    }
  }
}