Skip to main content

Update Course Layout

Change labels, the header, and the footer. Only the keys you send are written. header and footer merge the same way. The write does not publish. On a published course it saves pending edits; on a draft course it changes the course itself. The response is the full layout plus preview_url. See Layout Object and Updates.

Request​

PATCH /players/{id}/layout

Path Parameters​

ParameterTypeRequiredDescription
idstringYesCourse UUID. See Identifiers.

Request Body​

draft_version is required. Every other field is optional.

ParameterTypeRequiredDescription
draft_versionintegerYesCurrent counter from Get Course. Minimum 1. Missing, not an integer, or below 1 is 422. A value that is not current is 409.
page_titlestringNoBrowser title
icon_urlstringNoFavicon address
sidebar_titlestringNoSidebar heading
previous_labelstringNoPrevious control
next_labelstringNoNext control
mark_done_labelstringNoMark-done control
finished_labelstringNoFinished label
headerobjectNoHeader Object. Every key is optional and merges.
footerobjectNoFooter Object. Every key is optional and merges.

Example Request​

curl -X PATCH "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/layout" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"draft_version": 1,
"page_title": "Course intro",
"footer": {
"policy_url": "https://mysite.com/privacy",
"terms_url": "https://mysite.com/terms"
}
}'

Response​

Success Response (200)​

{
"data": {
"page_title": "Course intro",
"icon_url": "/assets/easyplayer.png",
"sidebar_title": "Files list:",
"previous_label": "Previous file",
"next_label": "Next file",
"mark_done_label": "Mark as done",
"finished_label": "Lesson finished",
"header": {
"is_visible": true,
"logo_url": "/assets/easyplayer.png"
},
"footer": {
"is_visible": true,
"text": "",
"policy_url": "https://mysite.com/privacy",
"terms_url": "https://mysite.com/terms"
},
"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 Layout Object. preview_url is minted for this response. draft_version is the counter after this write. draft_updated_at is when the draft was last saved — on a draft course, the course's updated_at.

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": {
"header": ["header must be an object"]
}
}
}

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