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

# Update a calendar schedule

PUT https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/{scheduleId}
Content-Type: application/json

Replaces a calendar schedule's name, date range, cycle days, audiences, reporting term, and active state, then returns the refreshed resource.

Reference: https://docs.schoolset.io/api-reference/school-set-api/calendar-schedules/update-calendar-schedule

## Authentication

- `Authorization` header (bearer token, required) — The signed-in SchoolSet user token sent by the frontend.

## Request

### Path parameters

- `scheduleId` (integer, required) — Calendar schedule identifier.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required)
- `days` (list of ApiV2ReportCardsCalendarSchedulesScheduleIdPutRequestBodyContentApplicationJsonSchemaDaysItems, required)
- `report_card_term_id` (integer, optional, nullable)
- `effective_start_date` (date, optional, nullable)
- `effective_end_date` (date, optional, nullable)
- `cycle_length_weeks` (integer, optional)
- `active` (boolean, optional)
- `audiences` (list of ApiV2ReportCardsCalendarSchedulesScheduleIdPutRequestBodyContentApplicationJsonSchemaAudiencesItems, optional)

## Response

### 200

The calendar schedule was updated and returned.

- `status` (string, optional)
- `message` (string, optional)
- `data` (ApiV2ReportCardsCalendarSchedulesScheduleIdPutResponsesContentApplicationJsonSchemaData, optional)

## Errors

### 401 Unauthorized Error

Authentication is required to update a calendar schedule.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 403 Forbidden Error

The user lacks edit-calendar permission in the active school.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 404 Not Found Error

The calendar schedule or referenced term does not exist in the active school.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 422 Unprocessable Entity Error

The schedule name, cycle days, audiences, dates, or term failed validation.

- `message` (string, required)
- `errors` (map from string to list of string, required)

## Types

### ApiV2ReportCardsCalendarSchedulesScheduleIdPutRequestBodyContentApplicationJsonSchemaDaysItems

- `week_in_cycle` (integer, required)
- `day_of_week` (integer, required)
- `is_open` (boolean, required)
- `start_time` (string, optional, nullable)
- `end_time` (string, optional, nullable)

### ApiV2ReportCardsCalendarSchedulesScheduleIdPutRequestBodyContentApplicationJsonSchemaAudiencesItems

- `audience_type` (enum, required)
  - Allowed values: `grade`, `department`
- `audience_id` (integer, required)

### ApiV2ReportCardsCalendarSchedulesScheduleIdPutResponsesContentApplicationJsonSchemaData

- `id` (integer, optional)
- `name` (string, optional)
- `active` (boolean, optional)
- `days` (list of ApiV2ReportCardsCalendarSchedulesScheduleIdPutResponsesContentApplicationJsonSchemaDataDaysItems, optional)
- `audiences` (list of ApiV2ReportCardsCalendarSchedulesScheduleIdPutResponsesContentApplicationJsonSchemaDataAudiencesItems, optional)

### ApiV2ReportCardsCalendarSchedulesScheduleIdPutResponsesContentApplicationJsonSchemaDataDaysItems

### ApiV2ReportCardsCalendarSchedulesScheduleIdPutResponsesContentApplicationJsonSchemaDataAudiencesItems

## Examples

**Request**

```json
{
  "name": "Revised timetable",
  "days": [
    {
      "week_in_cycle": 1,
      "day_of_week": 1,
      "is_open": true,
      "start_time": "08:00",
      "end_time": "15:00"
    }
  ],
  "cycle_length_weeks": 1,
  "active": true,
  "audiences": [
    {
      "audience_type": "grade",
      "audience_id": 7
    }
  ]
}
```

**Response**

```json
{
  "status": "success",
  "message": "Updated successfully.",
  "data": {
    "id": 31,
    "name": "Revised timetable",
    "active": true,
    "days": [
      {}
    ],
    "audiences": [
      {}
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31"

payload = {
    "name": "Revised timetable",
    "days": [
        {
            "week_in_cycle": 1,
            "day_of_week": 1,
            "is_open": True,
            "start_time": "08:00",
            "end_time": "15:00"
        }
    ],
    "cycle_length_weeks": 1,
    "active": True,
    "audiences": [
        {
            "audience_type": "grade",
            "audience_id": 7
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Revised timetable","days":[{"week_in_cycle":1,"day_of_week":1,"is_open":true,"start_time":"08:00","end_time":"15:00"}],"cycle_length_weeks":1,"active":true,"audiences":[{"audience_type":"grade","audience_id":7}]}'
};

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

```go
package main

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

func main() {

	url := "https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31"

	payload := strings.NewReader("{\n  \"name\": \"Revised timetable\",\n  \"days\": [\n    {\n      \"week_in_cycle\": 1,\n      \"day_of_week\": 1,\n      \"is_open\": true,\n      \"start_time\": \"08:00\",\n      \"end_time\": \"15:00\"\n    }\n  ],\n  \"cycle_length_weeks\": 1,\n  \"active\": true,\n  \"audiences\": [\n    {\n      \"audience_type\": \"grade\",\n      \"audience_id\": 7\n    }\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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
require 'uri'
require 'net/http'

url = URI("https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Revised timetable\",\n  \"days\": [\n    {\n      \"week_in_cycle\": 1,\n      \"day_of_week\": 1,\n      \"is_open\": true,\n      \"start_time\": \"08:00\",\n      \"end_time\": \"15:00\"\n    }\n  ],\n  \"cycle_length_weeks\": 1,\n  \"active\": true,\n  \"audiences\": [\n    {\n      \"audience_type\": \"grade\",\n      \"audience_id\": 7\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.put("https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Revised timetable\",\n  \"days\": [\n    {\n      \"week_in_cycle\": 1,\n      \"day_of_week\": 1,\n      \"is_open\": true,\n      \"start_time\": \"08:00\",\n      \"end_time\": \"15:00\"\n    }\n  ],\n  \"cycle_length_weeks\": 1,\n  \"active\": true,\n  \"audiences\": [\n    {\n      \"audience_type\": \"grade\",\n      \"audience_id\": 7\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31', [
  'body' => '{
  "name": "Revised timetable",
  "days": [
    {
      "week_in_cycle": 1,
      "day_of_week": 1,
      "is_open": true,
      "start_time": "08:00",
      "end_time": "15:00"
    }
  ],
  "cycle_length_weeks": 1,
  "active": true,
  "audiences": [
    {
      "audience_type": "grade",
      "audience_id": 7
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Revised timetable\",\n  \"days\": [\n    {\n      \"week_in_cycle\": 1,\n      \"day_of_week\": 1,\n      \"is_open\": true,\n      \"start_time\": \"08:00\",\n      \"end_time\": \"15:00\"\n    }\n  ],\n  \"cycle_length_weeks\": 1,\n  \"active\": true,\n  \"audiences\": [\n    {\n      \"audience_type\": \"grade\",\n      \"audience_id\": 7\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Revised timetable",
  "days": [
    [
      "week_in_cycle": 1,
      "day_of_week": 1,
      "is_open": true,
      "start_time": "08:00",
      "end_time": "15:00"
    ]
  ],
  "cycle_length_weeks": 1,
  "active": true,
  "audiences": [
    [
      "audience_type": "grade",
      "audience_id": 7
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://ssuccessv2.com/app/api/v2/report-cards/calendar-schedules/31")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```