Skip to main content

Create Quiz Request Api

Create a new quiz with specified settings and access controls.

Field Details POST/api/v1/quizzes
Authentication Required

This endpoint currently requires JWT Authentication.

Authorization: Bearer <token>

Note: Support for Owner API Key (Hybrid Auth) is planned for future updates.

title (required)

The quiz title/name. Must be at least 1 character long.

Example: "Introduction to Rust Programming"

description (optional)

A detailed description of the quiz content and purpose.

Example: "Test your knowledge of Rust fundamentals including ownership, borrowing, and lifetimes."

categories (optional)

Quiz category string. If omitted, defaults to "general".

Constraints: 1-255 characters, cannot be null.

tags (optional)

Tags for the quiz.

Type: array of strings

Constraints: maximum 50 items, cannot be null.

metadata (optional)

Free-form metadata for the quiz.

Type: flat JSON object

Constraints: maximum 50 keys; values must be either a string or an array of strings; no nested objects; no null values.

available_from (conditional)

Start date/time when the quiz becomes available. Required when availability is scheduled.

Format: ISO 8601 datetime (e.g., "2025-11-14T10:00:00Z")

available_until (conditional)

End date/time when the quiz becomes unavailable. Required when availability is scheduled.

Format: ISO 8601 datetime (e.g., "2025-11-14T18:00:00Z")

Validation: Must be after available_from

time_limit_seconds (required)

Time limit for completing the quiz in seconds. Set to 0 for no time limit.

Examples:

  • 3600 = 1 hour
  • 1800 = 30 minutes
  • 0 = No time limit

status (required)

Publication status of the quiz. See QuizStatus enum for details.

Values: draft, published, archived

Default: draft

access_type (required)

Access control type. See QuizAccessType enum for details.

Values: shared, private, public

Note: When set to shared, an access code is automatically generated.

availability (required)

Time-based availability setting. See QuizAvailability enum for details.

Values: always, scheduled

Note: When set to scheduled, both available_from and available_until are required.

shuffle_questions (required)

Whether to randomize question order for each attempt.

Values: true or false

Use Cases:

  • true: Reduces cheating in exams
  • false: Maintains logical question flow

max_attempts (required)

Maximum number of attempts allowed per participant. Must be at least 1.

Examples:

  • 1 = Single attempt only
  • 3 = Up to 3 attempts
  • 999 = Effectively unlimited