The CourseForge API allows you to programmatically create, update, and manage courses, modules, lessons, and content. This guide will get you started.
Note: API access is available on Professional and Enterprise plans. View pricing
API Overview
- Base URL:
https://courseforge.caringai.app/api/v1 - Protocol: HTTPS only
- Authentication: API Key (Header-based)
- Response Format: JSON
- Rate Limits: Based on your plan tier
Quick Start
1. Get Your API Key
- Log in to your CourseForge account
- Go to Settings → API Keys
- Click Create API Key
- Give it a name (e.g., "Production Server")
- Copy and securely store your API key
Important: API keys are only shown once. Store them securely and never commit them to version control.
2. Make Your First Request
Test your API key with a simple request to list your courses:
curl https://courseforge.caringai.app/api/v1/courses \
-H "Authorization: Bearer YOUR_API_KEY"
3. Create a Course
curl -X POST https://courseforge.caringai.app/api/v1/courses \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Introduction to Python",
"description": "Learn Python from scratch",
"difficulty": "beginner",
"published": false
}'
Available Endpoints
Courses
GET /api/v1/courses- List all coursesPOST /api/v1/courses- Create a courseGET /api/v1/courses/{id}- Get a specific coursePATCH /api/v1/courses/{id}- Update a courseDELETE /api/v1/courses/{id}- Delete a course
Modules
POST /api/v1/courses/{courseId}/modules- Create a moduleGET /api/v1/modules/{id}- Get a modulePATCH /api/v1/modules/{id}- Update a moduleDELETE /api/v1/modules/{id}- Delete a module
Lessons
POST /api/v1/modules/{moduleId}/lessons- Create a lessonGET /api/v1/lessons/{id}- Get a lessonPATCH /api/v1/lessons/{id}- Update a lessonDELETE /api/v1/lessons/{id}- Delete a lesson
Content Blocks
POST /api/v1/lessons/{lessonId}/blocks- Add a content blockGET /api/v1/blocks/{id}- Get a content blockPATCH /api/v1/blocks/{id}- Update a content blockDELETE /api/v1/blocks/{id}- Delete a content block
AI Generation
POST /api/v1/ai/generate-content- Generate lesson content with AI
Response Format
All responses follow this format:
Success (2xx):
{
"data": { /* Your data here */ },
"meta": {
"page": 1,
"per_page": 20,
"total": 45
}
}
Error (4xx/5xx):
{
"error": {
"code": "invalid_request",
"message": "Course name is required",
"details": {}
}
}
Next Steps
- Authentication - Learn about API keys and security
- API Reference - Complete endpoint documentation
- Rate Limits - Understand usage limits
- Webhooks - Receive real-time event notifications