REST Resource: invitations

Resource: Invitation

An invitation to join a course.

JSON representation
{
  "id": string,
  "userId": string,
  "courseId": string,
  "role": enum (CourseRole)
}
Fields
id

string

Identifier assigned by Classroom.

Read-only.

userId

string

Identifier of the invited user.

When specified as a parameter of a request, this identifier can be set to one of the following:

  • the numeric identifier for the user
  • the email address of the user
  • the string literal "me", indicating the requesting user
courseId

string

Identifier of the course to invite the user to.

role

enum (CourseRole)

Role to invite the user to have. Must not be COURSE_ROLE_UNSPECIFIED.

CourseRole

Possible roles a user may be invite to have.

Enums
COURSE_ROLE_UNSPECIFIED No course role.
STUDENT Student in the course.
TEACHER Teacher of the course.
OWNER Owner of the course.

Methods

accept

Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course.

create

Creates an invitation.

delete

Deletes an invitation.

get

Returns an invitation.

list

Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request.