CreateQuizQuestionRequest

A request or response body; the type column links to the schemas it refers to.

CreateQuizQuestionRequest

FieldTypeRequiredDescription
kindstringyes

true_false: answered true or false. multiple_choice: exactly one correct option. multi_select: several options may be correct, scored all-or-nothing. ordering: the options are items whose authored order is the answer. short_answer: the options are the accepted spellings of a typed answer. numeric: a number within a tolerance of correct_number. matching: each option is a label/match_label pair the taker reunites. fill_in_blank: the prompt's runs of three or more underscores are blanks, and the options are the accepted answers, each naming its blank_index. long_answer: a free-text essay answer with no accepted spellings, always graded by hand. drawing: the taker draws on a canvas, over drawing_starting_image when one is attached, always graded by hand.

one of "true_false" | "multiple_choice" | "multi_select" | "ordering" | "short_answer" | "numeric" | "matching" | "fill_in_blank" | "long_answer" | "drawing"

promptstringyes

On fill_in_blank questions, every run of three or more underscores (___) is one blank, up to 10 per prompt.

1–2000 characters

prompt_formatstringno

Defaults to plaintext.

one of "plaintext" | "markdown" | "pdf"

prompt_pdfQuestionPromptPdfno—
prompt_pdf_prefer_inline_displaybooleanno

Omit to draw the PDF beside the question. Send false for a long reference the taker downloads and works from instead, so it does not bury the answers. Remembered across replacements of the file.

explanationstringno

Omit or send empty for no explanation.

at most 2000 characters

pointsintegerno

Defaults to 1.

minimum 1 · maximum 1000

requires_manual_gradingbooleanno

Defaults to false, except for long_answer and drawing questions, which are always manual (sending false for one is refused).

rubric_markdownstringno

Omit or send empty for no rubric.

at most 50000 characters

rubric_visible_to_takersbooleanno

Defaults to false: the rubric reaches markers only.

correct_booleanbooleanno

Required for true_false questions; omit for every other kind.

correct_numbernumberno

numeric questions only.

tolerancenumberno

numeric questions only; 0 demands the exact value.

minimum 0

optionsarray of objectno

Required for every kind with options; omit for true_false, numeric, long_answer and drawing.

1–50 items

drawing_starting_imagestring | nullno

drawing questions only: the image the taker draws over, as a base64 data URL. Omit (or send null) for a blank canvas.

at most 3000000 characters · matches ^data:image\/(png|jpeg|webp|gif);base64,[A-Za-z0-9+/]+=*$

jsonExample
{
  "kind": "true_false",
  "prompt": "Fire doors may be propped open during deliveries.",
  "prompt_format": "plaintext",
  "prompt_pdf": {
    "pathname": "string",
    "file_name": "string"
  },
  "prompt_pdf_prefer_inline_display": true,
  "explanation": "string",
  "points": 1,
  "requires_manual_grading": true,
  "rubric_markdown": "- 2 points: names both hazards\n- 1 point: names one\n- 0: neither",
  "rubric_visible_to_takers": true,
  "correct_boolean": true,
  "correct_number": 42,
  "tolerance": 0.5,
  "options": [
    {
      "label": "string",
      "is_correct": true,
      "match_label": "string",
      "blank_index": 0
    }
  ],
  "drawing_starting_image": "data:image/png;base64,iVBORw0KGgo…"
}