Skip to main content

List courses

Retrieve a paginated list of courses in a community.
GET /v1/communities/:community_id/courses
Query parameters:
ParameterTypeDescription
pageintPage number (default: 1).
per_pageintItems 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"
}
FieldTypeRequiredDescription
titlestringYesCourse title.
descriptionstringNoDetailed description of the course.
access_typestringYesWho can enroll: free, paid, or members_only.
pricenumberNoCourse price (required when access_type is paid).
currencystringNoISO 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"
  }
}
FieldTypeDescription
total_lessonsintTotal number of lessons in the course.
completed_lessonsintNumber of lessons the user has completed.
progress_percentnumberCompletion percentage (0—100).
last_accessed_atstringISO 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.