Introduction
The Study Sync API provides programmatic access to all platform features including study plan management, resource tracking, user progress, and notifications. The API is RESTful, uses JSON for request and response bodies, and requires Firebase authentication.Base URL
Authentication
All API endpoints (except some GET endpoints marked as public) require authentication using Firebase ID tokens. Include the token in theAuthorization header:
Response Format
All API responses follow a consistent JSON format:Success Response
Error Response
HTTP Status Codes
The API uses standard HTTP status codes:| Code | Description |
|---|---|
200 | Success - Request completed successfully |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Missing or invalid authentication token |
403 | Forbidden - Authenticated but lacking permissions |
404 | Not Found - Resource doesn’t exist |
500 | Internal Server Error - Something went wrong on the server |
Common Error Codes
Error message describing what went wrong
"No token provided"- Missing Authorization header"Invalid or expired token"- Firebase token is invalid or has expired"Access denied"- User doesn’t have permission to access the resource"Invalid study plan ID"- Provided ID is not a valid MongoDB ObjectId"Study plan not found"- Resource with the given ID doesn’t exist
Rate Limiting
Currently, there are no rate limits enforced. This may change in the future as the platform scales.Pagination
Endpoints that return lists support pagination through query parameters:Page number to retrieve
Number of items per page
Object IDs
Study Sync uses MongoDB ObjectIds for resource identification. Valid ObjectIds are 24-character hexadecimal strings. Valid:507f1f77bcf86cd799439011
Invalid: invalid-id
API Endpoints
Study Plans
- Study Plans API - Create, read, update, delete, and share study plans
Instances
- Instances API - Manage user’s active study plan instances
Resources
- Resources API - Add and manage learning resources
User Progress
- User Progress API - Track completion and progress
Users
- Users API - Manage user profiles
Notifications
- Notifications API - Manage notification settings
Reviews
- Reviews API - Submit and manage user reviews
Background Jobs
- GET /api/cron/reminders - Process deadline reminders (automated via Vercel Cron)
The cron endpoint is triggered automatically by Vercel Cron jobs and requires a
CRON_SECRET for authorization. It processes all active instances with upcoming deadlines and sends email reminders based on user preferences.