hotjar · Schema

SurveyQuestion

A question within a Hotjar survey, including its type, text, and available answer options.

Properties

Name Type Description
id integer The unique identifier for the question.
text string The text content of the question displayed to respondents.
type string The type of question, such as long-text, short-text, rating, multiple-choice, or nps.
is_required boolean Whether the question requires an answer before submission.
choices array The list of answer choices for multiple-choice questions. Null for open-ended question types.
labels object Labels for rating or scale questions. Null for other question types.
image_url string URL of an image attached to the question. Null if no image is attached.
View JSON Schema on GitHub

JSON Schema

hotjar-surveyquestion-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SurveyQuestion",
  "title": "SurveyQuestion",
  "type": "object",
  "description": "A question within a Hotjar survey, including its type, text, and available answer options.",
  "properties": {
    "id": {
      "type": "integer",
      "description": "The unique identifier for the question."
    },
    "text": {
      "type": "string",
      "description": "The text content of the question displayed to respondents."
    },
    "type": {
      "type": "string",
      "description": "The type of question, such as long-text, short-text, rating, multiple-choice, or nps."
    },
    "is_required": {
      "type": "boolean",
      "description": "Whether the question requires an answer before submission."
    },
    "choices": {
      "type": "array",
      "nullable": true,
      "description": "The list of answer choices for multiple-choice questions. Null for open-ended question types.",
      "items": {
        "type": "string"
      }
    },
    "labels": {
      "type": "object",
      "nullable": true,
      "description": "Labels for rating or scale questions. Null for other question types."
    },
    "image_url": {
      "type": "string",
      "nullable": true,
      "description": "URL of an image attached to the question. Null if no image is attached."
    }
  }
}