latestOpenAPI 3.1.02026-08-1182263351.1 KB

f8025de20169

Quizzes

Create quizzes

Create up to BATCH_MAX_ITEMS quizzes in a single request.

The data array must contain at least one item and at most BATCH_MAX_ITEMS items. Each item is processed independently — a failure on one row does not abort the rest. Response is 200 if all items succeed, 207 if any fail, 400 if the request envelope is empty or over the cap.

Per-item isolation applies only after the envelope is parsed. Any schema-level validation error (422) — a malformed field or a cross-field invariant violation (check_quiz_cross_field_rules) on any single item — is raised by Pydantic before this function runs and rejects the whole request. Only failures surfaced by the service inside the loop are isolated per item.

Unlike lessons, Quiz has no parent FK, so there is no not_found per-item path on create — a schema-valid item always persists unless an unexpected error occurs.

See api_v2/docs/batch-responses.md for the 200/207/400 status convention and per-item error code vocabulary.

Required OAuth scope: quizzes:write

post/v2/quizzes/

Request body

Response

OK