Command Palette

Search for a command to run...

Core API

Subjects

List and validate the subjects currently assigned to your tenant.

GET/subjects

List Available Subjects

The endpoint returns a lightweight ordered subject list without lessons.

Subjects are ordered by parent course position first and subject position second.

Only subjects assigned to your tenant are returned. Legacy tenant-owned subjects remain available through compatibility fallback during transition.

GET /subjectsbash
curl -X GET "https://{{domain}}/api/external/v1/subjects" \
  -H "Authorization: Bearer <your_api_key>"
Sample Responsejson
{
  "success": true,
  "data": [
    {
      "id": "subject-fractions",
      "course_id": "course-grade-7",
      "course_title": "Grade 7",
      "course_slug": "grade-7",
      "slug": "fractions",
      "title": "Fractions",
      "description": "Understand equivalent fractions and operations",
      "thumbnail_url": null,
      "position": 1,
      "lesson_count": 6
    }
  ],
  "pagination": {
    "total": 1,
    "limit": 50,
    "offset": 0,
    "has_more": false
  }
}
GET/subjects/{id}

Get One Subject

Use the detail endpoint when you need one subject together with its ordered lessons.

GET /subjects/{id}bash
curl -X GET "https://{{domain}}/api/external/v1/subjects/<subject_id>" \
  -H "Authorization: Bearer <your_api_key>"
Sample Responsejson
{
  "success": true,
  "data": {
    "id": "subject-fractions",
    "course_id": "course-grade-7",
    "slug": "fractions",
    "title": "Fractions",
    "description": "Understand equivalent fractions and operations",
    "thumbnail_url": null,
    "status": "published",
    "visible": true,
    "created_at": "2026-06-08T10:00:00.000Z",
    "updated_at": "2026-06-08T10:00:00.000Z",
    "lessons": [
      {
        "id": "lesson-equivalent-fractions",
        "subject_id": "subject-fractions",
        "slug": "equivalent-fractions",
        "title": "Equivalent Fractions",
        "overview": "Compare and simplify fractions",
        "position": 1,
        "estimated_min": 20
      }
    ]
  }
}

How To Use subject_id

  • Fetch /curriculum when you need the full course -> subject -> lesson tree

  • Fetch /subjects when you need a smaller lookup list for selectors or mapping UIs

  • Fetch /subjects/{id} when you need the ordered lessons for one subject

  • Use an assigned subject_id when creating a chat

  • Expect 403 if the subject is not assigned to your tenant

Subjects | Math AI Docs