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

# POST /v1/courses/{courseId}/students

`POST /v1/courses/{courseId}/students`

Adds a user as a student of a course. Domain administrators are permitted to [directly add](https://developers.google.com/workspace/classroom/guides/manage-users) users within their domain as students to courses within their domain. Students are permitted to add themselves to a course using an enrollment code. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a student or teacher in the course.

## Path parameters

- `courseId` string, required

## Query parameters

- `enrollmentCode` string

## Request body

- Student — Student in a course.
  - `studentWorkFolder` 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.
  - `userId` string — Identifier of the user. When specified as a parameter of a request, this 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
  - `profile` UserProfile — Global information for a user.
    - `id` string — Identifier of the user. Read-only.
    - `emailAddress` string — Email address of the user. Must request `https://www.googleapis.com/auth/classroom.profile.emails` scope for this field to be populated in a response body. Read-only.
    - `permissions` GlobalPermission[] — Global permissions of the user. Read-only.
      - `permission` 'PERMISSION_UNSPECIFIED' | 'CREATE_COURSE' — Permission value.
    - `verifiedTeacher` boolean — Represents whether a Google Workspace for Education user's domain administrator has explicitly verified them as being a teacher. This field is always false if the user is not a member of a Google Workspace for Education domain. Read-only
    - `name` Name — Details of the user's name.
      - `familyName` string — The user's last name. Read-only.
      - `givenName` string — The user's first name. Read-only.
      - `fullName` string — The user's full name formed by concatenating the first and last name values. Read-only.
    - `photoUrl` string — URL of user's profile photo. Must request `https://www.googleapis.com/auth/classroom.profile.photos` scope for this field to be populated in a response body. Read-only.
  - `courseId` string — Identifier of the course. 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)
