> 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.

# UpdateRecurringLecture

PATCH https://dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D
Content-Type: application/json

Update recurring lecture

This API endpoint allows you to update a recurring lecture by specifying a recurrence rule. The recurrence rule must follow the [iCalendar specification](https://icalendar.org), using the `DTSTART` and `RRULE` elements to define the event's start date and recurrence pattern.

#### Parameters

- rrule: A string defining the start date and recurrence rule, following the iCalendar format. The rule should consist of:
    
    - A `DTSTART` element on the first line, specifying the start date and time of the lecture.
        
    - An `RRULE` element on the second line, specifying the recurrence pattern (e.g., daily, weekly, monthly). be on a separate line, separated by a newline character (\`\\n\`).
        

Each element should be on a separate line, separated by a newline character (`\n`).

**Lecture status**

1: SCHEDULED

2: COMPLETED

3: CANCELLED

4: DELETED

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D:
    patch:
      operationId: update-recurring-lecture
      summary: UpdateRecurringLecture
      description: >-
        Update recurring lecture


        This API endpoint allows you to update a recurring lecture by specifying
        a recurrence rule. The recurrence rule must follow the [iCalendar
        specification](https://icalendar.org), using the `DTSTART` and `RRULE`
        elements to define the event's start date and recurrence pattern.


        #### Parameters


        - rrule: A string defining the start date and recurrence rule, following
        the iCalendar format. The rule should consist of:
            
            - A `DTSTART` element on the first line, specifying the start date and time of the lecture.
                
            - An `RRULE` element on the second line, specifying the recurrence pattern (e.g., daily, weekly, monthly). be on a separate line, separated by a newline character (\`\\n\`).
                

        Each element should be on a separate line, separated by a newline
        character (`\n`).


        **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_UpdateRecurringLecture_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                rrule:
                  type: string
                title:
                  type: string
                duration:
                  type: integer
                classroom:
                  $ref: >-
                    #/components/schemas/DreamclassapiV1CalendarLectureRecurring7Bid7DPatchRequestBodyContentApplicationJsonSchemaClassroom
                classCourse:
                  $ref: >-
                    #/components/schemas/DreamclassapiV1CalendarLectureRecurring7Bid7DPatchRequestBodyContentApplicationJsonSchemaClassCourse
                meetingLink:
                  type: string
                  format: uri
                startDateTime:
                  type: string
                  format: date-time
                meetingPassword:
                  type: string
              required:
                - id
                - rrule
                - title
                - duration
                - classroom
                - classCourse
                - meetingLink
                - startDateTime
                - meetingPassword
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    DreamclassapiV1CalendarLectureRecurring7Bid7DPatchRequestBodyContentApplicationJsonSchemaClassroom:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureRecurring7Bid7DPatchRequestBodyContentApplicationJsonSchemaClassroom
    DreamclassapiV1CalendarLectureRecurring7Bid7DPatchRequestBodyContentApplicationJsonSchemaClassCourse:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureRecurring7Bid7DPatchRequestBodyContentApplicationJsonSchemaClassCourse
    DreamclassapiV1CalendarLectureRecurring7Bid7DPatchResponsesContentApplicationJsonSchemaClassroom:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureRecurring7Bid7DPatchResponsesContentApplicationJsonSchemaClassroom
    DreamclassapiV1CalendarLectureRecurring7Bid7DPatchResponsesContentApplicationJsonSchemaClassCourse:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      title: >-
        DreamclassapiV1CalendarLectureRecurring7Bid7DPatchResponsesContentApplicationJsonSchemaClassCourse
    Calendar_UpdateRecurringLecture_Response_200:
      type: object
      properties:
        id:
          type: integer
        rrule:
          type: string
        title:
          type: string
        duration:
          type: integer
        classroom:
          $ref: >-
            #/components/schemas/DreamclassapiV1CalendarLectureRecurring7Bid7DPatchResponsesContentApplicationJsonSchemaClassroom
        classCourse:
          $ref: >-
            #/components/schemas/DreamclassapiV1CalendarLectureRecurring7Bid7DPatchResponsesContentApplicationJsonSchemaClassCourse
        meetingLink:
          type: string
          format: uri
        startDateTime:
          type: string
          format: date-time
        meetingPassword:
          type: string
      required:
        - id
        - rrule
        - title
        - duration
        - classroom
        - classCourse
        - meetingLink
        - startDateTime
        - meetingPassword
      title: Calendar_UpdateRecurringLecture_Response_200

```

## Examples



**Request**

```json
{
  "id": 12,
  "rrule": "DTSTART;TZID=USA/Pacific:20241101T130000\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1",
  "title": "Introduction to Programming",
  "duration": 60,
  "classroom": {
    "id": 8
  },
  "classCourse": {
    "id": 46
  },
  "meetingLink": "https://example.com/meeting",
  "startDateTime": "2024-11-05T10:10:00",
  "meetingPassword": "password123"
}
```

**Response**

```json
{
  "id": 12,
  "rrule": "DTSTART;TZID=USA/Pacific:20241101T130000\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1",
  "title": "Introduction to Programming",
  "duration": 60,
  "classroom": {
    "id": 8
  },
  "classCourse": {
    "id": 46
  },
  "meetingLink": "https://example.com/meeting",
  "startDateTime": "2024-11-05T10:10:00",
  "meetingPassword": "password123"
}
```

**SDK Code**

```python Calendar_UpdateRecurringLecture_example
import requests

url = "https://https/dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D"

payload = {
    "id": 12,
    "rrule": "DTSTART;TZID=USA/Pacific:20241101T130000
RRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1",
    "title": "Introduction to Programming",
    "duration": 60,
    "classroom": { "id": 8 },
    "classCourse": { "id": 46 },
    "meetingLink": "https://example.com/meeting",
    "startDateTime": "2024-11-05T10:10: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_UpdateRecurringLecture_example
const url = 'https://https/dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D';
const options = {
  method: 'PATCH',
  headers: {
    tenant: '{{tenant}}',
    schoolCode: '{{schoolCode}}',
    'Content-Type': 'application/json'
  },
  body: '{"id":12,"rrule":"DTSTART;TZID=USA/Pacific:20241101T130000\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1","title":"Introduction to Programming","duration":60,"classroom":{"id":8},"classCourse":{"id":46},"meetingLink":"https://example.com/meeting","startDateTime":"2024-11-05T10:10: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_UpdateRecurringLecture_example
package main

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

func main() {

	url := "https://https/dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D"

	payload := strings.NewReader("{\n  \"id\": 12,\n  \"rrule\": \"DTSTART;TZID=USA/Pacific:20241101T130000\\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1\",\n  \"title\": \"Introduction to Programming\",\n  \"duration\": 60,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"https://example.com/meeting\",\n  \"startDateTime\": \"2024-11-05T10:10: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_UpdateRecurringLecture_example
require 'uri'
require 'net/http'

url = URI("https://https/dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D")

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\": 12,\n  \"rrule\": \"DTSTART;TZID=USA/Pacific:20241101T130000\\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1\",\n  \"title\": \"Introduction to Programming\",\n  \"duration\": 60,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"https://example.com/meeting\",\n  \"startDateTime\": \"2024-11-05T10:10:00\",\n  \"meetingPassword\": \"password123\"\n}"

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

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

HttpResponse<String> response = Unirest.patch("https://https/dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D")
  .header("tenant", "{{tenant}}")
  .header("schoolCode", "{{schoolCode}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": 12,\n  \"rrule\": \"DTSTART;TZID=USA/Pacific:20241101T130000\\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1\",\n  \"title\": \"Introduction to Programming\",\n  \"duration\": 60,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"https://example.com/meeting\",\n  \"startDateTime\": \"2024-11-05T10:10:00\",\n  \"meetingPassword\": \"password123\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://https/dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D', [
  'body' => '{
  "id": 12,
  "rrule": "DTSTART;TZID=USA/Pacific:20241101T130000\\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1",
  "title": "Introduction to Programming",
  "duration": 60,
  "classroom": {
    "id": 8
  },
  "classCourse": {
    "id": 46
  },
  "meetingLink": "https://example.com/meeting",
  "startDateTime": "2024-11-05T10:10:00",
  "meetingPassword": "password123"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'schoolCode' => '{{schoolCode}}',
    'tenant' => '{{tenant}}',
  ],
]);

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

```csharp Calendar_UpdateRecurringLecture_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/calendar/lecture/recurring/%7Bid%7D");
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\": 12,\n  \"rrule\": \"DTSTART;TZID=USA/Pacific:20241101T130000\\nRRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1\",\n  \"title\": \"Introduction to Programming\",\n  \"duration\": 60,\n  \"classroom\": {\n    \"id\": 8\n  },\n  \"classCourse\": {\n    \"id\": 46\n  },\n  \"meetingLink\": \"https://example.com/meeting\",\n  \"startDateTime\": \"2024-11-05T10:10:00\",\n  \"meetingPassword\": \"password123\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Calendar_UpdateRecurringLecture_example
import Foundation

let headers = [
  "tenant": "{{tenant}}",
  "schoolCode": "{{schoolCode}}",
  "Content-Type": "application/json"
]
let parameters = [
  "id": 12,
  "rrule": "DTSTART;TZID=USA/Pacific:20241101T130000
RRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20241231T215959;INTERVAL=1",
  "title": "Introduction to Programming",
  "duration": 60,
  "classroom": ["id": 8],
  "classCourse": ["id": 46],
  "meetingLink": "https://example.com/meeting",
  "startDateTime": "2024-11-05T10:10: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/recurring/%7Bid%7D")! 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()
```