POST /api/v1/sections/{sectionId}/dissolve
Removes a section. Its lessons stay in the course: they are detached and read before the remaining sections. Nothing is deleted in cascade — a section is a separator, not a container.
The response says how many lessons were detached.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — sections carry the permission of their course |
| Resource scope | Section of the school attached to the API key |
| Resource state | An archived course, or a course of an archived program, answers 403 |
| Parameter | Type | Required | Description |
|---|---|---|---|
sectionId | UUID | yes | Section visible from the key's school |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this school |
Idempotency-Key | no | Optional: suppresses repeated effects for the same target and payload |
X-Correlation-Id | no | Caller correlation id, returned or generated |
No request body.
curl -X POST "$COHORTE_API_BASE_URL/api/v1/sections/$SECTION_ID/dissolve" \
-H "x-api-key: $COHORTE_API_KEY"200 OK — the section is gone.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 course is archived.404 Not Found — the section is unknown or belongs to another school. A second dissolve of the same section answers 404 too.| Field | Type | Nullable | Description |
|---|---|---|---|
success | boolean | no | true for a successful request |
data.sectionId | UUID | no | The section that was dissolved |
data.dissolved | boolean | no | true |
data.detachedLessons | integer | no | How many lessons stayed in the course, now without a section |
correlationId | UUID | no | Correlation id for support |
{
"success": true,
"data": {
"sectionId": "c41e7b03-9d2a-4e6f-b1c8-5a6b7c8d9e0f",
"dissolved": true,
"detachedLessons": 3
},
"correlationId": "0f6b1d92-5c3e-4a8b-9d71-3e2f4a6b8c10"
}A successful replay returns dissolved:true with detachedLessons:0: no additional lessons were detached by the retry.