Skip to main content
The Courser API is a REST API that lets you build and interact with AI-powered course chatbots. All requests and responses use JSON.

Base URL

http://localhost:8000
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.
x-access'courser-auth-token: <your_jwt_token>
The header name contains an apostrophe: x-access'courser-auth-token. This is intentional and must be sent exactly as shown.
Tokens are valid for 1000 days from the time of issue. See the Authentication page for full details.

Endpoints

Auth — /auth/*

MethodPathAuth requiredDescription
POST/auth/googleNoSign in or register with Google OAuth
POST/auth/signup-emailNoRegister a new account with email and password
POST/auth/login-emailNoSign in with email and password
GET/auth/isloggedinYesVerify a token and return the authenticated user’s profile

Chatbot — /chatbot/*

MethodPathAuth requiredDescription
POST/chatbot/chatNoSend a question to a course chatbot and get a cited answer
POST/chatbot/createYesCreate a new chatbot from YouTube lecture URLs
GET/chatbot/:courseId/dataset/countYesGet the total conversation count for a course
GET/chatbot/:courseId/dataset/exportYesDownload recent conversations as a CSV file

Course — /course/*

MethodPathAuth requiredDescription
GET/course/getAllCoursesYesGet all courses belonging to the authenticated user
GET/course/getCourse/:courseIDNoGet a course by ID (public — used by the chatbot widget)
POST/course/updateYesUpdate a course’s settings, including image upload
GET/course/getCourseProtected/:courseIDYesGet a course by ID (authenticated version)

Error responses

StatusMeaning
401Unauthorized — missing, invalid, or expired token, or no matching user
409Conflict — a resource with the same identifier (e.g. email address) already exists
500Internal 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.

Build docs developers (and LLMs) love