API Overview
Introduction to Respondeo REST API
Respondeo provides a comprehensive REST API for programmatic access to all quiz functionality.
Base URL
https://respondeo.example.com/apiFor local development:
http://localhost:3000/apiAuthentication
All API endpoints require authentication via API key. Include your API key in the x-api-key header:
curl -H "x-api-key: your_api_key_here" \
https://respondeo.example.com/api/quizzesSee API Authentication for details.
Interactive Documentation
Respondeo includes interactive API documentation powered by Scalar. Access it at:
https://respondeo.example.com/docsThe interactive docs include:
- ๐ Complete endpoint reference with request/response schemas
- ๐งช "Try it" functionality to test endpoints in your browser
- ๐ฆ Code snippets in multiple languages (JavaScript, Python, cURL, etc.)
- ๐ API key configuration for testing
API Features
- RESTful design โ Standard HTTP methods (GET, POST, PUT, DELETE)
- JSON responses โ All responses use JSON format
- Pagination โ List endpoints support
pageandlimitparameters - Rate limiting โ 100 requests per minute per API key
- Error handling โ Consistent error responses with HTTP status codes
- OpenAPI 3.1 spec โ Full machine-readable API specification
Rate Limiting
All API requests are rate-limited to 100 requests per minute per API key.
Rate limit headers are included in every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000When rate-limited, you'll receive a 429 Too Many Requests response:
{
"error": "Rate limit exceeded. Please try again later."
}Pagination
List endpoints support pagination via query parameters:
pageโ Page number (1-based, default: 1)limitโ Items per page (default: 30, max: 100)
Example:
curl -H "x-api-key: your_key" \
"https://respondeo.example.com/api/quizzes?page=2&limit=20"Response includes pagination metadata:
{
"quizzes": [...],
"pagination": {
"page": 2,
"limit": 20,
"total": 150,
"totalPages": 8
}
}Content Type
All requests and responses use application/json:
Content-Type: application/jsonInclude this header when sending data:
curl -X POST \
-H "x-api-key: your_key" \
-H "Content-Type: application/json" \
-d '{"title":"My Quiz"}' \
https://respondeo.example.com/api/quizzesCORS
The API supports Cross-Origin Resource Sharing (CORS) for client-side applications. All origins are allowed in development mode. In production, configure allowed origins via environment variables.
Versioning
The API is currently unversioned. Breaking changes will be communicated with a migration guide and deprecation period.
OpenAPI Specification
The complete OpenAPI 3.1 specification is available at:
https://respondeo.example.com/docs/openapi.jsonUse this for:
- Code generation (client SDKs)
- API testing tools (Postman, Insomnia)
- Documentation generation
Next Steps
- Authentication โ Learn how to authenticate
- Endpoints โ Explore available endpoints
- Error Handling โ Understand error responses
- API Keys โ Create and manage API keys