> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidoc.dreamclass.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidoc.dreamclass.io/_mcp/server.

# UpdateSingleLecture

PATCH https://dreamclassapi/v1/calendar/lecture/single
Content-Type: application/json

Update single lecture

**Lecture status**

1: SCHEDULED

2: COMPLETED

3: CANCELLED

4: DELETED

Reference: https://apidoc.dreamclass.io/dream-class-api/calendar/update-single-lecture

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/calendar/lecture/single:
    patch:
      operationId: update-single-lecture
      summary: UpdateSingleLecture
      description: |-
        Update single lecture

        **Lecture status**

        1: SCHEDULED

        2: COMPLETED

        3: CANCELLED

        4: DELETED
      tags:
        - subpackage_calendar
      parameters:
        - name: tenant
          in: header
          required: false
          schema:
            type: string
        - name: schoolCode
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Calendar_UpdateSingleLecture_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                title:
                  type: string
                status:
                  type: integer
                duration:
                  type: integer
                classroom:
                  $ref: >-
                    #/components/schemas/DreamclassapiV1CalendarLectureSinglePatchRequestBodyContentApplicationJsonSchemaClassroom
                classCourse:
                  $ref: >-
                    #/components/schemas/DreamclassapiV1CalendarLectureSinglePatchRequestBodyContentApplicationJsonSchemaClassCourse
                meetingLink:
                  type: string
                  format: uri
                publicNotes:
                  type: string
                scheduledAt:
                  type: string
                  format: date
                privateNotes:
                  type: string
                startDateTime:
                  type: string
                  format: date-time
                meetingPassword:
                  type: string
              required:
                - id
                - title
                - status
                - duration
                - classroom
                - classCourse
                - meetingLink
                - publicNotes
                - scheduledAt
                - privateNotes
                - startDateTime
                - meetingPassword
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    DreamclassapiV1CalendarLectureSinglePatchRequestBodyContentApplicationJsonSchemaClassroom:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureSinglePatchRequestBodyContentApplicationJsonSchemaClassroom
    DreamclassapiV1CalendarLectureSinglePatchRequestBodyContentApplicationJsonSchemaClassCourse:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureSinglePatchRequestBodyContentApplicationJsonSchemaClassCourse
    DreamclassapiV1CalendarLectureSinglePatchResponsesContentApplicationJsonSchemaClassroom:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureSinglePatchResponsesContentApplicationJsonSchemaClassroom
    DreamclassapiV1CalendarLectureSinglePatchResponsesContentApplicationJsonSchemaClassCourse:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureSinglePatchResponsesContentApplicationJsonSchemaClassCourse
    Calendar_UpdateSingleLecture_Response_200:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        status:
          type: integer
        duration:
          type: integer
        classroom:
          $ref: >-
            #/components/schemas/DreamclassapiV1CalendarLectureSinglePatchResponsesContentApplicationJsonSchemaClassroom
        classCourse:
          $ref: >-
            #/components/schemas/DreamclassapiV1CalendarLectureSinglePatchResponsesContentApplicationJsonSchemaClassCourse
        meetingLink:
          type: string
          format: uri
        publicNotes:
          type: string
        scheduledAt:
          type: string
          format: date
        privateNotes:
          type: string
        startDateTime:
          type: string
          format: date-time
        meetingPassword:
          type: string
      required:
        - id
        - title
        - status
        - duration
        - classroom
        - classCourse
        - meetingLink
        - publicNotes
        - scheduledAt
        - privateNotes
        - startDateTime
        - meetingPassword
      title: Calendar_UpdateSingleLecture_Response_200

```

## Examples



**Request**

```json
{
  "id": 10,
  "title": "Sample Lecture",
  "status": 1,
  "duration": 90,
  "classroom": {
    "id": 8
  },
  "classCourse": {
    "id": 46
  },
  "meetingLink": "http://example.com/meeting",
  "publicNotes": "These are public notes.",
  "scheduledAt": "2024-11-08",
  "privateNotes": "These are private notes.",
  "startDateTime": "2024-11-08T10:00:00",
  "meetingPassword": "password123"
}
```

**Response**

```json
{
  "id": 10,
  "title": "Sample Lecture",
  "status": 1,
  "duration": 90,
  "classroom": {
    "id": 8
  },
  "classCourse": {
    "id": 46
  },
  "meetingLink": "http://example.com/meeting",
  "publicNotes": "These are public notes.",
  "scheduledAt": "2024-11-08",
  "privateNotes": "These are private notes.",
  "startDateTime": "2024-11-08T10:00:00",
  "meetingPassword": "password123"
}
```

**SDK Code**

```python Calendar_UpdateSingleLecture_example
import requests

url = "https://https/dreamclassapi/v1/calendar/lecture/single"

payload = {
    "id": 10,
    "title": "Sample Lecture",
    "status": 1,
    "duration": 90,
    "classroom": { "id": 8 },
    "classCourse": { "id": 46 },
    "meetingLink": "http://example.com/meeting",
    "publicNotes": "These are public notes.",
    "scheduledAt": "2024-11-08",
    "privateNotes": "These are private notes.",
    "startDateTime": "2024-11-08T10:00:00",
    "meetingPassword": "password123"
}
headers = {
    "tenant": "{{tenant}}",
    "schoolCode": "{{schoolCode}}",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Calendar_UpdateSingleLecture_example
const url = 'https://https/dreamclassapi/v1/calendar/lecture/single';
const options = {
  method: 'PATCH',
  headers: {
    tenant: '{{tenant}}',
    schoolCode: '{{schoolCode}}',
    'Content-Type': 'application/json'
  },
  body: '{"id":10,"title":"Sample Lecture","status":1,"duration":90,"classroom":{"id":8},"classCourse":{"id":46},"meetingLink":"http://example.com/meeting","publicNotes":"These are public notes.","scheduledAt":"2024-11-08","privateNotes":"These are private notes.","startDateTime":"2024-11-08T10:00:00","meetingPassword":"password123"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Calendar_UpdateSingleLecture_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/dreamclassapi/v1/calendar/lecture/single"

	payload := strings.NewReader("{\n  \"id\": 10,\n  \"title\": \"Sample Lecture\",\n  \"status\": 1,\n  \"duration\": 90,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"http://example.com/meeting\",\n  \"publicNotes\": \"These are public notes.\",\n  \"scheduledAt\": \"2024-11-08\",\n  \"privateNotes\": \"These are private notes.\",\n  \"startDateTime\": \"2024-11-08T10:00:00\",\n  \"meetingPassword\": \"password123\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("tenant", "{{tenant}}")
	req.Header.Add("schoolCode", "{{schoolCode}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Calendar_UpdateSingleLecture_example
require 'uri'
require 'net/http'

url = URI("https://https/dreamclassapi/v1/calendar/lecture/single")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["tenant"] = '{{tenant}}'
request["schoolCode"] = '{{schoolCode}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"id\": 10,\n  \"title\": \"Sample Lecture\",\n  \"status\": 1,\n  \"duration\": 90,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"http://example.com/meeting\",\n  \"publicNotes\": \"These are public notes.\",\n  \"scheduledAt\": \"2024-11-08\",\n  \"privateNotes\": \"These are private notes.\",\n  \"startDateTime\": \"2024-11-08T10:00:00\",\n  \"meetingPassword\": \"password123\"\n}"

response = http.request(request)
puts response.read_body
```

```java Calendar_UpdateSingleLecture_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://https/dreamclassapi/v1/calendar/lecture/single")
  .header("tenant", "{{tenant}}")
  .header("schoolCode", "{{schoolCode}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": 10,\n  \"title\": \"Sample Lecture\",\n  \"status\": 1,\n  \"duration\": 90,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"http://example.com/meeting\",\n  \"publicNotes\": \"These are public notes.\",\n  \"scheduledAt\": \"2024-11-08\",\n  \"privateNotes\": \"These are private notes.\",\n  \"startDateTime\": \"2024-11-08T10:00:00\",\n  \"meetingPassword\": \"password123\"\n}")
  .asString();
```

```php Calendar_UpdateSingleLecture_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://https/dreamclassapi/v1/calendar/lecture/single', [
  'body' => '{
  "id": 10,
  "title": "Sample Lecture",
  "status": 1,
  "duration": 90,
  "classroom": {
    "id": 8
  },
  "classCourse": {
    "id": 46
  },
  "meetingLink": "http://example.com/meeting",
  "publicNotes": "These are public notes.",
  "scheduledAt": "2024-11-08",
  "privateNotes": "These are private notes.",
  "startDateTime": "2024-11-08T10:00:00",
  "meetingPassword": "password123"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'schoolCode' => '{{schoolCode}}',
    'tenant' => '{{tenant}}',
  ],
]);

echo $response->getBody();
```

```csharp Calendar_UpdateSingleLecture_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/calendar/lecture/single");
var request = new RestRequest(Method.PATCH);
request.AddHeader("tenant", "{{tenant}}");
request.AddHeader("schoolCode", "{{schoolCode}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": 10,\n  \"title\": \"Sample Lecture\",\n  \"status\": 1,\n  \"duration\": 90,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"http://example.com/meeting\",\n  \"publicNotes\": \"These are public notes.\",\n  \"scheduledAt\": \"2024-11-08\",\n  \"privateNotes\": \"These are private notes.\",\n  \"startDateTime\": \"2024-11-08T10:00:00\",\n  \"meetingPassword\": \"password123\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Calendar_UpdateSingleLecture_example
import Foundation

let headers = [
  "tenant": "{{tenant}}",
  "schoolCode": "{{schoolCode}}",
  "Content-Type": "application/json"
]
let parameters = [
  "id": 10,
  "title": "Sample Lecture",
  "status": 1,
  "duration": 90,
  "classroom": ["id": 8],
  "classCourse": ["id": 46],
  "meetingLink": "http://example.com/meeting",
  "publicNotes": "These are public notes.",
  "scheduledAt": "2024-11-08",
  "privateNotes": "These are private notes.",
  "startDateTime": "2024-11-08T10:00:00",
  "meetingPassword": "password123"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dreamclassapi/v1/calendar/lecture/single")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```