create_quiz_item
Create a question for a Canvas New Quiz, supporting 13 question types such as multiple choice, true/false, and essay.
Instructions
Create a question (item) in a New Quiz. This is the primary tool for adding questions.
INTERACTION TYPES AND THEIR DATA FORMATS:
"choice" (Multiple Choice) - Single correct answer from choices interaction_data: { "choices": [ { "item_body": "Answer A", "position": 1 }, { "item_body": "Answer B", "position": 2 }, { "item_body": "Answer C", "position": 3 } ] } scoring_data: { "value": "" } NOTE: Create with placeholder scoring_data first. The API returns choices with generated IDs. Then use update_quiz_item to set the correct answer ID. Alternatively, scoring_data can reference by position index.
"true-false" (True/False) interaction_data: { "choices": [ { "item_body": "True", "position": 1 }, { "item_body": "False", "position": 2 } ] } scoring_data: { "value": "" } Same approach as "choice" - create first, then update with correct choice ID.
"multi-answer" (Multiple Answer / Select All That Apply) interaction_data: { "choices": [ { "item_body": "Option A", "position": 1 }, { "item_body": "Option B", "position": 2 }, { "item_body": "Option C", "position": 3 } ] } scoring_data: { "value": ["", ""] }
"essay" (Essay / Free Response) interaction_data: {} scoring_data: { "value": "" }
"file-upload" (File Upload) interaction_data: {} scoring_data: { "value": "" }
"matching" (Matching) interaction_data: { "choices": [ { "item_body": "Term 1", "position": 1, "match_id": "m1" }, { "item_body": "Term 2", "position": 2, "match_id": "m2" } ], "matches": [ { "item_body": "Definition 1", "id": "m1", "position": 1 }, { "item_body": "Definition 2", "id": "m2", "position": 2 } ] } scoring_data: { "value": [{ "id": "", "match_id": "m1" }] }
"ordering" (Ordering) interaction_data: { "choices": [ { "item_body": "First item", "position": 1 }, { "item_body": "Second item", "position": 2 } ] } scoring_data: { "value": ["", ""] }
"categorization" (Categorization) interaction_data: { "categories": [ { "item_body": "Category A", "id": "cat1" }, { "item_body": "Category B", "id": "cat2" } ], "choices": [ { "item_body": "Item 1", "position": 1 }, { "item_body": "Item 2", "position": 2 } ] } scoring_data: { "value": [{ "id": "", "category_id": "cat1" }] }
"numeric" (Numeric Answer) interaction_data: {} scoring_data: { "value": "42" } or { "value": { "exact": 42, "margin": 0.1 } }
"fill-blank" (Fill in the Blank) interaction_data: {} scoring_data: { "value": ["acceptable answer 1", "acceptable answer 2"] }
"rich-fill-blank" (Fill in Multiple Blanks) interaction_data: { "blanks": [{ "id": "b1", "item_body": "blank1" }] } scoring_data: { "value": { "b1": ["answer1", "answer2"] } }
"formula" (Formula / Calculated) interaction_data: { "formula": "x + y", "variables": [{ "name": "x", "min": 1, "max": 10 }] } scoring_data: { "value": { "formula": "x + y", "margin": 0.01 } }
"hot-spot" (Hot Spot / Image Click) interaction_data: { "image_url": "...", "regions": [...] } scoring_data: { "value": "" }
TIP: For choice-based questions, it is often easiest to create the item first with an empty or placeholder scoring_data, then GET the item to see the generated choice IDs, and finally UPDATE the item with the correct scoring_data referencing those IDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Short title for the question | |
| position | No | Position/order of this question in the quiz (1-based) | |
| course_id | Yes | Canvas course ID | |
| item_body | Yes | The question text/prompt (HTML supported, e.g. '<p>What is 2+2?</p>') | |
| scoring_data | Yes | Correct answer data. See tool description for format per type. | |
| assignment_id | Yes | The assignment ID of the New Quiz | |
| points_possible | Yes | Point value for this question | |
| feedback_neutral | No | Feedback shown to all students after answering (HTML supported) | |
| interaction_data | Yes | Question-type-specific data (choices, matches, etc). See tool description for format per type. | |
| interaction_type | Yes | The question type (see tool description for formats) |