# Courses

> Courses with modules and lessons in text, image, video or link form, enrollment and per-lesson progress. The structure exists in the API and the app's courses screen is being finished. How to build one today and how to sell it.

The **Courses** module organizes learning in three levels:

<div class="flow">
<div class="flow-row"><span class="flow-node">Courses space</span><span class="flow-arrow">→</span><span class="flow-node">Course</span><span class="flow-arrow">→</span><span class="flow-node">Module</span><span class="flow-arrow">→</span><span class="flow-node">Lesson (text, image, video or link)</span></div>
</div>

Members enroll in the course, take the lessons in order, and progress on each lesson is recorded.

> [!SOON]
> The app's courses screen still shows sample content, not your community's courses. Creating, editing and following courses on screen arrives when that module is finished. Until then, the structure is created through the API, as this article shows.

## What it's for

| Community | Course |
|---|---|
| Online school | *Excel from scratch*: 6 modules, 30 video lessons |
| Company HR | *Onboarding*: 3 modules with the company's policies |
| Mentoring | *Mentee path*: one module per month |

## How it works

### The course

| Field | What it's for |
|---|---|
| Title and slug | The course's name and address |
| Description | What you'll learn |
| Level | Beginner, intermediate or advanced |
| Image | The cover |
| Status | Starts as a **draft**; once published, it accepts enrollments |

### Modules and lessons

Each course has modules, in order, and each module has lessons, in order. A lesson has a type: **text**, **image**, **video** or **link**, along with its duration.

### Enrollment and progress

Members enroll in a **published** course (a draft returns *"This course is not available for enrollment yet."*) and mark their progress on each lesson. Enrolling and completing lessons earns points in the [ranking](/espacos/ranking): 10 points for enrolling, 25 per completed lesson.

### Who can

| Action | Who |
|---|---|
| Create the Courses space | Owner and admin |
| Create and edit courses, modules and lessons | Owner and admin |
| Enroll and take the lessons | Whoever sees the space (and the published course) |

## Step by step (today, through the API)

*Role: owner or admin.*

1. Create the space: **Add Space › Courses**, with the visibility of whoever may take the course.
2. Create the course: `POST /api/courses` with `communityId`, `spaceId`, `title`, `slug` and `level`. Keep the `id`.
3. Create each module: `POST /api/courses/module` with `courseId` and `title`.
4. Create each lesson: `POST /api/courses/lesson` with `moduleId`, `title` and `type`.
5. Publish: `PUT /api/courses/{id}` with `status: "published"`.

The full sequence, with the ids passed from one step to the next and the errors you get when you skip a step, is in [Creation order](/api/ordem-de-criacao#course).

## Selling the course

| Model | How |
|---|---|
| Standalone course | A [product](/monetizacao/produtos) that unlocks the course's space (**Private** › **Products**) |
| Course included in the subscription | The course's space set to **Private** and unlocked for the [plan](/monetizacao/planos), or **Subscribers** |
| Free course for members | The space set to **Members** |

## Current limits

- There's no completion **certificate**.
- There's no **exam** with a passing grade.
- There's no **scheduled release** (drip): access is by space, not by each person's start date.

## Frequently asked questions

**Where are the videos stored?**
A video lesson points to the video; there's also video upload through the API (`POST /api/upload/content/video`).

**Can I have several courses in one space?**
Yes. A Courses space is a showcase of courses.

**Do members see the course in the Feed?**
Yes, like other items, if they have access to the space.

## In the API

`POST /api/courses`, `POST /api/courses/module`, `POST /api/courses/lesson`, `PUT /api/courses/{id}`, `PUT` and `DELETE /api/courses/module/{moduleId}` (rename, reorder, delete a module with its lessons), `PUT` and `DELETE /api/courses/lesson/{lessonId}` (edit, reorder, move to another module, delete a lesson), `POST /api/courses/{courseId}/enroll`, `POST /api/courses/{courseId}/lesson/{lessonId}/progress`. See [Courses](/api/referencia/courses).

## Related

- [Creation order](/api/ordem-de-criacao)
- [Products](/monetizacao/produtos)
- [Modules](/conceitos/modulos)
