Base URL
Replace
https://your-deployed-url.com with the URL of your deployed Courser instance.Authentication
The Courser API uses JWT (JSON Web Token) bearer authentication. Once you obtain a token via any auth endpoint, pass it with every authenticated request using the header below.Endpoints
Auth — /auth/*
| Method | Path | Auth required | Description |
|---|---|---|---|
POST | /auth/google | No | Sign in or register with Google OAuth |
POST | /auth/signup-email | No | Register a new account with email and password |
POST | /auth/login-email | No | Sign in with email and password |
GET | /auth/isloggedin | Yes | Verify a token and return the authenticated user’s profile |
Chatbot — /chatbot/*
| Method | Path | Auth required | Description |
|---|---|---|---|
POST | /chatbot/chat | No | Send a question to a course chatbot and get a cited answer |
POST | /chatbot/create | Yes | Create a new chatbot from YouTube lecture URLs |
GET | /chatbot/:courseId/dataset/count | Yes | Get the total conversation count for a course |
GET | /chatbot/:courseId/dataset/export | Yes | Download recent conversations as a CSV file |
Course — /course/*
| Method | Path | Auth required | Description |
|---|---|---|---|
GET | /course/getAllCourses | Yes | Get all courses belonging to the authenticated user |
GET | /course/getCourse/:courseID | No | Get a course by ID (public — used by the chatbot widget) |
POST | /course/update | Yes | Update a course’s settings, including image upload |
GET | /course/getCourseProtected/:courseID | Yes | Get a course by ID (authenticated version) |
Error responses
| Status | Meaning |
|---|---|
401 | Unauthorized — missing, invalid, or expired token, or no matching user |
409 | Conflict — a resource with the same identifier (e.g. email address) already exists |
500 | Internal server error — an unexpected error occurred on the server |
API sections
Auth
JWT authentication, token acquisition, and user session management.
Chatbot
Create and interact with AI chatbots trained on lecture videos.
Course
Manage courses, upload YouTube videos, and configure chatbot behavior.