Skip to main content
>_REST API v1

Developer API

Build on top of JTest. Create quizzes, manage game sessions, and retrieve results programmatically.

Authentication

Bearer token authentication via Supabase. Pass your access token in the Authorization header.

Rate Limits

Free: 60 requests/minute. Pro: 300 requests/minute. Enterprise: Custom limits.

JSON Responses

All endpoints return JSON. Errors follow a consistent { error, message, statusCode } format.

Webhooks

Get notified when games start, end, or when quiz results are ready. Configure webhooks in your dashboard.

Quick Example

create-quiz.js
// Create a quiz via the API
const response = await fetch('https://jtest.uz/api/quizzes', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'JavaScript Basics',
    description: 'Test your JS knowledge',
    category: 'programming',
    questions: [
      {
        type: 'multiple_choice',
        text: 'What does === check?',
        options: [
          { text: 'Value only', isCorrect: false },
          { text: 'Value and type', isCorrect: true },
          { text: 'Type only', isCorrect: false },
        ],
        timeLimit: 30,
      },
    ],
  }),
});

const quiz = await response.json();
console.log('Created quiz:', quiz.id);

API Endpoints

GET/api/quizzesList all quizzes for the authenticated user
POST/api/quizzesCreate a new quiz
GET/api/quizzes/:idGet quiz details by ID
PATCH/api/quizzes/:idUpdate an existing quiz
DELETE/api/quizzes/:idDelete a quiz
POST/api/gamesCreate a new game session from a quiz
GET/api/games/:idGet game session details and status
GET/api/games/:id/resultsGet game results and player scores

Ready to integrate?

Sign up for free to get your API key and start building.