Skip to main content

List Courses by Group

This endpoint returns the courses attached to a given group, ordered by their position within that group.

Endpoint

GET /api/courses

Authentication

Authentication is optional. The endpoint is intended for member-facing surfaces (the group home page and mobile app's courses tab).

Query Parameters

ParameterTypeRequiredDescription
groupIdIntegerYesID of the group whose courses should be listed

Response

Success Response

  • Status Code: 200 OK
  • Content: Array of course objects with their Groups association populated.
[
{
"id": 42,
"title": "Intro to Stoicism",
"description": "<p>...</p>",
"image": "1700000000000_tsf.png",
"publishedDate": "2025-01-15T00:00:00.000Z",
"hidden": false,
"PlatformId": 36,
"authorId": 9846,
"createdAt": "2025-01-10T19:24:52.000Z",
"updatedAt": "2025-01-10T19:24:52.000Z",
"Groups": [
{
"id": 12,
"name": "Stoic Society",
"GroupCourse": {
"GroupId": 12,
"CourseId": 42,
"position": 0
}
}
]
}
]

Error Responses

  • 400 Bad RequestgroupId query parameter was not supplied.
  • 500 Internal Server Error — Unexpected server error.

Notes

  • Courses are returned in ascending GroupCourse.position order. Use Reorder Courses to change this order.
  • Hidden courses are included in this list; clients are expected to filter them out for non-admin viewers if needed.

Example

curl -X GET "https://api.tribesocial.io/api/courses?groupId=12" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"