canonical: https://jentic.com/apis/googleapis.com/classroom

# Google Classroom API

The Google Classroom API gives schools, education-tech vendors, and content publishers programmatic access to courses, rosters, coursework, announcements, submissions, grades, and add-on attachments inside Google Classroom. It supports both teacher and student perspectives via OAuth, manages course aliases for SIS sync, and exposes coursework state transitions including turn-in, return, and reclaim. It is the backbone for SIS-Classroom integrations and add-ons that embed inside the Classroom stream.

## For AI agents

Manage Google Classroom courses, rosters, coursework, announcements, and submissions across teacher and student flows.

## Scope

Does not host video meetings, manage Workspace user accounts, or store attachment file contents - use for Google Classroom course, roster, coursework, and submission operations only.

## Capabilities

- Create and update Classroom courses and manage course aliases for SIS sync
- Enroll, list, and remove students and teachers in a course
- Post announcements and coursework with attached materials and due dates
- Read and grade student submissions and return assignments to students
- Manage add-on attachments that surface third-party content inside the Classroom stream
- List, mark, and reclaim coursework on behalf of students

## Use cases

### SIS-to-Classroom Roster Sync

School districts sync rosters from a Student Information System into Google Classroom by creating courses with stable course aliases and reconciling student and teacher membership nightly. The aliases endpoints let the SIS use its own ids while keeping Classroom in sync. Most integrations use a service account with domain-wide delegation to act on behalf of teachers.

Example prompt: Create a course with id stub via POST /v1/courses, then POST /v1/courses/{courseId}/aliases with alias=d:district_id_12345 and add a teacher via /v1/courses/{courseId}/teachers.

### Curriculum Publishing

Education-tech vendors push pre-built lessons, quizzes, and reading assignments into a teacher's Classroom course as coursework with attached Drive resources or YouTube links. The API supports scheduled publication and per-student materials. This eliminates teachers re-creating content manually each term.

Example prompt: POST /v1/courses/{courseId}/courseWork with title="Week 3 Reading", workType=ASSIGNMENT, dueDate, and a Drive attachment.

### Grading and Feedback Loops

Schools build grading dashboards that read student submissions, set assigned grades, and return work to students at scale. The submissions endpoints expose state transitions (TURNED_IN, RETURNED, RECLAIMED) and allow updates to draftGrade and assignedGrade with patch masks. Teachers see results immediately in their Classroom UI.

Example prompt: PATCH /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id} with assignedGrade=85 then POST :return.

### AI Agent Teaching Assistant via Jentic

An AI agent through Jentic acts as a teaching assistant - listing pending submissions, suggesting feedback drafts for the teacher to review, posting announcements, and creating follow-up assignments. Jentic isolates the Workspace OAuth credentials so the agent never holds the teacher's refresh token directly.

Example prompt: Through Jentic, search classroom_courses_announcements_create, load schema, and execute it for course 12345 with text "Reminder: project due Friday".

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/courses | Create a Classroom course |
| GET | /v1/courses | List courses for the caller |
| POST | /v1/courses/{courseId}/aliases | Create an external alias for a course |
| POST | /v1/courses/{courseId}/announcements | Post an announcement to a course |
| POST | /v1/courses/{courseId}/courseWork | Create coursework (assignment, material, or question) |
| GET | /v1/courses/{courseId}/announcements | List announcements in a course |

## Key resources

- **Courses** — Create, list, update, and archive Classroom courses
- **Course Aliases** — Map external ids (SIS) to Classroom courses
- **Students and Teachers** — Manage course rosters
- **Coursework** — Create assignments, materials, and questions
- **Student Submissions** — Read, grade, return, and reclaim student work
- **Announcements** — Post and update stream announcements
- **Add-on Attachments** — Attach third-party add-on content to Classroom items

## Why Jentic

- **Setup:** Wiring the Google Classroom API by hand means standing up Workspace OAuth or a service account across the classroom scopes, refreshing scoped access tokens, and sequencing course, roster, coursework, and submission calls yourself. Through Jentic you install once, import the Google Classroom API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** The API puts the course in the URL path (/v1/courses/{courseId}/courseWork, /v1/courses/{courseId}/announcements), so a rule can pin your agent to one course: it can post announcements and coursework there and nowhere else. You choose the operations it may call, so ones like managing aliases are not included unless you add them.
- **Credential handling:** Your Workspace OAuth credentials or service account key with classroom scopes are stored once, encrypted, by your own Jentic One instance and injected at execution time. The agent receives only short-lived access tokens and the refresh token and service account JSON never enter its prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a Classroom assignment', and Jentic returns the courses courseWork create operation with its parameter schema, including workType and submissionModificationMode enums, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Google Drive API** — Store the documents and resources attached to Classroom coursework.
- **Google Calendar API** — Schedule lessons and due dates that surface alongside Classroom coursework.
- **Google Forms API** — Build quizzes that can be attached as Classroom coursework.

## FAQ

### What authentication does the Google Classroom API use?

It uses OAuth 2.0 with one or more classroom.* scopes, scoped per resource (courses, rosters, coursework, announcements). Service accounts with domain-wide delegation are common for SIS sync. Through Jentic, the credential is stored encrypted in your Jentic One instance and the agent receives only short-lived scoped access tokens.

### Can I create a Classroom course via the API?

Yes. POST /v1/courses with name, ownerId, and optionally description and section. Add a stable external id by POSTing /v1/courses/{courseId}/aliases with an alias starting with d: for domain-scoped aliases or p: for project-scoped aliases.

### What are the rate limits for the Google Classroom API?

Google enforces per-project quotas (typically thousands of read requests per minute and hundreds of writes) and per-user limits to prevent abuse. Coursework creation and submission patch operations sit under the lower per-user quota, so batch where possible and back off on 429.

### How do I post an announcement through Jentic?

Use the Jentic search query "post announcement to Google Classroom" to discover the courses.announcements.create operation, load its schema, and execute it with the courseId and the text body. Run pip install jentic to get started.

### Can the API grade and return assignments?

Yes. PATCH a studentSubmission with assignedGrade and an updateMask, then POST :return on the submission to push the grade and feedback back to the student. The student sees the result in the Classroom UI immediately.

### Is the Google Classroom API free?

It is free for Google Workspace for Education customers. There is no per-call charge from Google, though some scopes require admin approval before they can be used by third-party apps.

### Can I limit what my agent is allowed to do with the Google Classroom API?

Yes. Because Jentic One is self-hosted, you set the rules that decide which Classroom operations and credentials your agent may use. Since the API puts the course in the URL path, such as /v1/courses/{courseId}/announcements and /v1/courses/{courseId}/courseWork, a rule can pin your agent to a single course so it can post announcements and coursework there and nowhere else. You also pick the exact operations it may call, so higher-risk ones like managing course aliases stay out of reach unless you explicitly add them.
