v1.0
Quick Start
Get up and running with QuizAPI in under 5 minutes. Create quizzes, manage questions, and embed interactive content through our REST API.
Base URL
https://quizapi.io/api/v11
Get your API key
First, you will need an API key to authenticate your requests. Generate one from your dashboard.
2
Make your first request
Use the following curl command to fetch a list of quizzes. Replace YOUR_API_KEY with the key from the previous step.
bash
curl -X GET "https://quizapi.io/api/v1/quizzes?limit=5" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"3
Parse the response
The API returns JSON responses with a consistent structure. Every list endpoint returns a data array and a meta object for pagination.
json
{
"success": true,
"data": [
{
"id": "quiz_abc123",
"title": "JavaScript Fundamentals",
"description": "Test your knowledge of JS basics",
"category": "programming",
"difficulty": "MEDIUM",
"tags": ["javascript", "web"],
"questionCount": 10,
"plays": 1250
}
],
"meta": {
"total": 42,
"limit": 5,
"offset": 0
}
}Using the SDK
Prefer a more structured approach? Use our official JavaScript SDK for type-safe API calls with built-in error handling.
javascript
import { QuizAPI } from "@quizapi/sdk";
const client = new QuizAPI({
apiKey: process.env.QUIZAPI_KEY,
});
// List all quizzes
const quizzes = await client.quizzes.list({
category: "programming",
limit: 10,
});
console.log(quizzes.data);