# Courses & Content


A course is the thing you deliver: what a buyer gets after the checkout in the Selling
chapter, what an invite hands out, what a student opens on your site. This chapter is
about building it — the tree of modules and lessons, the text and video inside them, the
checklists that keep students moving — and about the few settings that decide how
students move through it.

On Omumu you build a course by describing it. Say Mira has a webinar's worth of notes on
automating invoice reminders: she tells her assistant what the course is and who it is
for, and the assistant creates the course, its modules, its lessons and their content
through the course tools, asking her before each step it is unsure about. Everything it
makes is an ordinary course she can open and edit in the admin. The rest of the chapter
shows the conversation and, for each step, the pages in the admin that do the same. A
path such as *Products → Courses* names a group in the admin's navigation — the rail on
the left on a laptop, behind the Menu button on a phone — and the page under it.

One rule to know before you start: **there is no draft step.** A course, a module, a
lesson or a content block is live for students with access the moment it is saved. Build
before you sell, or build on a copy.

## Concepts

**The course tree.** A course holds modules in order; a module holds lessons in order; a
lesson holds content blocks in order. Each level has a title, a description and an
optional image. The description is what a student reads on the course's home page or the
module list; the blocks are the lesson itself — the "meat". A content block is rich text
(you can write it in Markdown) with, optionally, one attached file: a video, a PDF, an
audio recording, an image.

**Resources.** Every uploaded file on your site is a resource in one site-wide library:
course videos, lesson PDFs, podcast audio, generated images, transcripts. A block attaches
a resource; a resource can be attached in several places, and it cannot be deleted while
anything still uses it. Videos stream from the content delivery network, not from your
site, so a lesson with video plays the same for one student and for a thousand.

**Checklists and completion.** A lesson can carry a checklist: short, self-attested tasks
("Log every repeated task for five working days"), each worth a few points of XP. Ticking
them is how a student tells the course they did the work. Completion is derived from
content, never configured: a lesson is complete when the student has opened it, ticked
every checklist item, watched every video to the course's watch threshold, and handed in
its assignment if it has one; a module when all its lessons are complete; a course when
all its modules are. Adding content later adds requirements for students who are not yet
done; it never un-completes anyone.

**Gating.** A course is either *open* — course access opens every module — or
*sequential*, where completing one module unlocks the next. That is the whole mechanism:
set the mode, and the unlocking is built in. The *watch threshold* says how much of a
video counts as watched (a quarter, half, three quarters, 90 % or all of it; three quarters
by default). There is no drip by date: Omumu unlocks on what a student has done, not on
the calendar.

**Access.** A student gets into a course by holding access to it — bought through an
offer (the Selling chapter), accepted through an invite, or granted by you — and signs in
to open it. A course can instead be switched to *open access*, which lets anyone view it
without signing in. You, as the site's Headmaster, can open every course you built.

**Assignments.** An assignment is a piece of work you expect back, attached to exactly
one scope — a course, a module, a lesson, or the site itself — with the rating criteria
the AI rater and your staff read when they judge a hand-in. Attaching one to a lesson puts
the hand-in form on that lesson's page and makes handing in part of completing it. An
assignment attached to the site is an *All courses* assignment: it lives outside every
course, gets its own page, counts toward no course, and is rated against whatever courses
each student can open. Students find every assignment they have on their *Assignments*
page, the All courses ones first and then one group per course. This chapter shows how to create one; the Teaching & Feedback
chapter is about what happens when work comes in.

**Quizzes.** A quiz is a set of questions, one per screen, and it comes in two kinds. An
*outcome quiz* sorts: each answer is worth points towards one or more *buckets* — the
result categories — and whoever takes it lands in the bucket with the highest score. A
*score quiz* measures: its questions belong to *scales*, each answer carries points, and the
person gets a percent per scale and a total. The total picks the bucket (each bucket has a
minimum percent), each scale shows the *level* text its percent reaches, and the scale with
the most to gain gets its own text. In both kinds a bucket can act: tag the person, start an
email sequence, grant a course, redirect to a page, show a message. A score quiz adds two
things driven by the answers rather than the score: *notes*, paragraphs shown when a given
answer was chosen, and *doors*, the one next step offered at the end, chosen by the first
matching condition. A quiz can ask for a first name on its start screen and an email
before it starts or after it ends, so it works on visitors as well as students, and a
score quiz's result lives at a link the person can come back to. It is a tool for finding
out who someone is as much as what they know; the Audience & Email chapter picks up the
audience side.

## Hands-on

### Build a course by talking to your assistant

Mira says: *"Create a course called Invoice Reminders on Autopilot — for solo
consultants who chase late payments by hand. Three modules: find the pattern, build the
reminder, hand it off. Two lessons each. I'll give you the content."*

The assistant creates the course with its title and tagline, then each module and each
lesson in order, and reports the course's address on your site. If you have the
`create-course` skill (the Product Skills chapter), the assistant will interview you
first and propose the structure before it builds anything; without it, it builds what
you asked for. Then Mira pastes her notes lesson by lesson — *"Lesson 1.1: here are my
notes, make them the lesson"* — and the assistant writes each one as a content block.

Underneath: `omumu_course_create` makes the course (title, tagline) and returns its
public address; `omumu_module_create` and `omumu_lesson_create` build the tree;
`omumu_lesson_resource_create` writes a block, in Markdown, into a lesson. A lesson's
description, a module's and the course's take Markdown too. `omumu_course_update` sets
the description, the gating mode and the watch threshold; `omumu_course_get`,
`omumu_module_list` and `omumu_lesson_resource_list` read the tree back.

In the admin: *Products → Courses → New Course* asks for a title, a description and an
image and lands you on the course overview — the modules, assignments and students
cards, the open-access and gating switches, the watch threshold. *Modules → New Module*
lands on the module list; a module's page lists its lessons; a lesson's page has *Edit*
(title, description, image), *Resources* (its content blocks: a title, the text, and an
optional file) and *Checklist*. *View lesson* opens the lesson as a student sees it.

Two things to know about what comes back. Reads return the content in the editor's own
JSON, not the Markdown you wrote, so an assistant asked to *edit* an existing block has
to work from that. And a module or lesson your assistant creates cannot be deleted or
reordered by it — those are admin-UI actions today. Build in the order you want to keep.

### Give students something to tick

Mira says: *"Add a checklist to lesson 1.1: log every invoice you sent this month, mark
the ones paid late, note how many reminders each took. Ten XP each."*

`omumu_checklist_batch_create` writes the whole list in one call (up to a hundred
items); `omumu_checklist_item_create`, `_update`, `_reorder` and `_delete` adjust it. In
the admin, a lesson's *Checklist* page adds items one line at a time and drags them into
order.

### Add a video

Mira records a screencast of the reminder spreadsheet and says: *"Here's the video for
lesson 2.1."*

A video never travels through the conversation. The assistant asks for an upload slot
with `omumu_resource_upload_video_presign`, the file goes straight to storage, and the
assistant attaches the resulting resource to a content block (`omumu_lesson_resource_create`
or `_update` with the resource's id). Any other file — a PDF, an audio recording, a
document — goes the same way with `omumu_resource_upload_presign`. `omumu_resource_list`
and `omumu_resource_get` find what is already uploaded, with each video's processing
status; `omumu_resource_update` renames or describes a file.

In the admin, the site's Resources page (it has no entry in the navigation yet; open
`/admin/resources`) takes drag-and-drop uploads and shows, per file, where it is used; a
content block's form uploads a file directly into the block. A video counts as watched at
the course's threshold, which feeds completion.

On a plan with transcription, attaching a video or audio file to a lesson queues a
transcript automatically; the transcript can be saved as a text resource of its own, and
it is part of what the AI rater reads when it judges hand-ins against that lesson.

### Give it a picture

Mira says: *"Make a cover image for the course: a tidy desk, one envelope, morning
light."*

`omumu_generate_image` makes an image from a prompt and, if you name a course, module or
lesson, attaches it at once (landscape by default — the shape course cards use);
`omumu_set_image` attaches an image resource that already exists. In the admin, the image
field on the course, module and lesson forms takes a dropped file or generates one from a
prompt in place. Image generation is a plan feature, and a higher plan uses a stronger
model.

### Unlock modules in order

Mira says: *"Make the course sequential, and count a video as watched at 90 %."*

`omumu_course_update` with the gating mode and the watch threshold; in the admin, the
switches on the course overview. Under sequential gating a student sees every module in
the navigation but can open only the ones they have reached, and completing a module —
all its lessons, each with its checklist, videos and assignment — opens the next.

### Copy what works

Mira's second course reuses the time-audit module from her first. *"Copy Week 1 from
Automate Your Week into the new course."*

`omumu_module_copy` moves a copy of a module, lessons and blocks included, into another
course; `omumu_course_duplicate` copies a whole course. In the admin, every course,
module and lesson has *Duplicate*, and modules and lessons have *Copy into…* for another
course or module. A duplicated course keeps the same title, gating mode and watch
threshold, so rename it.

### Ask for work back

Mira says: *"Add an assignment to lesson 3.2: hand in a screenshot of your first automatic
reminder. Rate it on whether the reminder names the invoice, the amount and the date."*

`omumu_assignment_create` attaches an assignment to exactly one of a course, module or
lesson, with its rating criteria, as a draft; `omumu_assignment_update` publishes it and
can move it to another scope in the same course; `omumu_assignment_list` shows them. In
the admin, *Products → Assignments* lists every assignment on the site, *All courses*
first and then one group per course, and the course overview's *Assignments* card opens it
filtered to that course. *New Assignment* asks where the assignment belongs first: *All
courses*, or a course with an optional module or lesson.

For one that belongs to all courses, leave the course out: *"Add an assignment for all
courses, Evening reflection: three lines on the day — what went well, what you learned,
what you take with you. Ask for a check-in light."* `omumu_assignment_create` with no
course, module or lesson creates it; `omumu_assignment_list` without a course lists the
All courses ones in order, each with its position, and `omumu_assignment_reorder` moves one
to another: *"Put Morning reflection first."* Only All courses assignments have an order to
change. One cannot be moved into a course, nor a course's assignment out to All courses —
that is a different assignment. In the admin, the *All courses* group shows them in the
order your students see them: a new one goes last, and dragging a row by its handle onto
another puts it in that row's place and shifts the ones between. The course groups keep
course order and offer no dragging. What a student sees, how the AI rates a hand-in and how you
reply is the Teaching & Feedback chapter.

### Build a scored quiz

Mira wants to know, before someone buys, how much of their invoicing is already
automated. *"Make a three-question quiz that sorts people into 'By hand', 'Half way' and
'Automated', and tag them with the result."*

Six calls build it: `omumu_quiz_create` (a label), `omumu_question_create`
per question (single- or multiple-choice), `omumu_answer_create` per answer,
`omumu_bucket_create` per result with what it should do (a tag, a sequence, a course, a
redirect, a message), and `omumu_option_point_batch` to give each answer its weight
towards each bucket. `omumu_quiz_get` returns the whole scoring matrix;
`omumu_quiz_update` links an opt-in form before or after the quiz and, on a site
connected to HighLevel, sets whether the quiz delivers its respondents there and which
HighLevel contact field receives each respondent's result link. In the admin,
*Sales and marketing → Quizzes* has the same editor and a results page per quiz, and the quiz's page
shows the public address to share. What a quiz does for your audience — the buckets'
sequences, tags and courses — is the Audience & Email chapter.

### Build a score quiz from a document

A self-test with a result page is bigger than six calls, so it is built from one
definition. Say a leadership coach has a test in his book: twelve statements rated
*Sjelden* to *Nesten alltid*, four per scale, three profiles by total, a next step chosen
by who the person is, and a few background questions. He hands the document to his
assistant: *"Build this as a score quiz on my site. Three scales with low, middle and
high texts at 0, 50 and 83 percent, the exercise for the scale with the most to gain,
the three profiles at 80, 50 and 0 percent, the call door for leaders who want company
soon, the webinar door for those with the book, the book offer for everyone else."*

One call, `omumu_quiz_build`, takes the whole definition — quiz, scales with levels,
questions with answers and points (and an *answer tag* on any answer that should mark
the person, a book owner say), buckets with minimum percents, doors, notes — checks
every reference and creates everything or nothing. The assistant uses its own keys for
scales, questions and answers inside the definition and gets the real ids back, so a note
that quotes a free-text answer (`[answer:<questionId>]`) is added right after with
`omumu_note_create`. Result copy may use placeholders: `[firstName]`, `[highestScale]`,
`[lowestScale]`, `[highestQuestion]` and `[scale:<scaleId>]`. Then the follow-up: a
post-quiz opt-in form linked with `postQuizOptinFormId`, which saves the email as soon as
it is valid and asks for whatever else the form declares, a mobile number say, a *completion tag* on the quiz, a *capture tag* for everyone who
leaves the email, finished or not, an email sequence per profile whose first
email carries `$quiz_result_link`, and, as an ordinary automation, *form submitted → wait
an hour → has the completion tag? no → start a reminder sequence*. The person who takes it
gets a first-name screen, one question per screen with a progress bar, the email form,
and the result page: greeting, profile, a meter and text per scale, the exercise, the
notes that apply and the one door. A door can also carry a checkout in place of its button: give it the embed link of an
offer from an allowed payment provider (EdPay for now), `checkoutEmbedUrl` on
`omumu_door_create`, `omumu_door_update` or a door in `omumu_quiz_build`, and the person
can buy right there on the result page. In the admin, the quiz's page shows the whole score
setup read-only, and the person's page under *Customers → Users* shows each result with
its profile, total, scales and the result link.

### Look at it as a student

*View lesson* on any lesson page, or the course's own address, opens the student side:
the course home with its modules and any hand-in forms, then the lessons with their
blocks, checklist and navigation. You can open any course you built in the admin. A
course your assistant built is a different matter: the agent's create does not give you
student access, so to walk it as a student, grant yourself access first (*Customers →
Users*, your own user, *Manage Course Access*).

### What you cannot do yet

Stated plainly: modules and lessons have no draft state, so there is no way to stage a
week before students see it; reads over the connection come back in the editor's JSON
rather than Markdown; your assistant can create modules and lessons but not delete or
reorder them; and unlocking is by completion only, never by date. A new site may also
list one or two of Omumu's own onboarding courses on its student side — they are
read-only copies for you, not for your students. A door embeds checkouts only from the
payment providers Omumu allows, EdPay for now; adding another is a change to Omumu, not a
setting.

## Reference

### `omumu_answer_create`

Creates an answer option for a question. On an outcome quiz, link this answer to one or more buckets using omumu_option_point_create after creating the answer. On a score quiz, set points so choosing this answer adds (or, for a reverse-worded statement, subtracts) that many points from its question's scale. tag, when set, is applied at completion to an identified respondent who chose this answer, alongside the bucket, door and completion tags — the way a single background answer ("do you have the book?") becomes a fact on the contact, usable by HAS_TAG.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `label` | string | yes | The answer label shown to users |
| `points` | number | no | Points this answer carries toward its question's scale (score quizzes only; default 0) |
| `questionId` | string | yes | The question ID |
| `tag` | string | no | Tag applied at completion to an identified respondent who chose this answer |
| `value` | string | no | The answer value (defaults to label) |

### `omumu_answer_update`

Updates an answer option's label, value, points (score quizzes only) and/or tag (applied at completion to an identified respondent who chose this answer)

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `answerId` | string | yes | The answer ID |
| `label` | string | no | New answer label |
| `points` | number | no | New points value (score quizzes only) |
| `tag` | string | no | Tag applied at completion to an identified respondent who chose this answer, or null to remove |
| `value` | string | no | New answer value |

### `omumu_assignment_create`

Creates an assignment attached to exactly one scope: a course, a module, a lesson, or the site itself. Provide at most one of courseId, moduleId, or lessonId — more than one is rejected. Omitting all three creates a SITE assignment, shown to creators as All courses: attached to the whole site and handed in on its own page /assignments/{aid}, where students write about everything they have rather than one course. Students find it first on their Assignments page (/assignments); creators find it in the All courses group of /admin/assignments. A new SITE assignment goes last in the All courses order; move it with omumu_assignment_reorder. It counts toward no course's completion and is rated against each student's own accessible courses. COURSE scope: the assignment appears on the course homepage and is visible across all its modules and lessons. MODULE scope: the assignment is shown within a specific module and reflects that module's work. LESSON scope: the assignment is tied to a single lesson and reflects its content. New assignments default to DRAFT status; pass status=PUBLISHED to make the assignment immediately visible to students. Requires the MCP_COURSES feature (Starter tier or above).

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `asksForLight` | boolean | no | Check-in: every hand-in must include the student's own Light — green, yellow or red. Defaults to false. |
| `courseId` | string | no | Attach the assignment to this course (COURSE scope). Must not be combined with moduleId or lessonId. |
| `description` | string | no | The assignment instructions or description (Markdown) |
| `lessonId` | string | no | Attach the assignment to this lesson (LESSON scope). The owning course is derived automatically. Must not be combined with courseId or moduleId. |
| `moduleId` | string | no | Attach the assignment to this module (MODULE scope). The owning course is derived automatically. Must not be combined with courseId or lessonId. |
| `notifyStaffOnHandIn` | boolean | no | Email every Headmaster and Staff member on the site when a student hands in. Defaults to true. |
| `ratingPrompt` | string | no | Prompt shown to instructors when rating a submission (optional) |
| `status` | string | no | Initial status: DRAFT (default, not visible to students) or PUBLISHED (visible) |
| `title` | string | yes | The assignment title |

### `omumu_assignment_list`

Returns all assignments (DRAFT and PUBLISHED) for a course, with each assignment's scope kind (COURSE, MODULE, LESSON, or SITE) and the scope's id stated explicitly. Without a courseId it returns the site's SITE assignments only — the All courses assignments, attached to the whole site rather than to any course, each handed in on its own page /assignments/{aid} — in the All courses order, with each one's 0-based sortOrder; order them with omumu_assignment_reorder. Course, module and lesson assignments report no sortOrder. Requires the MCP_COURSES feature (Starter tier or above).

- **Write category:** read-only
- **Access:** requires the `COURSE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `courseId` | string | no | The course whose assignments to list; omit to list the site's SITE assignments (All courses) |

### `omumu_assignment_reorder`

Moves a SITE assignment (an All courses assignment) to a 0-based position in the site's All courses order, the order students see first on /assignments and the admin sees in the All courses group of /admin/assignments. The other SITE assignments shift to make room; a position past the end places the assignment last. Draft ones hold their place in the order too. Only SITE assignments have an order: a course, module or lesson assignment is refused, as is an assignment of another site. Read the current order with omumu_assignment_list without a courseId. Returns the moved assignment with its new sortOrder. Requires the MCP_COURSES feature (Starter tier or above).

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `assignmentId` | string | yes | The SITE assignment to move |
| `newSortOrder` | integer | yes | The position to move it to, 0-based (0 is first) |

### `omumu_assignment_update`

Updates an existing assignment's title, description, ratingPrompt, status, and/or scope. Provide at most one of courseId, moduleId, or lessonId to set the new scope; omitting all three means the SITE scope, so omit them exactly when updating a SITE assignment. The new scope must belong to the same course as the assignment — a scope change across the course boundary (to or from the SITE scope) is rejected: that is a different assignment. A SITE assignment is an All courses assignment, handed in on its own page /assignments/{aid}; its position in the All courses order is changed with omumu_assignment_reorder, not here. Fields not provided are left unchanged. Requires the MCP_COURSES feature (Starter tier or above).

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `asksForLight` | boolean | no | Check-in: every hand-in must include the student's own Light — green, yellow or red. Omit to leave unchanged. |
| `assignmentId` | string | yes | The assignment ID to update |
| `courseId` | string | no | New COURSE scope. Must not be combined with moduleId or lessonId. |
| `description` | string | no | New assignment instructions (Markdown) |
| `lessonId` | string | no | New LESSON scope. Must not be combined with courseId or moduleId. |
| `moduleId` | string | no | New MODULE scope. Must not be combined with courseId or lessonId. |
| `notifyStaffOnHandIn` | boolean | no | Email every Headmaster and Staff member on the site when a student hands in. Omit to leave unchanged. |
| `ratingPrompt` | string | no | New rating prompt for instructors |
| `status` | string | no | New status: DRAFT (hidden from students) or PUBLISHED (visible) |
| `title` | string | no | New assignment title |

### `omumu_bucket_create`

Creates a result bucket for the quiz. On an outcome quiz it's a category users are sorted into by plurality — after creating buckets, link answers to them using omumu_option_point_create. On a score quiz it's a profile: set minPercent (0-100) and the bucket with the highest minPercent at or below the respondent's total percent wins; a bucket with no minPercent never wins. Each bucket can trigger actions: send email sequence, grant course access, redirect to URL. description may be Quill delta JSON when descriptionEncoding is QUILL_JSON. On a score quiz, description supports result-copy placeholders (see omumu_note_create for the full set). videoResourceId attaches one video, shown after the description on the result page — the resource must already exist on this site (via the presigned video upload) and be a video.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `description` | string | no | Bucket description |
| `descriptionEncoding` | string | no | How description is encoded: PLAIN_TEXT (default), QUILL_JSON, or MANAGED_HTML |
| `minPercent` | number | no | Score quizzes only: lower percent bound (0-100) of the quiz's total this bucket wins at or above |
| `name` | string | yes | The bucket name (e.g., 'Beginner', 'Advanced') |
| `quizId` | string | yes | The quiz ID |
| `videoResourceId` | string | no | Id of an existing video site resource on this site, shown after the description on the result page |

### `omumu_bucket_update`

Updates a bucket's properties including actions (email sequence, course, redirect, tag) and, for a score quiz, its percent-range profile fields (minPercent, descriptionEncoding). Pass null for an action to remove it, or leave the key out to keep it unchanged. emailSequenceId and courseId must be a sequence or course on this site. videoResourceId attaches one video (must belong to this site and be a video); pass null to remove it.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `bucketId` | string | yes | The bucket ID |
| `courseId` | string | no | Course on this site to grant access to; null removes the course |
| `description` | string | no | New description |
| `descriptionEncoding` | string | no | How description is encoded: PLAIN_TEXT, QUILL_JSON, or MANAGED_HTML |
| `emailSequenceId` | string | no | Email sequence on this site to subscribe user to; null removes the sequence |
| `minPercent` | number | no | Score quizzes only: lower percent bound (0-100) of the quiz's total this bucket wins at or above |
| `name` | string | no | New bucket name |
| `redirectUrl` | string | no | URL to redirect to after quiz; null removes the redirect |
| `successMessage` | string | no | Message shown after quiz completion |
| `tagName` | string | no | Tag to apply to user; null removes the tag |
| `videoResourceId` | string | no | Id of an existing video site resource on this site; null removes the current video |

### `omumu_checklist_batch_create`

Creates multiple checklist items for a lesson in one call (max 100). Atomic — all items are created or none. Useful for AI workflows that generate complete checklists at once.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `items` | array | yes | Array of objects with 'description' (required, max 1000 chars) and 'xp' (optional, 0-10000, default 0) |
| `lessonId` | string | yes | The lesson ID |

### `omumu_checklist_item_create`

Adds a new checklist item to a lesson. Checklist items are actionable tasks that students complete to earn XP. Items are auto-appended at the end of the list.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `description` | string | yes | The checklist item text, max 1000 chars (what the student should do) |
| `lessonId` | string | yes | The lesson ID to add the checklist item to |
| `xp` | integer | no | XP points awarded when completed, 0-10000 (default 0) |

### `omumu_checklist_item_delete`

Permanently deletes a checklist item and any associated user progress. Remaining items are re-sorted automatically.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `checklistItemId` | string | yes | The checklist item ID to delete |

### `omumu_checklist_item_list`

Lists all checklist items for a specific lesson, ordered by sort order.

- **Write category:** read-only
- **Access:** requires the `COURSE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `lessonId` | string | yes | The lesson ID |

### `omumu_checklist_item_reorder`

Changes the sort order of a checklist item within its lesson.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `checklistItemId` | string | yes | The checklist item ID |
| `newSortOrder` | integer | yes | The new sort order position (0-based) |

### `omumu_checklist_item_update`

Updates the description and/or XP value of an existing checklist item.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `checklistItemId` | string | yes | The checklist item ID |
| `description` | string | no | New description text, max 1000 chars (optional) |
| `xp` | integer | no | New XP value, 0-10000 (optional) |

### `omumu_course_create`

Creates a new course in the user's site with the specified title and tagline. The course is live immediately for learners with access — there is no draft step — and the result's publicUrl is the address of its learner-facing course page, which requires sign-in and access to the course. After creating, add modules (omumu_module_create) and lessons (omumu_lesson_create) to build the course structure. To grant access via an opt-in form, pass the course ID to omumu_optinform_update(courseId).

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tagline` | string | no | The course tagline |
| `title` | string | yes | The course title |

### `omumu_course_delete`

Permanently deletes a course and all its content

- **Write category:** standard write
- **Access:** requires the `COURSE_DELETE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `courseId` | string | yes | The course ID to delete |

### `omumu_course_duplicate`

Creates a complete copy of an existing course including all modules and lessons

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `courseId` | string | yes | The course ID to duplicate |

### `omumu_course_get`

Retrieves detailed information about a specific course

- **Write category:** read-only
- **Access:** requires the `COURSE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `courseId` | string | yes | The course ID |
| `includeModules` | boolean | no | Whether to include modules and lessons |

### `omumu_course_list`

Lists all courses in the user's site with optional module inclusion

- **Write category:** read-only
- **Access:** requires the `COURSE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `includeModules` | boolean | no | Whether to include modules in the response |

### `omumu_course_update`

Updates the basic information of a course. The change is live immediately for learners with access — there is no draft step — and the result's publicUrl is the address of its learner-facing course page, which requires sign-in and access to the course.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `courseId` | string | yes | The course ID |
| `description` | string | no | New course description |
| `gatingMode` | string | no | Course gating mode: OPEN (default — course access opens every module) or SEQUENTIAL (completing a module unlocks the next; the unlocking is built in) |
| `tagline` | string | no | New course tagline |
| `title` | string | no | New course title |
| `watchThresholdPercent` | integer | no | How much of a video counts as watched, in percent. One of 25, 50, 75, 90, 100 (default 75) |

### `omumu_door_create`

Creates a door on a quiz: the next step (heading, text, button label/URL or an embedded checkout, optional tag) offered on the result page, chosen from the respondent's answers rather than the score. Doors are tried in sortOrder and the first whose condition holds wins; a door with empty clauses always holds and is the default — put it last. A clause is {kind: "ANSWER_CHOSEN", questionId, answerId} (a specific answer was chosen) or {kind: "QUESTION_ANSWERED", questionId} (the question has any answer, non-blank for free text). Every clause in a door's condition must hold (AND only — no OR, no NOT); express "either of these answers" as two doors with the same copy. Every clause's question (and answer, for ANSWER_CHOSEN) must belong to this quiz. Works on both outcome and score quizzes. On a score quiz, heading and text support placeholders: Result-copy placeholders, substituted at render time in this text: [firstName] (the respondent's first name), [answer:<questionId>] (the chosen answer label(s), or the free text, for that question), [scale:<scaleId>] (that scale's percent, e.g. "72 %"), [highestScale] and [lowestScale] (scale names), [highestQuestion] (the header of the question with the highest-scoring answer). An unknown placeholder or one that resolves empty renders as nothing.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `buttonLabel` | string | no | The call-to-action button's label |
| `buttonUrl` | string | no | The button's URL: absolute http(s) or a site-relative path |
| `checkoutEmbedUrl` | string | no | An embedded checkout shown in place of the button: an https URL on https://app.edpay.no (the provider's embed link for the offer, e.g. https://app.edpay.no/offer/518/10998/book?embed=true); framed as a sandboxed iframe on the result page |
| `clauses` | array | no | Inline answer-condition clauses: [{kind: "ANSWER_CHOSEN"\|"QUESTION_ANSWERED", questionId, answerId?}]. Empty or omitted makes this the default door. |
| `heading` | string | no | Heading shown on the result page |
| `name` | string | yes | Internal name for this door (e.g. "Book a call") |
| `quizId` | string | yes | The quiz ID |
| `sortOrder` | number | no | Evaluation order, first match wins (defaults to last) |
| `tag` | string | no | Tag applied to the respondent when this door wins, so automations can start the right follow-up |
| `text` | string | no | Body copy shown under the heading |
| `textEncoding` | string | no | How text is encoded: PLAIN_TEXT (default), QUILL_JSON, or MANAGED_HTML |

### `omumu_door_delete`

Deletes a door and its clauses.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `doorId` | string | yes | The door ID to delete |

### `omumu_door_update`

Updates a door's copy, checkout embed, sort order, tag and/or clauses. A clauses array replaces this door's condition wholesale rather than appending to it — include every clause you want kept. Result-copy placeholders, substituted at render time in this text: [firstName] (the respondent's first name), [answer:<questionId>] (the chosen answer label(s), or the free text, for that question), [scale:<scaleId>] (that scale's percent, e.g. "72 %"), [highestScale] and [lowestScale] (scale names), [highestQuestion] (the header of the question with the highest-scoring answer). An unknown placeholder or one that resolves empty renders as nothing.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `buttonLabel` | string | no | New button label |
| `buttonUrl` | string | no | New button URL |
| `checkoutEmbedUrl` | string | no | An embedded checkout shown in place of the button: an https URL on https://app.edpay.no (the provider's embed link for the offer, e.g. https://app.edpay.no/offer/518/10998/book?embed=true); framed as a sandboxed iframe on the result page; null removes it and brings the button back |
| `clauses` | array | no | Replaces this door's clauses wholesale: [{kind: "ANSWER_CHOSEN"\|"QUESTION_ANSWERED", questionId, answerId?}] |
| `doorId` | string | yes | The door ID |
| `heading` | string | no | New heading |
| `name` | string | no | New internal name |
| `sortOrder` | number | no | New evaluation order |
| `tag` | string | no | New tag applied when this door wins |
| `text` | string | no | New body copy |
| `textEncoding` | string | no | How text is encoded: PLAIN_TEXT, QUILL_JSON, or MANAGED_HTML |

### `omumu_generate_image`

Generates an image from a text prompt using AI and stores it as a resource. Optionally attach the generated image directly to a course, module, or lesson. When targeting an entity, aspect ratio defaults to 16:9 (ideal for course illustrations).

- **Write category:** standard write
- **Access:** requires the `MEDIA_GENERATE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `aspectRatio` | string | no | Aspect ratio: 1:1, 16:9, 9:16, 4:3, 3:4. Default: 16:9 when targeting, 1:1 otherwise. |
| `highQuality` | boolean | no | Use high quality model (slower, requires Premium/Enterprise tier). Default: false |
| `prompt` | string | yes | Text description of the image to generate. Be descriptive for best results. |
| `targetId` | string | no | ID of the entity to attach the image to. Required if targetType is provided. |
| `targetType` | string | no | Entity type to attach image to: 'course', 'module', or 'lesson'. If provided, targetId is also required. |

### `omumu_lesson_create`

Creates a new lesson within a module. Returns a compact summary {id, title, sortOrder} only — the submitted description is not echoed back, to keep responses small when authoring long-form content.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `description` | string | no | The lesson description |
| `moduleId` | string | yes | The module ID |
| `title` | string | yes | The lesson title |

### `omumu_lesson_resource_create`

Creates a new content block within a lesson. Content can be Markdown or QuillDelta JSON (auto-detected). Optionally attaches an uploaded SiteResource (e.g. a video) via resourceId. Use this to add rich text content to lessons - the 'meat' of course content.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `content` | string | yes | The content in Markdown or QuillDelta JSON format. Markdown supports: # headers, **bold**, *italic*, [links](url), - bullets, 1. numbered lists, > blockquotes, `code` |
| `lessonId` | string | yes | The lesson ID to add content to |
| `resourceId` | string | no | Optional SiteResource ID (e.g. an uploaded video) to attach to this lesson part. Must belong to the same site as the lesson. |
| `title` | string | yes | Title of the content block |

### `omumu_lesson_resource_delete`

Permanently deletes a content block from a lesson.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `lessonResourceId` | string | yes | The lesson resource ID to delete |

### `omumu_lesson_resource_list`

Lists all content blocks for a specific lesson.

- **Write category:** read-only
- **Access:** requires the `COURSE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `lessonId` | string | yes | The lesson ID |

### `omumu_lesson_resource_update`

Updates an existing content block. Content can be Markdown or QuillDelta JSON (auto-detected). Optionally replaces the attached SiteResource. Pass an empty string for resourceId to clear the attachment.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `content` | string | no | New content in Markdown or QuillDelta JSON (optional) |
| `lessonResourceId` | string | yes | The lesson resource ID |
| `resourceId` | string | no | New SiteResource ID to attach (optional). Pass empty string to clear the current attachment. Must belong to the same site as the lesson. |
| `title` | string | no | New title (optional) |

### `omumu_lesson_update`

Updates a lesson's title and/or description. Description can be Markdown or QuillDelta JSON (auto-detected). Returns a compact summary {id, title, sortOrder} only — the submitted description is not echoed back, to keep responses small when authoring long-form content.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `description` | string | no | New lesson description (Markdown or QuillDelta JSON) |
| `lessonId` | string | yes | The lesson ID |
| `title` | string | no | New lesson title |

### `omumu_module_copy`

Copies a module (including all its lessons and resources) from its current course into a different target course. Both the source module's course and the target course must belong to the user's site.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `moduleId` | string | yes | The ID of the module to copy |
| `targetCourseId` | string | yes | The ID of the course to copy the module into |

### `omumu_module_create`

Creates a new module within a course

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `courseId` | string | yes | The course ID |
| `description` | string | no | The module description |
| `title` | string | yes | The module title |

### `omumu_module_list`

Lists all modules in a specific course with optional lesson inclusion

- **Write category:** read-only
- **Access:** requires the `COURSE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `courseId` | string | yes | The course ID |
| `includeLessons` | boolean | no | Whether to include lessons in each module |

### `omumu_module_update`

Updates a module's title and/or description. Description can be Markdown or QuillDelta JSON (auto-detected).

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `description` | string | no | New module description (Markdown or QuillDelta JSON) |
| `moduleId` | string | yes | The module ID |
| `title` | string | no | New module title |

### `omumu_note_create`

Creates a note on a quiz: answer-conditioned copy shown on the result page between the lowest-scale section and the door, whenever its condition holds. Unlike a door, every matching note is shown, in sortOrder (notes compose rather than compete) — there is no first-match-wins and no default note. A clause is {kind: "ANSWER_CHOSEN", questionId, answerId} (a specific answer was chosen) or {kind: "QUESTION_ANSWERED", questionId} (the question has any answer, non-blank for free text; use this to quote a free-text answer back with [answer:<questionId>]). Every clause in a note's condition must hold (AND only — no OR, no NOT). Empty or omitted clauses makes the note always show. Every clause's question (and answer, for ANSWER_CHOSEN) must belong to this quiz. A note has no button and no tag. Result-copy placeholders, substituted at render time in this text: [firstName] (the respondent's first name), [answer:<questionId>] (the chosen answer label(s), or the free text, for that question), [scale:<scaleId>] (that scale's percent, e.g. "72 %"), [highestScale] and [lowestScale] (scale names), [highestQuestion] (the header of the question with the highest-scoring answer). An unknown placeholder or one that resolves empty renders as nothing.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `clauses` | array | no | Inline answer-condition clauses: [{kind: "ANSWER_CHOSEN"\|"QUESTION_ANSWERED", questionId, answerId?}]. Empty or omitted makes this note always show. |
| `quizId` | string | yes | The quiz ID |
| `sortOrder` | number | no | Display order among notes (defaults to last) |
| `text` | string | yes | The note's body copy |
| `textEncoding` | string | no | How text is encoded: PLAIN_TEXT (default), QUILL_JSON, or MANAGED_HTML |

### `omumu_note_delete`

Deletes a note and its clauses.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `noteId` | string | yes | The note ID to delete |

### `omumu_note_update`

Updates a note's text, sort order and/or clauses. A clauses array replaces this note's condition wholesale rather than appending to it — include every clause you want kept. Result-copy placeholders, substituted at render time in this text: [firstName] (the respondent's first name), [answer:<questionId>] (the chosen answer label(s), or the free text, for that question), [scale:<scaleId>] (that scale's percent, e.g. "72 %"), [highestScale] and [lowestScale] (scale names), [highestQuestion] (the header of the question with the highest-scoring answer). An unknown placeholder or one that resolves empty renders as nothing.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `clauses` | array | no | Replaces this note's clauses wholesale: [{kind: "ANSWER_CHOSEN"\|"QUESTION_ANSWERED", questionId, answerId?}] |
| `noteId` | string | yes | The note ID |
| `sortOrder` | number | no | New display order among notes |
| `text` | string | no | New body copy |
| `textEncoding` | string | no | How text is encoded: PLAIN_TEXT, QUILL_JSON, or MANAGED_HTML |

### `omumu_option_point_batch`

Outcome quizzes only. Efficiently set up quiz scoring by creating or updating multiple option points in a single call. If an answer-bucket pair already exists, updates its weight. Use this after creating questions, answers, and buckets to configure the scoring matrix. Example: [{answerId: 'a1', bucketId: 'b1', weight: 2.0}, {answerId: 'a1', bucketId: 'b2', weight: 1.0}]

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `optionPoints` | array | yes | Array of option points, each with: answerId (required), bucketId (required), weight (optional, default 1.0) |

### `omumu_option_point_create`

Outcome quizzes only. Creates an option point linking an answer to a bucket with a weight. When a user selects this answer, the weight is added to the bucket's score. After all questions, the bucket with the highest total score becomes the user's result. Example: Answer 'I exercise daily' → Bucket 'Fitness Enthusiast' with weight 2.0. A score quiz does not use option points — give its answers points instead.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `answerId` | string | yes | The answer ID to link |
| `bucketId` | string | yes | The bucket ID to assign points to |
| `weight` | number | no | Point weight (default: 1.0). Higher weights have more influence on final bucket selection. |

### `omumu_option_point_delete`

Outcome quizzes only. Removes the link between an answer and a bucket, so selecting this answer no longer contributes to that bucket's score.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `optionPointId` | string | yes | The option point ID to delete |

### `omumu_option_point_list`

Outcome quizzes only. Lists all option points for a specific question, showing which answers are linked to which buckets and their weights.

- **Write category:** read-only
- **Access:** requires the `QUIZ_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `questionId` | string | yes | The question ID |

### `omumu_option_point_update`

Outcome quizzes only. Updates an option point's weight to adjust scoring influence.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `optionPointId` | string | yes | The option point ID |
| `weight` | number | no | New weight value |

### `omumu_question_create`

Creates a new question in a quiz. After creating a question, add answer options with omumu_answer_create. RADIO type shows single-choice radio buttons, CHECKBOX allows multiple selections. On a score quiz, assign the question to a scale with scaleId (created with omumu_scale_create) so its answers' points feed that scale; a question with no scaleId is an unscored background question.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `header` | string | yes | The question text |
| `quizId` | string | yes | The quiz ID |
| `scaleId` | string | no | Scale this question feeds (score quizzes only); omit for an unscored question |
| `type` | string | no | Question type: RADIO, CHECKBOX, TEXTAREA, RADIO_OTHER, CHECKBOX_OTHER |

### `omumu_question_update`

Updates a question's header, type and/or scale assignment (score quizzes only). The scale must belong to the same quiz.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `header` | string | no | New question text |
| `questionId` | string | yes | The question ID |
| `scaleId` | string | no | Scale this question feeds, or null to make it unscored (score quizzes only) |
| `type` | string | no | New question type |

### `omumu_quiz_build`

Creates a whole quiz — fields, scales, questions with answers, result buckets, doors, notes and (outcome quizzes) option points — from a single definition object, all or nothing: every cross-reference is validated before anything is written, and a bad reference fails the call naming every problem found, leaving no quiz, scale, question, answer, bucket, door, note or option point behind. Use this instead of the granular tools (omumu_quiz_create, omumu_scale_create, omumu_question_create, omumu_answer_create, omumu_bucket_create, omumu_door_create, omumu_note_create, omumu_option_point_create) when authoring a quiz from scratch; those granular tools remain the way to edit an existing quiz afterwards — this tool only creates. definition.quiz mirrors omumu_quiz_create's fields: {label (required), scoring: OUTCOME|SCORE, completionTag?, captureTag?, askFirstName?, noClearLowestText?, noClearLowestTextEncoding?, preQuizOptinFormId?, postQuizOptinFormId?, destinations? (e.g. ["HIGHLEVEL"]), highLevelResultLinkField?}. destinations lists where, besides Omumu, the quiz delivers each identified respondent once their result is saved; the only destination is HIGHLEVEL, which upserts the respondent as a contact (first name, email, phone) in the site's HighLevel sub-account with the tags this quiz applied to them. Adding HIGHLEVEL is refused unless the site's plan includes CRM_DESTINATIONS and a Headmaster has connected HighLevel (omumu_site_context reports highLevelConnected); no tool reads or writes the connection itself. highLevelResultLinkField names a custom contact field in that sub-account (its field key, e.g. contact.quiz_result_link; the contact. prefix is dropped) that receives the respondent's result link at completion, written before the tags so a workflow fired by the completion tag can use it; it needs the HIGHLEVEL destination, and null removes it. definition.scales (SCORE quizzes only) is [{key (required, your own id — any string unique among scales), name, sortOrder?, lowestScaleText?, lowestScaleTextEncoding?, levels?: [{name, minPercent (0-100), text?, textEncoding?, sortOrder?}]}]. definition.questions is [{key (required, unique among questions), header, type: RADIO|CHECKBOX|TEXTAREA|RADIO_OTHER|CHECKBOX_OTHER, sortOrder?, scaleKey? (must name a scale in this same definition), answers: [{key (required, unique among every answer in this definition), label, value?, points? (SCORE quizzes), sortOrder?, tag? (applied at completion to an identified respondent who chose this answer)}]}]. definition.buckets is [{key (required, unique among buckets), name, description?, descriptionEncoding?, minPercent? (SCORE quizzes, 0-100), tag?, redirectUrl?, successMessage?, emailSequenceId?, courseId?, videoResourceId?}] — emailSequenceId, courseId and videoResourceId must already exist on this site. definition.doors is [{name, heading?, text?, textEncoding?, buttonLabel?, buttonUrl?, checkoutEmbedUrl?, tag?, sortOrder?, clauses?: [{kind: ANSWER_CHOSEN|QUESTION_ANSWERED, questionKey, answerKey?}]}] — doors have no key, nothing references one; tried in sortOrder, first matching condition wins, empty clauses is the default door. definition.notes is [{text, textEncoding?, sortOrder?, clauses?: [...]}] — same clause shape as doors, but every matching note is shown, not just the first. A clause's questionKey/answerKey name a question/answer in this same definition, never a real id; an ANSWER_CHOSEN clause's answerKey must belong to its questionKey's question. All clauses in a condition must hold (AND only). definition.optionPoints (OUTCOME quizzes only) is [{answerKey, bucketKey, weight?}], both keys naming entries in this same definition. scales is only valid on a SCORE quiz; optionPoints is only valid on an OUTCOME quiz. The response returns quizId, publicUrl (the quiz's result/take link), and the real ids created for every key you chose: scaleIds, questionIds, answerIds, bucketIds (each a {yourKey: realId} map), plus doorIds and noteIds (plain lists, since doors and notes have no keys). omumu_quiz_get is this tool's natural counterpart: fetch an existing quiz with includeQuestions, includeScales, includeBuckets, includeDoors and includeNotes all true, and its output — with ids used in place of keys — is already shaped like a definition you could feed back into this tool (minus doors'/notes' clauses, which name questions/answers by id there and must be rekeyed). Result-copy placeholders, substituted at render time in this text: [firstName] (the respondent's first name), [answer:<questionId>] (the chosen answer label(s), or the free text, for that question), [scale:<scaleId>] (that scale's percent, e.g. "72 %"), [highestScale] and [lowestScale] (scale names), [highestQuestion] (the header of the question with the highest-scoring answer). An unknown placeholder or one that resolves empty renders as nothing.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `definition` | object | yes | The whole quiz: {quiz, scales?, questions?, buckets?, doors?, notes?, optionPoints?}. See the tool description for the full shape of each. |

### `omumu_quiz_create`

Creates a new quiz (question set). The scoring mode decides how it's judged: OUTCOME (default) sorts the respondent into one of several named buckets by plurality; SCORE accumulates points per named scale (see omumu_scale_create) and reports a percent per scale plus a total. Quizzes can optionally link to opt-in forms for email capture: preQuizOptinFormId shows an email capture form before the quiz starts (for non-logged-in users), postQuizOptinFormId shows one after quiz completion — that post-quiz form also submits itself as soon as the email field validates, before the respondent presses the final button (early contact capture), so the contact exists even if they never finish. After creating an outcome quiz, add questions with omumu_question_create, then add answer options with omumu_answer_create, create result buckets with omumu_bucket_create, and finally link answers to buckets using omumu_option_point_create. After creating a score quiz, create its scales with omumu_scale_create, then questions assigned to a scale, then answers carrying points. On a score quiz, noClearLowestText is shown on the result page when the respondent's scales are tied or there are fewer than two scales (no clear lowest); leave unset for no such section. noClearLowestText supports result-copy placeholders (see omumu_note_create for the full set). When askFirstName is true, an anonymous taker sees a first-name field on the start screen before the first question; the name is stored on the lead, copied to the user record on identification (never overwriting an existing name), and used for the [firstName] placeholder and the result page's greeting. completionTag, when set, is applied to an identified respondent when their result is saved, regardless of which bucket won — so an automation can tell a finisher apart from someone who only left an email (e.g. FORM_SUBMIT on the post-quiz form, then WAIT, then HAS_TAG on this tag to find abandoners). captureTag, when set, is applied to the respondent at early contact capture — the moment the post-quiz form's email is valid, before the final button — and is never removed at completion, so a CRM workflow or automation has a tag to fire on for someone who left their email but may not finish. A respondent who never reaches the form never gets it. Each answer can carry its own tag too (see omumu_answer_create).

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `askFirstName` | boolean | no | Ask an anonymous taker for their first name on the start screen before the first question (default false) |
| `captureTag` | string | no | Tag applied to the respondent at early contact capture, the moment the post-quiz form's email is valid; never removed at completion |
| `completionTag` | string | no | Tag applied to an identified respondent when their result is saved, regardless of which bucket won |
| `label` | string | yes | The quiz name/label |
| `noClearLowestText` | string | no | Score quizzes only: text shown when there is no clear lowest scale (tie or all-equal) |
| `noClearLowestTextEncoding` | string | no | How noClearLowestText is encoded: PLAIN_TEXT (default), QUILL_JSON, or MANAGED_HTML |
| `scoring` | string | no | Scoring mode: OUTCOME (default) or SCORE |

### `omumu_quiz_get`

Gets a quiz with optional questions, result buckets and scales. Always returns the scoring mode, askFirstName, completionTag, captureTag, destinations, highLevelResultLinkField (when set) and, for a score quiz, noClearLowestText/noClearLowestTextEncoding. Returns preQuizOptinFormId and postQuizOptinFormId if linked opt-in forms are configured for email capture. For an outcome quiz, set includeQuestions=true, includeBuckets=true, and includeOptionPoints=true to see the complete scoring configuration — option points link answers to buckets with weights, and the bucket with the highest total weight from selected answers wins. With includeQuestions=true each answer also returns its tag, if any. For a score quiz, set includeQuestions=true and includeScales=true — each question returns its scaleId and each answer its points; each scale also returns its levels, lowestScaleText and lowestScaleTextEncoding; includeBuckets=true also returns each bucket's minPercent, descriptionEncoding and videoResourceId (its profile configuration). Result-copy placeholders, substituted at render time in this text: [firstName] (the respondent's first name), [answer:<questionId>] (the chosen answer label(s), or the free text, for that question), [scale:<scaleId>] (that scale's percent, e.g. "72 %"), [highestScale] and [lowestScale] (scale names), [highestQuestion] (the header of the question with the highest-scoring answer). An unknown placeholder or one that resolves empty renders as nothing.

- **Write category:** read-only
- **Access:** requires the `QUIZ_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `includeBuckets` | boolean | no | Include result buckets |
| `includeDoors` | boolean | no | Include doors, each with its answer-condition clauses |
| `includeNotes` | boolean | no | Include notes, each with its answer-condition clauses (score quizzes only) |
| `includeOptionPoints` | boolean | no | Include option points (answer-to-bucket scoring weights, outcome quizzes only). Requires questions to be fetched. |
| `includeQuestions` | boolean | no | Include questions and answers |
| `includeScales` | boolean | no | Include scales, each with its levels and lowest-scale text (score quizzes only) |
| `quizId` | string | yes | The quiz ID |

### `omumu_quiz_list`

Lists all quizzes for the current site

- **Write category:** read-only
- **Access:** requires the `QUIZ_READ` permission

No parameters.

### `omumu_quiz_update`

Updates a quiz's properties including label, scoring mode, linked opt-in forms for email capture, (score quizzes only) the no-clear-lowest text, the ask-first-name flag, the completion tag, the capture tag and the destinations. Pre-quiz opt-in forms appear before the quiz starts for non-logged-in users. Post-quiz opt-in forms appear after completion. Set to null to remove the link. destinations lists where, besides Omumu, the quiz delivers each identified respondent once their result is saved; the only destination is HIGHLEVEL, which upserts the respondent as a contact (first name, email, phone) in the site's HighLevel sub-account with the tags this quiz applied to them. Adding HIGHLEVEL is refused unless the site's plan includes CRM_DESTINATIONS and a Headmaster has connected HighLevel (omumu_site_context reports highLevelConnected); no tool reads or writes the connection itself. highLevelResultLinkField names a custom contact field in that sub-account (its field key, e.g. contact.quiz_result_link; the contact. prefix is dropped) that receives the respondent's result link at completion, written before the tags so a workflow fired by the completion tag can use it; it needs the HIGHLEVEL destination, and null removes it.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `askFirstName` | boolean | no | Ask an anonymous taker for their first name on the start screen before the first question |
| `captureTag` | string | no | Tag applied to the respondent at early contact capture, the moment the post-quiz form's email is valid, or null to remove |
| `completionTag` | string | no | Tag applied to an identified respondent when their result is saved, regardless of which bucket won, or null to remove |
| `destinations` | array | no | Where, besides Omumu, the quiz delivers each identified respondent: ["HIGHLEVEL"] or [] to stop. The quiz ends up with exactly these |
| `highLevelResultLinkField` | string | no | HighLevel custom contact field key (e.g. contact.quiz_result_link) that receives each respondent's result link at completion; needs the HIGHLEVEL destination; null to remove |
| `label` | string | no | New label |
| `noClearLowestText` | string | no | Score quizzes only: text shown when there is no clear lowest scale, or null to remove |
| `noClearLowestTextEncoding` | string | no | How noClearLowestText is encoded: PLAIN_TEXT, QUILL_JSON, or MANAGED_HTML |
| `postQuizOptinFormId` | string | no | ID of opt-in form to show after quiz completion (for non-logged-in users), or null to remove |
| `preQuizOptinFormId` | string | no | ID of opt-in form to show before quiz (for non-logged-in users), or null to remove |
| `quizId` | string | yes | The quiz ID |
| `scoring` | string | no | Scoring mode: OUTCOME or SCORE |

### `omumu_resource_delete`

Permanently deletes a SiteResource. Fails if the resource is currently referenced by any lesson, page, or other entity — remove those references first.

- **Write category:** standard write
- **Access:** requires the `RESOURCE_DELETE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `resourceId` | string | yes | The resource ID to delete |

### `omumu_resource_get`

Returns the full metadata for a single SiteResource, including CDN URI, thumbnail, MIME type, file size, and video processing status (when applicable).

- **Write category:** read-only
- **Access:** requires the `RESOURCE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `resourceId` | string | yes | The resource ID |

### `omumu_resource_list`

Lists uploaded files (videos, images, PDFs, etc.) on the current site. Optionally filter by a MIME type prefix (e.g. 'video/' or 'image/png') and paginate with limit/offset. Returns total count so callers can implement 'load more' paging.

- **Write category:** read-only
- **Access:** requires the `RESOURCE_READ` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | no | Maximum resources to return (default: 25, max: 100) |
| `mimeTypePrefix` | string | no | Optional prefix match against the resource's MIME type, e.g. 'video/' to return all videos or 'image/png' to return only PNG images. Omit to list all types. |
| `offset` | number | no | Number of resources to skip for pagination (default: 0) |

### `omumu_resource_update`

Updates the title and/or description of a SiteResource. Does not change the underlying file — re-upload for that. At least one of title/description must be provided.

- **Write category:** standard write
- **Access:** requires the `RESOURCE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `description` | string | no | New description (optional) |
| `resourceId` | string | yes | The resource ID |
| `title` | string | no | New title (optional) |

### `omumu_resource_upload_presign`

Prepares the upload of any file type the site accepts (PDF, image, audio, text, office document, archive, video) without the bytes passing through the MCP channel. Check 'uploadProtocol' in the result. 'put': send exactly 'length' bytes of the file as the body of an HTTP PUT to 'uploadUrl' (no Authorization header; the URL is a single-use ticket that expires at 'expiresAt'). The response is 201 with the new resource (id, fileName, fileSize, uri); use its id with omumu_lesson_resource_create or omumu_set_image. A failed PUT needs a new presign. 'tus': a video; follow omumu_resource_upload_video_presign's instructions with the same fields (resourceId is usable right away). Uploads count against the site's per-file and total storage limits.

- **Write category:** standard write
- **Access:** requires the `RESOURCE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `filename` | string | yes | Original file name including extension, e.g. 'worksheet.pdf'. Becomes the resource's file name. |
| `filetype` | string | yes | MIME type of the file, e.g. application/pdf, image/png, audio/mpeg, application/zip, video/mp4 |
| `length` | number | yes | Exact file size in bytes; the upload is rejected if the body differs |

### `omumu_resource_upload_video_presign`

Creates a SiteResource for a video (videoProcessingStatus QUEUED) and returns a presigned TUS (tus.io) upload the caller PATCHes bytes to directly — the video never passes through the MCP server or the JSON-RPC channel. Use the returned resourceId right away with omumu_lesson_resource_create or omumu_set_image; poll omumu_resource_get for videoProcessingStatus once the upload finishes and Bunny's webhook reconciles it. To perform the upload: POST to the returned 'endpoint' with headers AuthorizationSignature, AuthorizationExpire, VideoId (the 'guid' field), LibraryId, Upload-Length (the file size), and Tus-Resumable: 1.0.0 — Bunny responds with a Location header, which is the URL to PATCH the file bytes to (Content-Type: application/offset+octet-stream, Upload-Offset: 0, Tus-Resumable: 1.0.0).

- **Write category:** standard write
- **Access:** requires the `RESOURCE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `filename` | string | yes | Original file name of the video, e.g. 'lesson-1.mp4' |
| `filetype` | string | yes | MIME type of the video: video/mp4, video/webm, video/ogg, video/quicktime, or video/x-matroska |
| `length` | number | yes | Total file size in bytes |

### `omumu_scale_create`

Creates a named scale on a score quiz (e.g. "Listening"). Assign questions to it with omumu_question_create/update's scaleId; the scale's maximum is derived from its questions' answer points, never set here. Optionally carries its levels inline and a lowest-scale text. Each level is a percent range with copy only (no tags, sequences or grants): the level with the highest minPercent at or below the respondent's percent on this scale is shown on its result card. lowestScaleText is shown once on the result page when this scale is the respondent's lowest by percent. Level text and lowestScaleText support result-copy placeholders (see omumu_note_create for the full set).

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `levels` | array | no | Inline levels: [{name, minPercent (0-100), text?, textEncoding?, sortOrder?}] |
| `lowestScaleText` | string | no | Text shown when this scale is the respondent's lowest |
| `lowestScaleTextEncoding` | string | no | How lowestScaleText is encoded: PLAIN_TEXT (default), QUILL_JSON, or MANAGED_HTML |
| `name` | string | yes | The scale's name |
| `quizId` | string | yes | The quiz ID |
| `sortOrder` | number | no | Display order (defaults to last) |

### `omumu_scale_delete`

Deletes a scale. Questions assigned to it become unscored background questions rather than being deleted.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `scaleId` | string | yes | The scale ID to delete |

### `omumu_scale_update`

Updates a scale's name, sort order, levels and/or lowest-scale text. A levels array replaces the scale's levels wholesale rather than appending to them — include every level you want kept.

- **Write category:** standard write
- **Access:** requires the `QUIZ_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `levels` | array | no | Replaces this scale's levels wholesale: [{name, minPercent (0-100), text?, textEncoding?, sortOrder?}] |
| `lowestScaleText` | string | no | New lowest-scale text, or null to remove |
| `lowestScaleTextEncoding` | string | no | How lowestScaleText is encoded: PLAIN_TEXT, QUILL_JSON, or MANAGED_HTML |
| `name` | string | no | New name |
| `scaleId` | string | yes | The scale ID |
| `sortOrder` | number | no | New display order |

### `omumu_set_image`

Attach an existing image resource to a course, module, or lesson. Use this to reuse an already generated image or to change an entity's image.

- **Write category:** standard write
- **Access:** requires the `COURSE_WRITE` permission

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `resourceId` | string | yes | ID of the image resource to attach |
| `targetId` | string | yes | ID of the entity to set the image on |
| `targetType` | string | yes | Entity type: 'course', 'module', or 'lesson' |
