Update Lesson
Change a lesson. Only the keys you send are written. type stays as it was created — a different type returns 422. schedule merges, and schedule: null clears it. The write does not publish. On a published course it saves pending edits; on a draft course it changes the course itself. See Lesson Object and Lessons.
Request
PATCH /players/{playerId}/files/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
playerId | string | Yes | Course UUID. See Identifiers. |
id | string | Yes | Lesson UUID |
Request Body
draft_version is required. Every other field is optional.
| 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. |
type | string | No | Must match the stored type |
name | string | No | Name, 1–255 characters |
description | string|null | No | null clears it |
text | string | No | Body text |
src_url | string | No | Address of the lesson |
video_source | string | No | youtube, vimeo, wistia, bunny, or other |
info | string | No | Short note, maximum 255 characters |
is_free | boolean | No | Whether the lesson is free |
is_hidden | boolean | No | true hides the lesson and leaves the row in place |
schedule | object|null | No | Schedule Object. null clears the schedule. |
Example Request
curl -X PATCH "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/files/3a91c4e0-6b27-4f58-9d14-7e2b8c0a5f63" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"draft_version": 1,
"is_hidden": true,
"schedule": {
"release_at": "2026-03-01T15:00:00.000Z",
"is_visible_before_release": false
}
}'
Response
Success Response (200)
{
"data": {
"id": "3a91c4e0-6b27-4f58-9d14-7e2b8c0a5f63",
"name": "Welcome",
"type": "video",
"description": "Start here.",
"text": "",
"src_url": "https://video.example.com/play/welcome",
"video_source": "bunny",
"info": "",
"is_free": true,
"is_hidden": true,
"order": 0,
"schedule": {
"release_at": "2026-03-01T15:00:00.000Z",
"is_visible_before_release": false,
"expires_at": null,
"is_visible_after_expiry": true,
"release_after_days": null,
"expires_after_days": null
},
"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 Lesson Object. preview_url on data is minted for this response. draft_version and draft_updated_at are on data as well.
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": {
"type": ["type cannot be changed"]
}
}
}
Authentication, permission, and rate-limit errors are described in Authorization.