---
title: "PUT /v1/courses/{id}"
method: PUT
path: "/v1/courses/{id}"
tags: ["courses"]
---

# PUT /v1/courses/{id}

`PUT /v1/courses/{id}`

Updates a course. Note: Unlike other fields, `levels` is not cleared if omitted from the request. The `UpdateCourse` method only modifies `levels` if it is explicitly provided; otherwise, the existing value is preserved. Use the `PatchCourse` method to clear the `levels` field. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrl

## Path parameters

- `id` string, required

## Request body

- Course — A Course in Classroom.
  - `descriptionHeading` string — Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
  - `calendarId` string — The Calendar ID for a calendar that all course members can see, to which Classroom adds events for course work and announcements in the course. The Calendar for a course is created asynchronously when the course is set to `CourseState.ACTIVE` for the first time (at creation time or when it is updated to `ACTIVE` through the UI or the API). The Calendar ID will not be populated until the creation process is completed. Read-only.
  - `gradebookSettings` GradebookSettings — The gradebook settings for a course. See the [help center article](https://support.google.com/edu/classroom/answer/9184995) for details.
    - `calculationType` 'CALCULATION_TYPE_UNSPECIFIED' | 'TOTAL_POINTS' | 'WEIGHTED_CATEGORIES' — Indicates how the overall grade is calculated.
    - `displaySetting` 'DISPLAY_SETTING_UNSPECIFIED' | 'SHOW_OVERALL_GRADE' | 'HIDE_OVERALL_GRADE' | 'SHOW_TEACHERS_ONLY' — Indicates who can see the overall grade..
    - `gradeCategories` GradeCategory[] — Grade categories that are available for coursework in the course.
      - `id` string — ID of the grade category.
      - `weight` integer — The weight of the category average as part of overall average. A weight of 12.34% is represented as 123400 (100% is 1,000,000). The last two digits should always be zero since we use two decimal precision. Only applicable when grade calculation type is WEIGHTED_CATEGORIES.
      - `name` string — Name of the grade category.
      - `defaultGradeDenominator` integer — Default value of denominator. Only applicable when grade calculation type is TOTAL_POINTS.
  - `id` string — Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask results in an error.
  - `teacherGroupEmail` string — The email address of a Google group containing all teachers of the course. This group does not accept email and can only be used for permissions. Read-only.
  - `creationTime` string, google-datetime — Creation time of the course. Specifying this field in a course update mask results in an error. Read-only.
  - `enrollmentCode` string — Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only.
  - `courseGroupEmail` string — The email address of a Google group containing all members of the course. This group does not accept email and can only be used for permissions. Read-only.
  - `guardiansEnabled` boolean — Whether or not guardian notifications are enabled for this course. Read-only.
  - `room` string — Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
  - `subject` string — Optional. The subject of the course.
  - `courseMaterialSets` CourseMaterialSet[] — Sets of materials that appear on the "about" page of this course. Read-only.
    - `materials` CourseMaterial[] — Materials attached to this set.
      - `driveFile` DriveFile — Representation of a Google Drive file.
        - `alternateLink` string — URL that can be used to access the Drive item. Read-only.
        - `thumbnailUrl` string — URL of a thumbnail image of the Drive item. Read-only.
        - `title` string — Title of the Drive item. Read-only.
        - `id` string — Drive API resource ID.
      - `youTubeVideo` YouTubeVideo — YouTube video item.
        - `title` string — Title of the YouTube video. Read-only.
        - `alternateLink` string — URL that can be used to view the YouTube video. Read-only.
        - `thumbnailUrl` string — URL of a thumbnail image of the YouTube video. Read-only.
        - `id` string — YouTube API resource ID.
      - `link` Link — URL item.
        - `url` string — URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters.
        - `thumbnailUrl` string — URL of a thumbnail image of the target URL. Read-only.
        - `title` string — Title of the target of the URL. Read-only.
      - `form` Form — Google Forms item.
        - `title` string — Title of the Form. Read-only.
        - `formUrl` string — URL of the form.
        - `thumbnailUrl` string — URL of a thumbnail image of the Form. Read-only.
        - `responseUrl` string — URL of the form responses document. Only set if responses have been recorded and only when the requesting user is an editor of the form. Read-only.
    - `title` string — Title for this set.
  - `section` string — Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
  - `description` string — Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
  - `levels` string — Optional. Levels for the course. Examples: "9th grade", "Middle school", "4th - 5th", "K-2", "3000". If set, this field must be a valid UTF-8 string and fewer than 1000 characters. This field can only be cleared using the `PatchCourse` method.
  - `courseState` 'COURSE_STATE_UNSPECIFIED' | 'ACTIVE' | 'ARCHIVED' | 'PROVISIONED' | 'DECLINED' | 'SUSPENDED' — State of the course. If unspecified, the default state is `PROVISIONED`.
  - `updateTime` string, google-datetime — Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only.
  - `name` string — Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
  - `alternateLink` string — Absolute link to this course in the Classroom web UI. Read-only.
  - `teacherFolder` DriveFolder — Representation of a Google Drive folder.
    - `id` string — Drive API resource ID.
    - `alternateLink` string — URL that can be used to access the Drive folder. Read-only.
    - `title` string — Title of the Drive folder. Read-only.
  - `ownerId` string — The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Admins can also specify this field in a patch course request to transfer ownership. In other contexts, it is read-only.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/classroom.md) · [All operations](https://skmtc.net/google/apis/classroom/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/classroom/versions/1b98f151d40b/schema)
