---
title: "Update lesson"
method: PATCH
path: "/lessons/{id}"
tags: ["Lessons"]
---

# Update lesson

`PATCH /lessons/{id}`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/lessons/{id}`
- Auth: API key in header `Authorization`

Updates a lesson's fields

## Path parameters

- `id` string, required

## Request body

- LessonRequest
  - `title` string: Lesson title (defaults to "Lesson N")
  - `lesson_type` string: Lesson type (defaults to `multimedia`)
  - `html_content` string, nullable: Rich-text lesson body
  - `video_url` string, nullable: URL of the lesson's video
  - `is_published` boolean

## Response `200`

Lesson updated

- Lesson
  - `id` string, required
  - `object` string, required
  - `title` string, required
  - `position` integer, required
  - `lesson_type` string, required
  - `published` boolean, required
  - `published_at` string, date-time, nullable, required
  - `html_content` string, nullable, required
  - `chapter` string, required
  - `video_url` string, nullable, required
  - `files` object[], required
    - `id` string, required
    - `filename` string, nullable, required
    - `content_type` string, nullable
    - `byte_size` integer, required
    - `url` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.
- `500`: Internal server error

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) · [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/2219f18ad651?raw)
