List Admin Courses
This endpoint powers the admin courses dashboard. It returns every course on the authenticated user's platform along with the full nested curriculum (collections → content → keywords) and the groups each course is attached to.
Endpoint
GET /api/admin/courses
Authentication
Authentication is required. User must have the admin or creator role. Creators only see courses they authored; admins see all courses on the platform.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
searchTerm | String | No | Case-insensitive partial match on the course title |
groupIds | Integer / Array | No | Filter to courses attached to one or more groups (inner-joins on group) |
Response
Success Response
- Status Code: 200 OK
- Content: Array of course objects with
CollectionsManyToManyandGroupspopulated. Collections include theirContents, and each content includes itsCollection,Group, andKeywordIDs.
[
{
"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",
"CollectionsManyToMany": [
{
"id": 110,
"name": "Week 1 — Foundations",
"sortPreference": "chronological",
"Contents": [
{
"id": 4953,
"title": "Welcome",
"type": "video",
"Collections": [{ "id": 110 }],
"Groups": [{ "id": 12 }],
"Keywords": [{ "id": 7 }]
}
]
}
],
"Groups": [
{ "id": 12, "name": "Stoic Society" }
]
}
]
Error Responses
- 403 Forbidden — User does not have admin or creator privileges.
- 500 Internal Server Error — Unexpected server error.
Notes
- Collections within each course are ordered by
CollectionCourses.position. - Contents within each collection are ordered by the collection's
sortPreference(the same ordering rules used by Get Collection by ID). - When the
groupIdsfilter is supplied, courses must be attached to at least one of the listed groups to be returned.
Example
# All courses on the platform
curl -X GET "https://api.tribesocial.io/api/admin/courses" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
# Filter by title and group
curl -X GET "https://api.tribesocial.io/api/admin/courses?searchTerm=stoic&groupIds=12&groupIds=34" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"