add_module_item
Add assignments, quizzes, files, pages, or external links to a Canvas module, with required fields varying by item type.
Instructions
Add an item to a module. Required fields depend on type: Assignment/Discussion/File need content_id, Page needs page_url, SubHeader/ExternalUrl need title. For New Quizzes, use type='Assignment' with the New Quiz's assignment_id (not type='Quiz'). type='Quiz' is for Classic Quizzes only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Type of item to add | |
| title | No | Title (required for SubHeader and ExternalUrl) | |
| indent | No | Indentation level (0-5) | |
| page_url | No | URL slug of the page (required for Page type) | |
| position | No | Position within the module | |
| course_id | Yes | Canvas course ID | |
| module_id | Yes | Module ID | |
| content_id | No | ID of the content (required for Assignment, Quiz, Discussion, File) | |
| external_url | No | URL for ExternalUrl type |