Complete REST API documentation for building integrations and automations with Squiz.
All API requests require an API token. Include it in the Authorization header:
All endpoints are prefixed with this base URL.
/api/auth/signinSign in with email and password
/api/auth/signupCreate a new account
/api/auth/signoutSign out current session
/api/quizList all quizzes for current user
/api/quizCreate a new quiz
/api/quiz/:idGet quiz details by ID
/api/quiz/:idUpdate quiz properties
/api/quiz/:idDelete a quiz
/api/quiz/:id/publishPublish a quiz
/api/quiz/:quizId/questionAdd a question to a quiz
/api/question/:idUpdate a question
/api/question/:idDelete a question
/api/question/:id/reorderReorder questions in a quiz
/api/quiz/:quizId/respondSubmit a quiz response
/api/quiz/:id/responsesGet all responses for a quiz
/api/quiz/:id/analyticsGet analytics for a quiz
/api/quiz/:id/statsGet high-level stats
/api/upload-imageUpload an image file (multipart form)
/api/upload/:fileIdDelete an uploaded file
// Example: Fetch quiz analytics
const response = await fetch('/api/quiz/abc123/analytics', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
}
});
const data = await response.json();
console.log(data.dailyResponses); // Array of daily response counts
console.log(data.devices); // Device breakdown
console.log(data.countries); // Geographic dataRequest succeeded
Resource created successfully
Invalid request parameters
Missing or invalid API token
Access denied to resource
Resource does not exist
Too many requests
Internal server error
100 requests/hour
1,000 requests/hour
Unlimited
Our API team is here to help with integration questions.