API Getting Started

Learn how to integrate with the Caring CourseForge API for programmatic access

docsapi

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

  1. Log in to your CourseForge account
  2. Go to SettingsAPI Keys
  3. Click Create API Key
  4. Give it a name (e.g., "Production Server")
  5. 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 courses
  • POST /api/v1/courses - Create a course
  • GET /api/v1/courses/{id} - Get a specific course
  • PATCH /api/v1/courses/{id} - Update a course
  • DELETE /api/v1/courses/{id} - Delete a course

Modules

  • POST /api/v1/courses/{courseId}/modules - Create a module
  • GET /api/v1/modules/{id} - Get a module
  • PATCH /api/v1/modules/{id} - Update a module
  • DELETE /api/v1/modules/{id} - Delete a module

Lessons

  • POST /api/v1/modules/{moduleId}/lessons - Create a lesson
  • GET /api/v1/lessons/{id} - Get a lesson
  • PATCH /api/v1/lessons/{id} - Update a lesson
  • DELETE /api/v1/lessons/{id} - Delete a lesson

Content Blocks

  • POST /api/v1/lessons/{lessonId}/blocks - Add a content block
  • GET /api/v1/blocks/{id} - Get a content block
  • PATCH /api/v1/blocks/{id} - Update a content block
  • DELETE /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

Topics

api overviewgetting api credentialsstep-by-stepmaking your first requestexample: list your coursesresponseavailable endpointssdk librarieserror handlingstandard error response