List courses
Retrieve a paginated list of courses in a community.
GET /v1/communities/:community_id/courses
Query parameters:
| Parameter | Type | Description |
|---|
page | int | Page number (default: 1). |
per_page | int | Items per page (max 50). |
Get course
Retrieve the details of a specific course, including its modules and lessons.
GET /v1/communities/:community_id/courses/:id
Create course
Create a new course inside a community.
POST /v1/communities/:community_id/courses
Request body:
{
"title": "Digital Marketing Course",
"description": "Learn from beginner to advanced",
"access_type": "paid",
"price": 197.00,
"currency": "BRL"
}
| Field | Type | Required | Description |
|---|
title | string | Yes | Course title. |
description | string | No | Detailed description of the course. |
access_type | string | Yes | Who can enroll: free, paid, or members_only. |
price | number | No | Course price (required when access_type is paid). |
currency | string | No | ISO 4217 currency code (e.g. BRL, USD). Default: BRL. |
Enroll in course
Enroll the authenticated user in a course.
POST /v1/communities/:community_id/courses/:id/enroll
Response: Returns the enrollment record with status active.
For paid courses, enrollment is confirmed only after payment is processed through Tryno Pay.
Get progress
Retrieve the authenticated user’s progress in a specific course.
GET /v1/communities/:community_id/courses/:id/progress
Response:
{
"data": {
"total_lessons": 24,
"completed_lessons": 12,
"progress_percent": 50,
"last_accessed_at": "2025-01-20T10:00:00Z"
}
}
| Field | Type | Description |
|---|
total_lessons | int | Total number of lessons in the course. |
completed_lessons | int | Number of lessons the user has completed. |
progress_percent | number | Completion percentage (0—100). |
last_accessed_at | string | ISO 8601 timestamp of the user’s last activity. |
Complete lesson
Mark a specific lesson as completed for the authenticated user.
POST /v1/communities/:community_id/courses/:id/lessons/:lesson_id/complete
Response: Returns the updated progress object reflecting the newly completed lesson.
Completing all lessons in a course automatically marks the enrollment as completed and awards any configured XP.