> ## Documentation Index
> Fetch the complete documentation index at: https://docs.utage-system.com/llms.txt
> Use this file to discover all available pages before exploring further.

# レッスン更新

> レッスンを更新します。指定したフィールドのみを更新する部分更新です。リクエストに含めなかったフィールドは既存の値が維持されます。
選択肢のある項目（`release_type` / `comment_show_type` / `width` / `background_color`）と `release_type` ごとの条件付き必須は、値を変更する場合にだけ検証します（取得した値をそのまま送り返せます）。
`lesson_group_id` を変更すると、新しいレッスングループの末尾に移動します（位置を指定して移動するときは並び替えを使ってください）。

`elements` は `element_id` で既存の要素と同期します。
- `element_id` あり: 既存要素の部分更新（送ったプロパティだけ変更。`type` は省略可、変更は不可）
- `element_id` なし: 新規要素として追加
- リクエストに含めなかった既存要素: 削除
- 既存要素で `children` を省略: 子要素をそのまま維持（空配列は不可）
- `elements` 自体を省略: 要素を変更しない

参照系プロパティ（`button` の `target_element_id`、`video-chapter` の `related_element_id`、`countdown` / `video` の `show_element_ids` / `hide_element_ids`）はここで設定します。キーを送ったときだけ更新し、`null` または空配列を送ると解除します。参照先が存在しない・削除対象の要素は 422 です。
`memo` 要素を含むレッスンでは、`memo` 要素の順序を変えないでください（受講生が入力したメモは要素の順序で紐づくため、別の `memo` に移ることがあります）。

次の場合は 400 になります。
- 「リッチテキスト」（`type=rich_text`）のレッスン（`bad_request`。一覧の取得と並び替えは可能）
- `type` に既存と異なる値を指定した（`bad_request`。種類は変更できません）
- `release_type=reader_date` へ変更したが、会員サイトの「ログインなしでの閲覧」が「不可」（`bad_request`）
- レッスンで使えない要素タイプを含む（`bad_request`）
- 同じ `element_id` を複数の要素に指定した（`duplicate_element_id`）
- 存在しない `element_id` を指定した（`invalid_element_id`）


`PATCH`

```
https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}/lessons/{lesson_id}
```


## OpenAPI

````yaml PATCH /members/{site_id}/courses/{course_id}/lessons/{lesson_id}
openapi: 3.0.3
info:
  title: UTAGE API
  description: >
    UTAGEのパブリックAPIです。ファネル、メール・LINE配信、会員サイト、イベント・予約、決済、メディアなどのリソースをプログラムから操作できます。


    ## 認証

    すべてのリクエストにAPIキーによるBearer認証が必要です（要素タイプ・LINEメッセージタイプ・配信条件タイプの参照エンドポイントを除く）。


    ```

    Authorization: Bearer {api_key}

    ```


    APIキーはUTAGE管理画面から発行できます。APIキーが未指定・無効・無効化済みの場合、またはアカウントが利用停止中の場合は `401
    Unauthorized`（`error.code` は `unauthorized`）が返されます。


    ## レート制限

    リクエスト数には以下の制限があります。表の値は既定値で、契約内容により異なる場合があります。


    | 分間上限 | 日間上限 |

    |----------|----------|

    | 60リクエスト/分（APIキー単位・暦の1分ごと） | 10,000リクエスト/日（アカウント単位・暦日ごと） |


    レスポンスヘッダーで分間上限の窓が終わる時刻を確認できます（分間の残数と日間の残数はヘッダーに含まれません）。


    | ヘッダー | 説明 |

    |----------|------|

    | X-RateLimit-Limit | 接続元IP単位でAPI全体に掛かる制限の上限値（APIキー単位の分間上限ではありません） |

    | X-RateLimit-Remaining | 接続元IP単位の制限の残りリクエスト数（分間上限の残数ではありません） |

    | X-RateLimit-Reset | APIキー単位の分間上限で、現在の1分間の窓が終わる（次の分が始まる）UNIXタイムスタンプ |


    上限を超えた場合は `429 Too Many Requests`（`error.code` は
    `rate_limit_exceeded`）が返されます。日間上限の超過時は `X-RateLimit-Reset`
    が翌日0:00になります（`X-RateLimit-Limit` / `X-RateLimit-Remaining`
    は超過時も接続元IP単位の値です）。認証不要のエンドポイントと読者作成（`POST
    /accounts/{account_id}/scenarios/{scenario_id}/readers`、`POST
    /accounts/{account_id}/line/friends/{friend_id}/readers`）はレート制限の対象外で、`X-RateLimit-Reset`
    ヘッダーは付きません。


    データを作成するAPIには、これとは別にAPI経由の作成件数の上限があります。超過時は `429` で `total_limit_exceeded` /
    `hourly_limit_exceeded` / `monthly_limit_exceeded`
    が返され、`details.resource_type` に対象のリソース種別が含まれます。


    ## エラーレスポンス

    エラー時は以下の形式で返されます。


    ```json

    {
      "error": {
        "code": "error_code",
        "message": "エラーメッセージ"
      }
    }

    ```


    エラーの種類によっては `error.details`
    に補足情報（バリデーションの項目別エラー、`retry_after`、`resource_type` など）が含まれます。
  version: '1.0'
  contact:
    name: UTAGE サポート
servers:
  - url: https://api.utage-system.com/v1
    description: UTAGE API
security:
  - BearerAuth: []
tags:
  - name: ファネル
    description: ファネルの作成・更新・一覧取得
  - name: ステップ
    description: ファネル内のステップの作成・更新・並び替え・一覧取得
  - name: ページ
    description: ステップ内のページの作成・更新・取得・削除・一覧取得
  - name: 配信アカウント
    description: 配信アカウントの作成・一覧取得
  - name: シナリオ
    description: シナリオの作成・一覧取得
  - name: メディア
    description: 動画・音声・通常メディアの一覧取得・アップロード・名称変更
  - name: 要素タイプ
    description: ファネルページ・レッスン・HTMLメールの要素タイプ定義、LINEメッセージタイプ・配信条件タイプの取得（認証不要）
  - name: ファネル統計
    description: ファネルの集計データ・登録者・登録経路の取得
  - name: 配信メッセージ
    description: 配信メッセージの作成・更新・テスト送信・配信統計、置き換え文字の取得
  - name: 読者
    description: 読者の作成・更新・取得、ラベル・配信履歴・開封/クリック履歴の取得
  - name: LINE
    description: LINE友だち・カスタム送信者・1対1チャット・テンプレート・テンプレートグループ・リッチメニュー・自動応答の操作
  - name: ラベル・共通読者・登録経路
    description: ラベル・共通読者・アクション・登録経路の操作
  - name: 登録経路
    description: ファネルの登録経路・登録経路グループの作成・取得・更新・削除
  - name: ファネルアクション
    description: ファネルアクション（管理画面「アクション設定」）の作成・取得・更新・削除とアクショングループの一覧取得
  - name: 登録フォーム・読者項目
    description: 読者項目と登録フォーム項目の作成・更新・取得・削除・並び替え
  - name: 連携
    description: Googleスプレッドシート連携アカウント・広告連携設定の一覧取得
  - name: 会員サイト
    description: 会員サイトの一覧取得・作成・取得・更新・削除・並び替え
  - name: コース
    description: 会員サイト配下のコースの一覧取得・作成・取得・更新・削除・並び替え
  - name: コースグループ
    description: コースグループの一覧取得・作成・取得・更新・削除
  - name: バンドル
    description: バンドル（受講生に開放するコース・コミュニティグループのセット）の一覧取得・作成・取得・更新・削除・並び替え
  - name: レッスン
    description: 会員サイトのレッスン・レッスングループの操作と、レッスンごと受講状況・受講完了者の取得
  - name: 受講生
    description: 会員サイトの受講生の作成・更新・取得・削除、受講状況・操作履歴の取得、コース・バンドルの登録受講生一覧
  - name: 登録コース・コミュニティ
    description: 受講生のバンドル・単一コース・コミュニティグループへの登録の追加・更新・解除・一覧取得
  - name: コミュニティグループ
    description: 会員サイトのコミュニティグループの一覧取得
  - name: イベント
    description: イベント（セミナー・説明会、個別相談・個別予約）の一覧取得・作成・取得・更新・削除
  - name: 日程
    description: イベントの日程の一覧取得・作成・取得・更新・削除
  - name: 日程設定
    description: 個別相談・個別予約タイプのイベントの日程設定（開催する曜日・時間帯・特定日の開催設定・担当者・日程の表示期間）の取得・更新
  - name: 申込フォーム・申込者項目
    description: イベントの申込フォームの基本項目・申込者項目の取得・更新
  - name: 申込者
    description: イベントの申込者の一覧取得・詳細取得・更新
  - name: イベントグループ
    description: イベントグループ（イベント一覧の「グループ管理」）の作成・更新・一覧取得・削除
  - name: 担当者
    description: 担当者（個別相談・個別予約の「担当者設定」）の作成・更新・一覧取得・削除と連携用リンクの発行・削除
  - name: 商品
    description: 商品の一覧取得・作成・取得・更新・削除・並び替え
  - name: 商品グループ
    description: 商品グループの一覧取得・作成・取得・更新・削除
  - name: 商品詳細
    description: 商品配下の商品詳細（価格・支払方法・決済代行会社・支払回数・購入後の動作・通知設定）の作成・更新・並び替え・取得・削除
  - name: 売上
    description: 売上の一覧・詳細取得、領収書・請求書設定の更新、銀行振込の入金反映、削除、月別・日別売上集計
paths:
  /members/{site_id}/courses/{course_id}/lessons/{lesson_id}:
    patch:
      tags:
        - レッスン
      summary: レッスン更新
      description: >
        レッスンを更新します。指定したフィールドのみを更新する部分更新です。リクエストに含めなかったフィールドは既存の値が維持されます。

        選択肢のある項目（`release_type` / `comment_show_type` / `width` /
        `background_color`）と `release_type`
        ごとの条件付き必須は、値を変更する場合にだけ検証します（取得した値をそのまま送り返せます）。

        `lesson_group_id`
        を変更すると、新しいレッスングループの末尾に移動します（位置を指定して移動するときは並び替えを使ってください）。


        `elements` は `element_id` で既存の要素と同期します。

        - `element_id` あり: 既存要素の部分更新（送ったプロパティだけ変更。`type` は省略可、変更は不可）

        - `element_id` なし: 新規要素として追加

        - リクエストに含めなかった既存要素: 削除

        - 既存要素で `children` を省略: 子要素をそのまま維持（空配列は不可）

        - `elements` 自体を省略: 要素を変更しない


        参照系プロパティ（`button` の `target_element_id`、`video-chapter` の
        `related_element_id`、`countdown` / `video` の `show_element_ids` /
        `hide_element_ids`）はここで設定します。キーを送ったときだけ更新し、`null`
        または空配列を送ると解除します。参照先が存在しない・削除対象の要素は 422 です。

        `memo` 要素を含むレッスンでは、`memo` 要素の順序を変えないでください（受講生が入力したメモは要素の順序で紐づくため、別の
        `memo` に移ることがあります）。


        次の場合は 400 になります。

        - 「リッチテキスト」（`type=rich_text`）のレッスン（`bad_request`。一覧の取得と並び替えは可能）

        - `type` に既存と異なる値を指定した（`bad_request`。種類は変更できません）

        - `release_type=reader_date`
        へ変更したが、会員サイトの「ログインなしでの閲覧」が「不可」（`bad_request`）

        - レッスンで使えない要素タイプを含む（`bad_request`）

        - 同じ `element_id` を複数の要素に指定した（`duplicate_element_id`）

        - 存在しない `element_id` を指定した（`invalid_element_id`）
      operationId: updateMemberLesson
      parameters:
        - $ref: '#/components/parameters/MemberSiteId'
        - $ref: '#/components/parameters/MemberCourseId'
        - $ref: '#/components/parameters/MemberLessonId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberLessonUpdateRequest'
      responses:
        '200':
          description: 更新されたレッスン
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MemberLesson'
        '400':
          description: >-
            リッチテキストのレッスン・種類の変更・`release_type=reader_date`
            とログイン設定の不一致・使えない要素タイプ（`bad_request`）、`element_id`
            の重複（`duplicate_element_id`）、存在しない `element_id`（`invalid_element_id`）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                bad_request:
                  summary: リッチテキストのレッスン
                  value:
                    error:
                      code: bad_request
                      message: リッチテキスト形式のレッスンはAPIで取得・更新・削除できません（一覧の取得と並び替えは可能）
                invalid_element_id:
                  summary: 存在しない element_id
                  value:
                    error:
                      code: invalid_element_id
                      message: '存在しないelement_idが指定されています: 99'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 会員サイト・コース・レッスンが見つかりません（`not_found`）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: not_found
                  message: レッスンが見つかりません
        '422':
          description: >
            バリデーションエラー（`validation_error`）。項目の検証、`lesson_group_id`
            がコース配下に無い、要素の検証（階層構造、定義に無いプロパティ、値の型、選択肢、新規要素の必須プロパティ、`element_id`
            を本来と異なる親の配下に指定、`element_id` 指定要素の `type` 変更、参照先が存在しない・削除対象）で返ります。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: validation_error
                  message: 存在しない、または削除対象のelement_idが参照先に指定されました
                  details:
                    target_element_id: 12
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
components:
  parameters:
    MemberSiteId:
      name: site_id
      in: path
      required: true
      description: 会員サイトID
      schema:
        type: string
    MemberCourseId:
      name: course_id
      in: path
      required: true
      description: コースID
      schema:
        type: string
    MemberLessonId:
      name: lesson_id
      in: path
      required: true
      description: レッスンID
      schema:
        type: string
  schemas:
    MemberLessonUpdateRequest:
      type: object
      description: 指定したフィールドのみ更新する部分更新。`null` を指定できる項目は null で値をクリアします
      properties:
        name:
          type: string
          maxLength: 255
          description: レッスン名
        lesson_group_id:
          type: string
          description: レッスングループID。変更すると新しいグループの末尾に移動します。コース配下に無い ID は 422
        type:
          type: string
          enum:
            - html
          description: 種類。既存と同じ html のみ指定できます（異なる値は 400。種類は変更できません）
        elements:
          type: array
          minItems: 1
          description: >-
            要素の配列。`element_id` で既存要素と同期します（あり=部分更新、なし=新規、含めない既存要素=削除、既存要素の
            `children` 省略=子要素を維持）。省略すると要素は変更しません
          items:
            $ref: '#/components/schemas/MemberLessonElement'
        is_published:
          type: boolean
          description: 'ステータス（true: 公開、false: 下書き）'
        show_title:
          type: boolean
          description: 'ページ上部へのレッスン名の表示（true: 表示する、false: 表示しない）'
        width:
          type: integer
          nullable: true
          description: 最大幅。100（100%）または 600〜2000 の 10 刻み（px）。null でデフォルトに戻します
        background_color:
          type: string
          nullable: true
          description: 背景色（#RRGGBB または
        use_comment:
          type: boolean
          description: 'コメント機能（true: 利用する、false: 利用しない）'
        is_comment_override:
          type: boolean
          description: >-
            コメントの個別設定。コースのコメント設定が「全レッスンで利用する」のとき、true にするとこのレッスンの `use_comment`
            に従います
        comment_text:
          type: string
          nullable: true
          maxLength: 255
          description: 表示文字列（コメント欄の呼称）。null で「コメント」に戻します。`課題` を指定すると「課題を提出する」の表示になります
        comment_show_type:
          type: string
          description: >-
            投稿されたコメントの表示（all: 全て表示する、all_after_post: 投稿後に全て表示する、own:
            自身が投稿したコメントだけ表示する）。取得した既存の値はそのまま送り返せます
        hide_comment_posted_at:
          type: boolean
          description: 'コメント投稿日（true: 表示しない、false: 表示する）'
        comment_default_value:
          type: string
          nullable: true
          maxLength: 65535
          description: 入力欄の初期値。null でクリア
        has_target_persons:
          type: boolean
          description: >-
            受講対象者をコース登録日で指定する（false から true に変える場合は、更新後の
            `target_persons_date_from` / `target_persons_date_to` の少なくとも一方が必要）
        target_persons_date_from:
          type: string
          format: date
          nullable: true
          description: 受講対象者のコース登録日の開始日（YYYY-MM-DD）。null でクリア
        target_persons_date_to:
          type: string
          format: date
          nullable: true
          description: 受講対象者のコース登録日の終了日（YYYY-MM-DD）。null でクリア
        release_type:
          type: string
          description: >-
            開放日(開始日)（immediately / scheduled / scheduled_month / datetime /
            reader_date）。reader_date へ変更できるのは会員サイトの「ログインなしでの閲覧」が「可」（`login_type`
            が optional / none）の場合のみ（それ以外は 400）。取得した既存の値はそのまま送り返せます
        release_day:
          type: integer
          nullable: true
          minimum: 0
          maximum: 9999
          description: 開放までの日数。null でクリア。更新後の release_type が scheduled / reader_date のとき必須
        release_month:
          type: integer
          nullable: true
          minimum: 0
          maximum: 9999
          description: 開放までの月数。null でクリア。更新後の release_type が scheduled_month のとき必須
        release_date:
          type: string
          format: date
          nullable: true
          description: 開放日（YYYY-MM-DD）。null でクリア。更新後の release_type が datetime のとき必須
        release_hour:
          type: integer
          nullable: true
          minimum: 0
          maximum: 23
          description: >-
            開放時刻（0〜23 時）。null でクリア。開放日の設定を変更するとき、更新後の release_type が immediately
            以外なら必須
        action_before_release:
          type: string
          enum:
            - show
            - hide
          description: '開放前の表示（show: 表示する、hide: 表示しない）'
        js_head:
          type: string
          nullable: true
          description: headタグの最後に挿入するJavaScript（scriptタグも含めて記載）。null でクリア
        js_body_top:
          type: string
          nullable: true
          description: bodyタグの最初に挿入するJavaScript（scriptタグも含めて記載）。null でクリア
        js_body:
          type: string
          nullable: true
          description: bodyタグの最後に挿入するJavaScript（scriptタグも含めて記載）。null でクリア
        css:
          type: string
          nullable: true
          description: カスタムCSS（styleタグ不要）。null でクリア
    MemberLesson:
      type: object
      description: レッスンの詳細（作成・取得・更新の応答）
      properties:
        id:
          type: string
          description: レッスンID
        name:
          type: string
          description: レッスン名
        lesson_group_id:
          type: string
          nullable: true
          description: 所属するレッスングループID
        type:
          type: string
          enum:
            - html
          description: 種類。API で扱えるのはコンテンツエディター（html）のみ
        lesson_url:
          type: string
          description: 受講生向けのレッスンページURL
        is_published:
          type: boolean
          description: 'ステータス（true: 公開、false: 下書き）'
        show_title:
          type: boolean
          description: 'ページ上部へのレッスン名の表示（true: 表示する、false: 表示しない）'
        width:
          type: integer
          nullable: true
          description: 最大幅。100（100%）または 600〜2000 の 10 刻み（px）。null はデフォルト
        background_color:
          type: string
          nullable: true
          description: 背景色（#RRGGBB または
        use_comment:
          type: boolean
          description: 'コメント機能（true: 利用する、false: 利用しない）'
        is_comment_override:
          type: boolean
          description: >-
            コメントの個別設定。コースのコメント設定が「全レッスンで利用する」のとき、true ならこのレッスンの `use_comment`
            に従います
        comment_text:
          type: string
          nullable: true
          description: 表示文字列（コメント欄の呼称）。null は「コメント」、`課題` は「課題を提出する」の表示
        comment_show_type:
          type: string
          description: >-
            投稿されたコメントの表示（all: 全て表示する、all_after_post: 投稿後に全て表示する、own:
            自身が投稿したコメントだけ表示する）。管理画面で選べない旧値が返ることがあり、その場合は同じ値をそのまま送り返せます
        hide_comment_posted_at:
          type: boolean
          description: 'コメント投稿日（true: 表示しない、false: 表示する）'
        comment_default_value:
          type: string
          nullable: true
          description: 入力欄の初期値（コメント投稿欄に初期表示するテキスト）
        js_head:
          type: string
          nullable: true
          description: headタグの最後に挿入するJavaScript（scriptタグを含む）
        js_body_top:
          type: string
          nullable: true
          description: bodyタグの最初に挿入するJavaScript（scriptタグを含む）
        js_body:
          type: string
          nullable: true
          description: bodyタグの最後に挿入するJavaScript（scriptタグを含む）
        css:
          type: string
          nullable: true
          description: カスタムCSS（styleタグ不要）
        release_type:
          type: string
          description: >-
            開放日(開始日)（immediately: コースへ登録後すぐに開放、scheduled:
            コースへ登録後、指定した日数経過後に開放、scheduled_month: コースへ登録後、指定した月数経過後に開放、datetime:
            指定した日時に開放、reader_date: アクセス元シナリオの配信基準日時から指定した日数経過後に開放）
        release_day:
          type: integer
          nullable: true
          description: 開放までの日数（release_type が scheduled / reader_date のとき）
        release_month:
          type: integer
          nullable: true
          description: 開放までの月数（release_type が scheduled_month のとき）
        release_date:
          type: string
          nullable: true
          description: 開放日（YYYY-MM-DD。release_type が datetime のとき）
        release_hour:
          type: integer
          nullable: true
          description: 開放時刻（0〜23 時。release_type が immediately 以外のとき）
        action_before_release:
          type: string
          enum:
            - show
            - hide
          description: '開放前の表示（show: 表示する、hide: 表示しない）'
        has_target_persons:
          type: boolean
          description: '受講対象者をコース登録日で指定するか（true: 指定する、false: 指定しない）'
        target_persons_date_from:
          type: string
          nullable: true
          description: 受講対象者のコース登録日の開始日（YYYY-MM-DD）
        target_persons_date_to:
          type: string
          nullable: true
          description: 受講対象者のコース登録日の終了日（YYYY-MM-DD）
        elements:
          type: array
          description: 要素の配列（section > row > col > コンテンツ要素の階層構造。各要素に `element_id` 付き）
          items:
            $ref: '#/components/schemas/MemberLessonElement'
        order:
          type: integer
          description: レッスングループ内の表示順
        created_at:
          type: string
          nullable: true
          description: 作成日時（Y-m-d H:i:s）
        updated_at:
          type: string
          nullable: true
          description: 更新日時（Y-m-d H:i:s）
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード
            message:
              type: string
              description: エラーメッセージ
            details:
              type: object
              nullable: true
              description: >-
                エラーの補足情報（`retry_after` /
                `resource_type`、項目別のエラーメッセージ等）。エラー種別により含まれる場合があります。`422`
                の項目別エラーの値は通常はメッセージの配列ですが、会員サイト更新・コース更新の変更時だけ行う検証では文字列です。
    MemberLessonElement:
      type: object
      description: >
        レッスンの要素1件。`type` / `element_id` / `children`
        以外のキーは要素タイプごとのプロパティで、`properties` で包まず要素の直下にフラットに書きます。

        各要素タイプで使えるプロパティと値は `GET /element-types/lesson/properties`
        の定義（`global_common_properties`、コンテンツ要素は
        `content_common_properties`、要素固有の `properties`）が正です。

        定義に無いプロパティ・型が合わない値・選択肢に無い値・必須プロパティの不足は 422、レッスンで使えない要素タイプは
        400（`bad_request`）になります。応答では値が null のプロパティは省略されます。


        参照系プロパティ（`button` の `target_element_id`、`video-chapter` の
        `related_element_id`、`countdown` / `video` の `show_element_ids` /
        `hide_element_ids`）は、参照先の要素の `element_id`
        で指定します。作成時には指定できず（422）、更新で設定します。


        ```json

        [{
          "type": "section",
          "children": [{
            "type": "row",
            "children": [{
              "type": "col",
              "children": [{
                "type": "text",
                "content": "<p>テキスト</p>"
              }]
            }]
          }]
        }]

        ```
      required:
        - type
      properties:
        type:
          type: string
          description: >-
            要素タイプ名（`GET /element-types/lesson` の `type`）。レイアウト要素は section / row
            / col、コンテンツ要素は text / head / image / image-text / video /
            video-chapter / audio / pdf / button / html / divider / spacer /
            table / accordion / balloon / countdown / memo。更新で `element_id`
            を指定した既存要素では省略できます（変更はできません）
        element_id:
          type: integer
          description: >-
            要素ID（レッスン内で一意の整数）。応答に含まれます。更新で指定すると既存要素の部分更新、省略すると新規要素になります。作成時に送っても無視され（エラーにはなりません）、応答の
            `element_id`（採番された値）が正です
        children:
          type: array
          description: >-
            子要素の配列。レイアウト要素だけが持ち、1件以上必要です（`section` の子は `row`、`row` の子は
            `col`、`col` の子はコンテンツ要素）。コンテンツ要素では省略するか空配列にします。更新で既存要素の `children`
            を省略すると、子要素はそのまま維持されます
          items:
            type: object
      additionalProperties: true
  responses:
    Unauthorized:
      description: 認証エラー。APIキーが未指定・無効・無効化済み、またはアカウントが利用停止中。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: APIキーが無効です
    RateLimitExceeded:
      description: >-
        レート制限超過（`rate_limit_exceeded`）。`X-RateLimit-Reset`
        の時刻（`details.retry_after` がある場合はその日時）以降に再試行してください。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: レート制限を超過しました
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: APIキーをBearerトークンとして指定

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.