GET /api/v1/me/enrollments/{enrollmentId}/lessons/{lessonId}
Returns a lesson of one of your enrollments: its text content, its markers,
its exposable resources and a link to open it in Cohorte. A lesson you cannot
open yet returns kind: "locked" with its reason and no content, no
resources, no video.
The lesson's ## Pour ton agent section is not in content:
agentSection.present tells you whether it exists, and
Get my lesson's agent section
returns it, framed as data.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed — reads the key holder's own learning only |
ADMIN | Allowed — reads the key holder's own learning only |
MEMBER | Allowed — reads the key holder's own learning only |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None |
| Resource scope | A lesson of the program of one of your enrollments |
| Participation | The enrollment must be yours |
| Resource state | Published, in a visible course; step and cohort locks apply exactly as in Cohorte |
| Parameter | Type | Required | Description |
|---|---|---|---|
enrollmentId | UUID | yes | One of your enrollments |
lessonId | UUID | yes | A lesson of that enrollment's program |
curl "$COHORTE_API_BASE_URL/api/v1/me/enrollments/$ENROLLMENT_ID/lessons/$LESSON_ID" \
-H "x-api-key: $COHORTE_API_KEY"200 OK — kind: "lesson" or kind: "locked".400 Bad Request — an id is not a UUID.401 Unauthorized — missing, unknown or expired key.404 Not Found — draft, archived, in an archived course, another program, a suspended enrollment, not yours, or another school's.| Field | Type | Nullable | Description |
|---|---|---|---|
data.kind | string | no | lesson or locked |
data.lessonId | UUID | no | Lesson id |
data.title | string | no | Lesson title |
data.eyebrow | string | no | "Program · Course" |
data.cohorteUrl | string | no | Absolute link to the lesson in Cohorte |
data.reason | string | no | Locked only: cohort-not-open, previous-step-incomplete, deliverable-not-validated |
data.externalId | string | yes | Lesson only: the author's identifier for the lesson |
data.content | string | yes | Lesson only: Markdown text, without the ## Pour ton agent section |
data.agentSection.present | boolean | no | Lesson only: the lesson has a ## Pour ton agent section |
data.audience | string[] | no | Lesson only: all, freelance, employee, agency, saas |
data.level | string | yes | Lesson only: essential or deep_dive |
data.prerequisites | string[] | no | Lesson only: externalIds of the lessons to read first |
data.videoMinutes | integer | yes | Lesson only: video duration in minutes |
data.taskRef | string | yes | Lesson only: the task this lesson counts for |
data.video.present | boolean | no | Lesson only: a video exists; watch it at cohorteUrl |
data.resources[] | array | no | Lesson only: {id, resourceType, title, url?, mimeType, sizeBytes}; url appears only for link resources |
{
"success": true,
"data": {
"kind": "lesson",
"lessonId": "0f1e2d3c-4b5a-4968-8778-695a4b3c2d1e",
"title": "Tool calling",
"eyebrow": "Agentic AI Developer · Week 3",
"externalId": "LIV-04",
"content": "## Why tools\n…",
"agentSection": {"present": true},
"audience": ["freelance", "saas"],
"level": "essential",
"prerequisites": ["LIV-01"],
"videoMinutes": 4,
"taskRef": "T1.1",
"video": {"present": true},
"resources": [{"id": "…", "resourceType": "link", "title": "Spec", "url": "https://example.com/spec", "mimeType": null, "sizeBytes": null}],
"cohorteUrl": "https://your-school.cohorte.app/school/your-school/learn/6a1c…/lessons/0f1e…"
},
"correlationId": "c0ffee00-1111-4222-8333-444455556666"
}