---
title: "POST /v1/courses/{courseId}/courseWork/{id}:modifyAssignees"
method: POST
path: "/v1/courses/{courseId}/courseWork/{id}:modifyAssignees"
tags: ["courses"]
---

# POST /v1/courses/{courseId}/courseWork/{id}:modifyAssignees

`POST /v1/courses/{courseId}/courseWork/{id}:modifyAssignees`

Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. * `FAILED_PRECONDITION` for the following request error: * EmptyAssignees

## Path parameters

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

## Request body

- ModifyCourseWorkAssigneesRequest — Request to modify assignee mode and options of a coursework.
  - `assigneeMode` 'ASSIGNEE_MODE_UNSPECIFIED' | 'ALL_STUDENTS' | 'INDIVIDUAL_STUDENTS' — Mode of the coursework describing whether it will be assigned to all students or specified individual students.
  - `modifyIndividualStudentsOptions` ModifyIndividualStudentsOptions — Contains fields to add or remove students from a course work or announcement where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`.
    - `removeStudentIds` string[] — IDs of students to be removed from having access to this coursework/announcement.
    - `addStudentIds` string[] — IDs of students to be added as having access to this coursework/announcement.

## 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)
