Skip to main content

Unpublish Course

Move a course back to draft. The body is empty. The course is taken offline at once: visitors can no longer open it, and published_at on the response is null. Any pending edits are then saved onto the course, which is no longer public, so has_draft is false. The paywall does not change. A course that is already a draft stays a draft, and the response is 200. Unpublishing does not require a plan.

When pending edits are saved onto the course, draft_version increases by 1. Read the course with Get Course before the next draft write: a write that sends the value from before the unpublish returns 409. See Draft version.

Request​

POST /players/{id}/unpublish

Path Parameters​

ParameterTypeRequiredDescription
idstringYesCourse UUID. See Identifiers.

Example Request​

curl -X POST "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/unpublish" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"

Response​

Success Response (200)​

{
"data": {
"id": "8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71",
"slug": "course-intro",
"name": "Course intro",
"status": "draft",
"created_at": "2026-01-15T10:30:00.000Z",
"updated_at": "2026-01-16T14:00:00.000Z",
"published_at": null,
"has_draft": false,
"preview_url": "https://app.easy.tools/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/preview?expires=1768575600&signature=7d2e9c41a6b85f03e1c7d94a2b6f80e35c1a9d7b4e2f60c8a3d5b1e9f7c2a046"
}
}

Response Fields​

See Course Object and Status. The response also includes preview_url, minted for this response. It does not include public_url, draft_version, or draft_updated_at — read them with Get Course. public_url stays the same address after unpublishing.

Error Responses​

Not Found Error (404)​

See Identifiers.

{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
}
}

Authentication, permission, and rate-limit errors are described in Authorization.