{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pollunit-com/json-schema/pollunit-com-voter-schema.json",
  "title": "Voter",
  "description": "A participant of the poll. Which fields are returned depends on the poll type and on your access level: `complete` only for surveys, `required_option_votes_complete` only when the poll requires votes on all options or all dots, and moderation fields only with admin access.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pollunit-com-openapi.yml#/components/schemas/Voter",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Voter public_id"
    },
    "user_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name of the participant. A generated name when the poll has `anonymize_voter_names`."
    },
    "changed_by_admin": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "The votes of this participant were changed by an admin."
    },
    "complete": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Surveys only: the participant finished the survey."
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "fraudulent": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Admin access only"
    },
    "paid": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Admin access only. `false` while a voting fee for this participant is still open."
    },
    "required_option_votes_complete": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Admin access only, and only when the poll has `option_vote_requirement` `all_options` or `require_all_dots` enabled."
    },
    "privacy_policy_accepted": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Admin access only, and only when the poll has `privacy_policy_for_voters`."
    },
    "terms_accepted": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Admin access only, and only when the poll has `terms_for_voters`."
    }
  },
  "required": [
    "id"
  ]
}