PATCH /api/v1/media/{mediaId}
Changes the title of a media. Only the library title changes: the file, its address and the lessons using it are untouched.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — the permission is that of the lessons |
| Resource scope | The media belongs to the key's organization |
| Participation | None |
| Resource state | None |
| Parameter | Type | Required | Description |
|---|---|---|---|
mediaId | UUID | yes | Media of the key's organization |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this organization |
Idempotency-Key | no | Accepted and ignored: renaming twice leaves the same title |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
title | string | yes | no | Not blank; trimmed and cut at 200 characters |
curl -X PATCH "$COHORTE_API_BASE_URL/api/v1/media/$MEDIA_ID" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Welcome — week 1"}'200 OK — the media with its new title.400 Bad Request — invalid JSON or a blank title.401 Unauthorized — missing, unknown or expired key.403 Forbidden — the bearer is not OWNER or ADMIN.404 Not Found — the media is unknown or belongs to another school.Same fields as one item of List media;
usage is empty in this response.
{
"success": true,
"data": {
"id": "8c9d0e1f-2a3b-4c4d-8e5f-6a7b8c9d0e1f",
"kind": "video",
"provider": "bunny",
"source": "upload",
"url": "https://iframe.mediadelivery.net/embed/123456/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b",
"title": "Welcome — week 1",
"status": "ready",
"progress": null,
"durationSeconds": 312,
"mimeType": "video/mp4",
"sizeBytes": 184320000,
"createdAt": "2026-10-01T08:30:00.000Z",
"archived": false,
"usage": []
},
"correlationId": "c0ffee00-1111-4222-8333-444455556666"
}