---
title: "POST /v1/invitations"
method: POST
path: "/v1/invitations"
tags: ["invitations"]
---

# POST /v1/invitations

`POST /v1/invitations`

Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for access errors. * `NOT_FOUND` if the course or the user does not exist. * `FAILED_PRECONDITION`: * if the requested user's account is disabled. * if the user already has this role or a role with greater permissions. * for the following request errors: * IneligibleOwner * `ALREADY_EXISTS` if an invitation for the specified user and course already exists.

## Request body

- Invitation — An invitation to join a course.
  - `role` 'COURSE_ROLE_UNSPECIFIED' | 'STUDENT' | 'TEACHER' | 'OWNER' — Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`.
  - `courseId` string — Identifier of the course to invite the user to.
  - `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

## 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/revisions/1b98f151d40b/schema)
