Update Course
Change the course name, styles, layout, settings, or certificate template. Only the keys you send are written. Styles, layout, settings, and the certificate are draft writes and do not publish: on a published course they become pending edits until you publish. name is not part of the draft. A rename changes the live course immediately, also on a published course, and publish does not change it. The response is the Course Object plus preview_url, draft_version, and draft_updated_at. See Updates and Draft, preview, and publish.
Request
PATCH /players/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Course UUID. See Identifiers. |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
draft_version | integer | Yes | Current counter from Get Course. Minimum 1. Missing, not an integer, or below 1 is 422. A value that is not current is 409. |
name | string | No | Course name, 1–255 characters. Changes the live course immediately. |
styles | object | No | Styles Object. A present object merges. |
layout | object | No | Layout Object. A present object merges. |
settings | object | No | Settings Object. A present object merges. |
certificate | object | No | Certificate Object. A present object merges. |
Example Request
curl -X PATCH "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"draft_version": 1,
"name": "Course intro",
"styles": {
"main_color": "#111827"
}
}'
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-15T11:05:00.000Z",
"published_at": null,
"has_draft": false,
"preview_url": "https://app.easy.tools/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/preview?expires=1768478400&signature=7d2e9c41a6b85f03e1c7d94a2b6f80e35c1a9d7b4e2f60c8a3d5b1e9f7c2a046",
"draft_version": 2,
"draft_updated_at": "2026-01-15T11:05:00.000Z"
}
}
Response Fields
See Course Object. preview_url is minted for this response. draft_version is the counter after this write. The sample course is a draft, so the write changed the course itself: has_draft stays false and draft_updated_at matches updated_at. On a published course, has_draft is true after a section write and draft_updated_at is when the pending edits were saved. The updated sections are on Get Course and on the section routes.
Error Responses
Not Found Error (404)
See Identifiers.
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
}
}
Conflict Error (409)
draft_version is not the current counter. Read the course and retry with that value.
{
"error": {
"code": "CONFLICT",
"message": "The draft was edited elsewhere. GET the draft and retry with the current draft_version."
}
}
Validation Error (422 Unprocessable Entity)
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"name": ["name should not be empty"]
}
}
}
Authentication, permission, and rate-limit errors are described in Authorization.