- [HTTP request](https://developers.google.com/workspace/classroom/reference/rest/v1/courses/updateGradingPeriodSettings#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/classroom/reference/rest/v1/courses/updateGradingPeriodSettings#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/workspace/classroom/reference/rest/v1/courses/updateGradingPeriodSettings#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/classroom/reference/rest/v1/courses/updateGradingPeriodSettings#body.request_body)
- [Response body](https://developers.google.com/workspace/classroom/reference/rest/v1/courses/updateGradingPeriodSettings#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/classroom/reference/rest/v1/courses/updateGradingPeriodSettings#body.aspect)
- [Try it!](https://developers.google.com/workspace/classroom/reference/rest/v1/courses/updateGradingPeriodSettings#try-it)

Updates grading period settings of a course.

Individual grading periods can be added, removed, or modified using this method.

The requesting user and course owner must be eligible to modify Grading Periods. For details, see [licensing requirements](https://developers.google.com/workspace/classroom/grading-periods/manage-grading-periods#licensing_requirements).

This method returns the following error codes:

- `PERMISSION_DENIED` if the requesting user is not permitted to modify the grading period settings in a course or for [access errors](https://developers.google.com/workspace/classroom/reference/Access.Errors):
  - UserIneligibleToUpdateGradingPeriodSettings
- `INVALID_ARGUMENT` if the request is malformed.
- `NOT_FOUND` if the requested course does not exist.

### HTTP request

`PATCH https://classroom.googleapis.com/v1/courses/{courseId}/gradingPeriodSettings`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `courseId` | `string` Required. The identifier of the course. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Mask that identifies which fields in the GradingPeriodSettings to update. The GradingPeriodSettings `gradingPeriods` list will be fully replaced by the grading periods specified in the update request. For example: - Grading periods included in the list without an ID are considered additions, and a new ID will be assigned when the request is made. - Grading periods that currently exist, but are missing from the request will be considered deletions. - Grading periods with an existing ID and modified data are considered edits. Unmodified data will be left as is. - Grading periods included with an unknown ID will result in an error. The following fields may be specified: - `gradingPeriods` - `applyToExistingCoursework` This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| `previewVersion` | ``enum (`https://developers.google.com/workspace/classroom/reference/rest/v1/PreviewVersion`)`` Optional. The preview version of the API. This must be set in order to access new API capabilities made available to developers in the Preview Program. |

### Request body

The request body contains an instance of `https://developers.google.com/workspace/classroom/reference/rest/v1/GradingPeriodSettings`.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/workspace/classroom/reference/rest/v1/GradingPeriodSettings`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/classroom.courses`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).