Update Course Styles
Change the course styles. Only the keys you send are written. 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 styles object plus preview_url. See Styles Object and Updates.
Request
PATCH /players/{id}/styles
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Course UUID. See Identifiers. |
Request Body
draft_version is required. Every other field is optional. The fields are the Styles Object.
| 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. |
theme | string | No | Theme name |
font_family | string | No | Font name |
main_color | string | No | Accent color |
background_color | string | No | Page background |
text_color | string | No | Body text color |
header_color | string | No | Header color |
heading_color | string | No | Heading color |
border_color | string | No | Border color |
Example Request
curl -X PATCH "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/styles" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"draft_version": 1,
"main_color": "#111827"
}'
Response
Success Response (200)
{
"data": {
"theme": "light",
"font_family": "Inter",
"main_color": "#111827",
"background_color": "#f9fafb",
"text_color": "#0e0f11",
"header_color": "#fff",
"heading_color": "#3c404b",
"border_color": "#e0e3e6",
"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 Styles 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": {
"main_color": ["main_color must be a string"]
}
}
}
Authentication, permission, and rate-limit errors are described in Authorization.