Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Quizzes API

HTTP reference for authoring, assigning, grading, full retakes, and selective coaching on native forms and quizzes.

Quizzes are native forms assigned to AI trainers as Project To-dos. Authoring produces immutable published versions; assignments pin exactly one version; results, grading, release, and retakes all live on this surface.

Base path: /api/public/v1/project-todos/quizzes
MethodPathPurpose
GET/quizzes/forms?jobId=…List the organization’s forms available to a job.
GET/quizzes/forms/{formId}Read one form: draft, settings, and published versions.
GET/quizzes/results?jobId=…&formId=…Attempt results across a form’s published versions.
GET/quizzes/attempts/{attemptId}One attempt with every answer.
GET/quizzes/roster?jobId=…&formId=…Per-person assignment and attempt status.
GET/quizzes/export-csv?jobId=…&formId=…All attempts as spreadsheet-safe CSV.
GET/quizzes/export?jobId=…&formId=…&format=jsonlResults as JSON or JSONL with a redaction manifest.
GET/quizzes/grading-packet?attemptId=…Per-question grading packet: response, point range, rubric, provenance.
GET/quizzes/authoring/capabilitiesStatic authoring contract: question types, limits, grading, enums.
GET/quizzes/grounding?jobId=…Released Instructions pages and checksums to pin into a grounded quiz.
GET/quizzes/code?formId=…Export a draft or version as a portable quiz-as-code document.
GET/quizzes/diff?formId=…Structural diff between the draft and a version, or two versions.
GET/quizzes/templatesList organization quiz templates.
POST/quizzes/manageDiscriminated action union for authoring, assigning, grading, release, and retakes.
GET/POST/quizzes/preview/*Render one pinned draft or version through the real worker form runner without creating learner state.
GET/quizzes/coaching-queue?jobId=…Keyset-paged employer queue for submitted assignments.
GET/quizzes/coaching/{assignmentId}Bounded selective-coaching state for one assignment.
GET/quizzes/coaching/capabilitiesStatic coaching contract discovery, available before feature enablement.
GET/quizzes/coaching/exportBounded masked JSON, JSONL, or formula-neutral CSV export.

Each quiz To-do change (assigned, reminder due, submitted, grading required, graded, released, passed or failed, completed) also produces a typed event for webhooks and GET /updates.

ActionPurpose
form_createCreate a draft form or quiz.
form_update_draftUpdate the draft (optimistic expectedRevision lock).
form_publishPublish an immutable numbered version.
form_duplicate / form_archive / form_restoreCopy into a fresh draft / retire from new attempts / bring an archived form back.
form_validateNo-write check of a draft or candidate: schema, publication rules, and Instructions grounding.
form_importCreate a form or replace a draft from a quiz-as-code document.
template_create_from_form / template_instantiateCopy a form into an organization template / start a new job form from one.
quiz_rollout_plan / quiz_rollout_confirmNo-write rollout plan with a signed token, then publish and assign in one idempotent step.
quiz_todo_preflightNo-write preview of a quiz assignment, including the receipt broad audiences require.
quiz_todo_createCreate and assign the quiz to-do atomically.
gradeAward points for manually graded questions, with optional grade provenance.
release / bulk_releaseMake held results visible to the AI trainer(s).
require_retakeReturn a submission and grant exactly one extra attempt.
require_retake_planNo-write validation of a retake batch, emitting ordered per-row commands.
require_retake_applyApply exactly the checksum-bound planned retake rows.
coaching_comment / coaching_redo_selectionDraft feedback and the exact question selection.
coaching_thread_resolve / coaching_thread_reopenManage feedback-thread state.
coaching_acceptAccept the reviewed submission with a stale-submission guard.
coaching_send_back_plan / coaching_send_back_confirmReview a no-write selective-return plan, then apply only its signed selection.

Employer reads require project_todos:read; employer manage actions require project_todos:write and a claimed account, plus access to the job or form. There is no worker API lane: freelancer API keys are read-only and cannot call these endpoints. Mutating actions require idempotencyKey (8–128 characters of letters, digits, ., _, :, or -).

Expected answers are grading material. Employer-authorized reads of an attempt may include a sanitized expected-answer projection; AI-trainer-facing surfaces never receive answer keys, and no quiz response has a worker email field (the CSV export’s worker_email column is always blank). Free text is returned as written: typed answers, review notes and grading notes keep any email address a person wrote. The JSON and JSONL results export and the CSV export are stricter: they replace email addresses inside the text they carry.

To publish and assign in one reviewed step, see Roll out a quiz. To write questions from the job’s Instructions, see Ground a quiz in Instructions. To keep quizzes in a repository and reuse them across jobs, see Quiz-as-code, diff, and templates. For the grading packet, grade provenance, AI-assisted grading, and JSON/JSONL export, see Results, grading, and release.

For selective review cycles, threaded feedback, worker resubmission, exports, and feedback images, see Selective coaching.

For agent-readable desktop/mobile PNGs, ARIA, diagnostics, provenance, and short-lived employer review links, see Hosted quiz visual proof.