---
title: "PATCH /v1/courses/{courseId}/courseWorkMaterials/{id}"
method: PATCH
path: "/v1/courses/{courseId}/courseWorkMaterials/{id}"
tags: ["courses"]
---

# PATCH /v1/courses/{courseId}/courseWorkMaterials/{id}

`PATCH /v1/courses/{courseId}/courseWorkMaterials/{id}`

Updates one or more fields of a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work material has already been deleted. * `NOT_FOUND` if the requested course or course work material does not exist

## Path parameters

- `courseId` string, required
- `id` string, required

## Query parameters

- `updateMask` string

## Request body

- CourseWorkMaterial — Course work material created by a teacher for students of the course
  - `alternateLink` string — Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
  - `state` 'COURSEWORK_MATERIAL_STATE_UNSPECIFIED' | 'PUBLISHED' | 'DRAFT' | 'DELETED' — Status of this course work material. If unspecified, the default state is `DRAFT`.
  - `materials` Material[] — Additional materials. A course work material must have no more than 20 material items.
    - `driveFile` SharedDriveFile — Drive file that is used as material for course work.
      - `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.
      - `shareMode` 'UNKNOWN_SHARE_MODE' | 'VIEW' | 'EDIT' | 'STUDENT_COPY' — Mechanism by which students access the Drive item.
    - `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.
    - `notebook` NotebookLmNotebook — NotebookLM Notebook link.
      - `url` string — URL that can be used to access the Notebook.
      - `id` string — Notebook resource id.
      - `title` string — Title of the Notebook.
    - `gem` GeminiGem — Gemini Gem link.
      - `url` string — URL that can be used to access the Gem.
      - `id` string — Gems resource id.
      - `title` string — Title of the Gem.
    - `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.
  - `updateTime` string, google-datetime — Timestamp of the most recent change to this course work material. Read-only.
  - `courseId` string — Identifier of the course. Read-only.
  - `description` string — Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.
  - `topicId` string — Identifier for the topic that this course work material is associated with. Must match an existing topic in the course.
  - `individualStudentsOptions` IndividualStudentsOptions — Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
    - `studentIds` string[] — Identifiers for the students that have access to the coursework/announcement.
  - `title` string — Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
  - `id` string — Classroom-assigned identifier of this course work material, unique per course. Read-only.
  - `creationTime` string, google-datetime — Timestamp when this course work material was created. Read-only.
  - `scheduledTime` string, google-datetime — Optional timestamp when this course work material is scheduled to be published.
  - `assigneeMode` 'ASSIGNEE_MODE_UNSPECIFIED' | 'ALL_STUDENTS' | 'INDIVIDUAL_STUDENTS' — Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`.
  - `creatorUserId` string — Identifier for the user that created the course work material. 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)
