# PUT /courses/:course_id/modules/:module_id/quiz

**Resource:** [COURSES](./courses.md)  
**MCP tool:** `set_course_module_quiz`  
**Scopes:** `courses:write`  
**Write operation:** yes

Create or update the quiz settings for one course module. Send only the fields to set; the first call creates the quiz with defaults for the rest.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `course_id` | path | string | yes |  |
| `module_id` | path | string | yes |  |
| `quiz_id` | body | string | no | Optional. Use one of your tests from Quizzes (list_quizzes kind=test) as this module's quiz: its questions and settings are used. A test can be the quiz of one module at a time. |
| `pass_mark` | body | number | no | Percent a learner must score to pass, 1 to 100. Defaults to 80 when the quiz is first created. |
| `draw_count` | body | number | no | How many questions are drawn at random from the bank for each attempt. Whole number, 1 to 100. Defaults to 5 when the quiz is first created. A course cannot be published while any module quiz has a draw_count above its number of questions. |
| `max_attempts` | body | number | no | How many attempts a learner gets. Whole number, 1 to 100. Defaults to 3 when the quiz is first created. Send null to allow unlimited attempts. |
| `cooldown_minutes` | body | number | no | Minimum minutes a learner must wait between attempts. Whole number, 0 to 525600. null or 0 means no wait. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PUT   "https://api.trustpager.com/functions/v1/api/v1/courses/:course_id/modules/:module_id/quiz"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"pass_mark":"...","draw_count":"...","max_attempts":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`