Overview
Study plans are the core organizational unit in Study Sync. They contain collections of learning resources organized for a specific course or topic.List Study Plans
GET /api/study-plans
Get study plans based on view type and filters. Supports optional authentication.
Query Parameters
Filter by view type:
public- All public study plansmy- User’s own plans and plans shared with them (requires auth)
Search query to filter by title, short description, or full description
Filter by course code (case-insensitive partial match)
Sort order:
newest- Most recently createdpopular- Highest instance countshortest- Fewest resources
Page number for pagination
Number of plans per page
Response
Array of study plan objects
Pagination metadata
Create Study Plan
POST /api/study-plans
Create a new study plan. Requires authentication.
Request Body
Plan title
Brief description (shown in lists)
Course identifier (e.g., “CS101”)
Detailed description (optional)
Whether plan should be publicly visible
Response
Success message: “Study plan created successfully”
The created study plan object with all fields
Get Study Plan
GET /api/study-plans/:id
Get a specific study plan by ID. Public plans don’t require authentication.
Path Parameters
Study plan ID (24-character hex string)
Query Parameters
How to sort resources:
order- Original order from plantitle- Alphabetical by titleduration- By estimated timetype- By resource type
Response
Returns the study plan object with populated resources and additional fields:Full resource objects (not just IDs) in sorted order
Total estimated time in minutes
Number of resources
Whether current user can edit this plan
Update Study Plan
PUT /api/study-plans/:id
Update a study plan. Requires edit permissions (creator or editor role).
Path Parameters
Study plan ID
Request Body
All fields are optional. Only include fields you want to update.Plan title
Brief description
Detailed description
Course code
Public visibility
Array of resource IDs (to reorder or modify resources)
Response
“Study plan updated successfully”
Updated study plan object
Delete Study Plan
DELETE /api/study-plans/:id
Delete a study plan. Only the creator can delete.
Path Parameters
Study plan ID
Response
“Study plan deleted successfully”
Share Study Plan
POST /api/study-plans/:id/share
Share a study plan with another user via email. Sends invitation email.
Path Parameters
Study plan ID
Request Body
Email address of person to share with
Access level:
viewer- Can view onlyeditor- Can edit and share
Response
“Study plan shared successfully”
Remove Collaborator
DELETE /api/study-plans/:id/share/:userId
Remove a collaborator’s access. Can use either user ID or email address.
Path Parameters
Study plan ID
User ID (24-char hex) or email address to remove
Response
“Collaborator removed successfully”