POST /api/v1/video-resources/{videoResourceId}/unpublish
Takes the resource out of the library and out of every member read. Nothing is deleted: its media, its videos and its discussion stay, and the post that carries the discussion shows the video as unavailable.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Allowed for an assigned coach, whatever the scope; otherwise refused — 403 |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | coach (any scope) for a MEMBER; a reviewer is refused |
| Resource scope | Program, media and resource of the key's organization |
| Participation | None |
| Resource state | published; already unpublished changes nothing |
| Parameter | Type | Required | Description |
|---|---|---|---|
videoResourceId | UUID | yes | Resource of the key's organization |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this organization |
Idempotency-Key | yes | Stable key for this change; a replay returns the resource without writing again |
X-Correlation-Id | no | Caller correlation id, returned or generated |
No request body.
curl -X POST "$COHORTE_API_BASE_URL/api/v1/video-resources/$VIDEO_RESOURCE_ID/unpublish" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: video-service-layer-unpublish-001"200 OK — the resource, unpublished; replayed: true when it already was, or on a replay of the same key.400 Bad Request — missing Idempotency-Key or an identifier that is not a UUID.401 Unauthorized — missing, unknown or expired key.403 Forbidden — the bearer is neither OWNER, ADMIN nor an assigned coach.404 Not Found — no such resource in this school.Same fields as Publish a video resource.
{
"success": true,
"replayed": false,
"data": {
"id": "6f2b1c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"programId": "3a1f7c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b",
"kind": "video_answer",
"category": null,
"title": "How to structure a service layer",
"description": null,
"tags": ["Architecture"],
"status": "unpublished",
"thumbnailMediaId": null,
"createdBy": "0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
"publishedAt": "2026-10-18T10:00:00.000Z",
"unpublishedAt": "2026-10-19T09:00:00.000Z",
"createdAt": "2026-10-18T10:00:00.000Z",
"updatedAt": "2026-10-19T09:00:00.000Z"
},
"correlationId": "c0ffee00-1111-4222-8333-444455556666"
}video_resource.unpublished event; no notification is sent.