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

# PATCH /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}

`PATCH /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}`

Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

## Path parameters

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

## Query parameters

- `updateMask` string

## Request body

- StudentSubmission — Student submission for course work. `StudentSubmission` items are generated when a `CourseWork` item is created. Student submissions that have never been accessed (i.e. with `state` = NEW) may not have a creation time or update time.
  - `multipleChoiceSubmission` MultipleChoiceSubmission — Student work for a multiple-choice question.
    - `answer` string — Student's select choice.
  - `id` string — Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work. Read-only.
  - `creationTime` string, google-datetime — Creation time of this submission. This may be unset if the student has not accessed this item. Read-only.
  - `assignmentSubmission` AssignmentSubmission — Student work for an assignment.
    - `attachments` Attachment[] — Attachments added by the student. Drive files that correspond to materials with a share mode of STUDENT_COPY may not exist yet if the student has not accessed the assignment in Classroom. Some attachment metadata is only populated if the requesting user has permission to access it. Identifier and alternate_link fields are always available, but others (for example, title) may not be.
      - `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.
      - `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.
      - `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.
  - `courseWorkType` 'COURSE_WORK_TYPE_UNSPECIFIED' | 'ASSIGNMENT' | 'SHORT_ANSWER_QUESTION' | 'MULTIPLE_CHOICE_QUESTION' — Type of course work this submission is for. Read-only.
  - `submissionHistory` SubmissionHistory[] — The history of the submission (includes state and grade histories). Read-only.
    - `stateHistory` StateHistory — The history of each state this submission has been in.
      - `actorUserId` string — The teacher or student who made the change.
      - `state` 'STATE_UNSPECIFIED' | 'CREATED' | 'TURNED_IN' | 'RETURNED' | 'RECLAIMED_BY_STUDENT' | 'STUDENT_EDITED_AFTER_TURN_IN' — The workflow pipeline stage.
      - `stateTimestamp` string, google-datetime — When the submission entered this state.
    - `gradeHistory` GradeHistory — The history of each grade on this submission.
      - `gradeChangeType` 'UNKNOWN_GRADE_CHANGE_TYPE' | 'DRAFT_GRADE_POINTS_EARNED_CHANGE' | 'ASSIGNED_GRADE_POINTS_EARNED_CHANGE' | 'MAX_POINTS_CHANGE' — The type of grade change at this time in the submission grade history.
      - `actorUserId` string — The teacher who made the grade change.
      - `maxPoints` number, double — The denominator of the grade at this time in the submission grade history.
      - `pointsEarned` number, double — The numerator of the grade at this time in the submission grade history.
      - `gradeTimestamp` string, google-datetime — When the grade of the submission was changed.
  - `draftRubricGrades` object — Pending rubric grades based on the rubric's criteria. This map is empty if there is no rubric attached to this course work or if a rubric is attached, but no grades have been set on any criteria. Entries are only populated for grades that have been set. Key: The rubric's criterion ID. Read-only.
  - `alternateLink` string — Absolute link to the submission in the Classroom web UI. Read-only.
  - `state` 'SUBMISSION_STATE_UNSPECIFIED' | 'NEW' | 'CREATED' | 'TURNED_IN' | 'RETURNED' | 'RECLAIMED_BY_STUDENT' — State of this submission. Read-only.
  - `assignedGrade` number, double — Optional grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This may be modified only by course teachers.
  - `associatedWithDeveloper` boolean — Whether this student submission is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
  - `userId` string — Identifier for the student that owns this submission. Read-only.
  - `updateTime` string, google-datetime — Last update time of this submission. This may be unset if the student has not accessed this item. Read-only.
  - `late` boolean — Whether this submission is late. Read-only.
  - `assignedRubricGrades` object — Assigned rubric grades based on the rubric's Criteria. This map is empty if there is no rubric attached to this course work or if a rubric is attached, but no grades have been set on any Criteria. Entries are only populated for grades that have been set. Key: The rubric's criterion ID. Read-only.
  - `courseId` string — Identifier of the course. Read-only.
  - `courseWorkId` string — Identifier for the course work this corresponds to. Read-only.
  - `shortAnswerSubmission` ShortAnswerSubmission — Student work for a short answer question.
    - `answer` string — Student response to a short-answer question.
  - `draftGrade` number, double — Optional pending grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This is only visible to and modifiable by course teachers.

## Response `200`

Successful response

---

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