POST /api/v1/lessons/{lessonId}/archive
Pulls a lesson out of the line. Members stop seeing it.
This is not terminal, unlike archiving a program or a course: an archived lesson can be published again, because pulling content back is a decision you may want to undo.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — archiving is the same write as editing the content |
| Resource scope | Lesson of the school attached to the API key |
| Resource state | Already archived answers 400 |
| Parameter | Type | Required | Description |
|---|---|---|---|
lessonId | UUID | yes | Lesson visible from the key's school |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this school |
Idempotency-Key | yes | Stable key for this archival |
X-Correlation-Id | no | Caller correlation id, returned or generated |
No request body.
curl -X POST "$COHORTE_API_BASE_URL/api/v1/lessons/$LESSON_ID/archive" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"200 OK — the lesson is archived.400 Bad Request — missing Idempotency-Key, or the lesson is already archived.401 Unauthorized — the key is missing, invalid, or no longer attached to a member.403 Forbidden — the bearer is not OWNER or ADMIN, or the program is archived.404 Not Found — the lesson is unknown or belongs to another school.{
"success": true,
"replayed": false,
"data": {
"id": "5d9f3a60-1c2b-4e7d-8f4a-6b7c8d9e0f1a",
"programId": "9f2c0a1e-4b7d-4c1a-9e3f-2a6b8c0d1e2f",
"courseId": "3b8e2d41-7a6c-4f1e-8b25-9c0d1e2f3a4b",
"sectionId": "c41e7b03-9d2a-4e6f-b1c8-5a6b7c8d9e0f",
"title": "Structure a discovery call",
"content": "## Why it matters\n\nA discovery call decides the rest of the sale.",
"videoUrl": "https://vimeo.com/912440188",
"status": "archived",
"position": 1,
"createdAt": "2026-09-01T09:00:00.000Z",
"updatedAt": "2026-09-04T17:12:00.000Z"
},
"correlationId": "0f6b1d92-5c3e-4a8b-9d71-3e2f4a6b8c10"
}