POST /api/v1/courses/{courseId}/rename
Changes the name of a course. Nothing else moves: the URL slug and the cover stay exactly as they were, which is why this narrow command exists next to Update a course.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — a course is renamed by whoever may change its program |
| Resource scope | Course 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 |
|---|---|---|---|
courseId | UUID | yes | Course 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 rename |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
name | string | yes | no | 3 to 100 characters |
{"name": "Week 1 — Ship your first agent"}curl -X POST "$COHORTE_API_BASE_URL/api/v1/courses/$COURSE_ID/rename" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"name":"Week 1 — Ship your first agent"}'200 OK — the course, renamed. replayed is true when the name was already that one.400 Bad Request — missing Idempotency-Key, invalid JSON, or a name outside 3–100 characters.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 course is unknown or belongs to another school.{
"success": true,
"replayed": false,
"data": {
"id": "3b8e2d41-7a6c-4f1e-8b25-9c0d1e2f3a4b",
"programId": "9f2c0a1e-4b7d-4c1a-9e3f-2a6b8c0d1e2f",
"name": "Week 1 — Ship your first agent",
"slug": "week-1-your-first-agent",
"image": "https://files.example.com/covers/week-1.png",
"position": 1,
"status": "active",
"createdAt": "2026-09-01T09:00:00.000Z",
"updatedAt": "2026-09-04T17:12:00.000Z"
},
"correlationId": "0f6b1d92-5c3e-4a8b-9d71-3e2f4a6b8c10"
}course.renamed event — which carries the
name before and after — are written in one transaction.