Use the REST API to interact with GitHub Classroom.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /assignments/{assignment_id}
Warning
Closing down notice: This operation is closing down and will be removed on August 28, 2026.
For more information, see the GitHub Classroom sunset notice.
Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
accept (string)application/vnd.github+json is recommended.assignment_id (integer) (required)200 - OK
404 - Resource not found
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/assignments/ASSIGNMENT_ID
Response schema (Status: 200):
id: required, integerpublic_repo: required, booleantitle: required, stringtype: required, string, enum: individual, groupinvite_link: required, stringinvitations_enabled: required, booleanslug: required, stringstudents_are_repo_admins: required, booleanfeedback_pull_requests_enabled: required, booleanmax_teams: required, integer or nullmax_members: required, integer or nulleditor: required, stringaccepted: required, integersubmitted: required, integerpassing: required, integerlanguage: required, stringdeadline: required, string or null, format: date-timestarter_code_repository: required, Simple Classroom Repository:
id: required, integerfull_name: required, stringhtml_url: required, string, format: urinode_id: required, stringprivate: required, booleandefault_branch: required, stringclassroom: required, Classroom:
id: required, integername: required, stringarchived: required, booleanorganization: required, Organization Simple for Classroom:
id: required, integerlogin: required, stringnode_id: required, stringhtml_url: required, string, format: uriname: required, string or nullavatar_url: required, stringurl: required, stringGET /assignments/{assignment_id}/accepted_assignments
Warning
Closing down notice: This operation is closing down and will be removed on August 28, 2026.
For more information, see the GitHub Classroom sunset notice.
Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
accept (string)application/vnd.github+json is recommended.assignment_id (integer) (required)
The unique identifier of the classroom assignment.
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
200 - OK
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/assignments/ASSIGNMENT_ID/accepted_assignments
Response schema (Status: 200):
Array of Classroom Accepted Assignment:
id: required, integersubmitted: required, booleanpassing: required, booleancommit_count: required, integergrade: required, stringstudents: required, array of Simple Classroom User:
id: required, integerlogin: required, stringavatar_url: required, string, format: urihtml_url: required, string, format: urirepository: required, Simple Classroom Repository:
id: required, integerfull_name: required, stringhtml_url: required, string, format: urinode_id: required, stringprivate: required, booleandefault_branch: required, stringassignment: required, Simple Classroom Assignment:
id: required, integerpublic_repo: required, booleantitle: required, stringtype: required, string, enum: individual, groupinvite_link: required, stringinvitations_enabled: required, booleanslug: required, stringstudents_are_repo_admins: required, booleanfeedback_pull_requests_enabled: required, booleanmax_teams: integer or nullmax_members: integer or nulleditor: required, stringaccepted: required, integersubmitted: required, integerpassing: required, integerlanguage: required, stringdeadline: required, string or null, format: date-timeclassroom: required, Simple Classroom:
id: required, integername: required, stringarchived: required, booleanurl: required, stringGET /assignments/{assignment_id}/grades
Warning
Closing down notice: This operation is closing down and will be removed on August 28, 2026.
For more information, see the GitHub Classroom sunset notice.
Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
accept (string)application/vnd.github+json is recommended.assignment_id (integer) (required)200 - OK
404 - Resource not found
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/assignments/ASSIGNMENT_ID/grades
Response schema (Status: 200):
Array of Classroom Assignment Grade:
assignment_name: required, stringassignment_url: required, stringstarter_code_url: required, stringgithub_username: required, stringroster_identifier: required, stringstudent_repository_name: required, stringstudent_repository_url: required, stringsubmission_timestamp: required, stringpoints_awarded: required, integerpoints_available: required, integergroup_name: stringGET /classrooms
Warning
Closing down notice: This operation is closing down and will be removed on August 28, 2026.
For more information, see the GitHub Classroom sunset notice.
Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms.
accept (string)application/vnd.github+json is recommended.page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
200 - OK
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/classrooms
Response schema (Status: 200):
Array of Simple Classroom:
id: required, integername: required, stringarchived: required, booleanurl: required, stringGET /classrooms/{classroom_id}
Warning
Closing down notice: This operation is closing down and will be removed on August 28, 2026.
For more information, see the GitHub Classroom sunset notice.
Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom.
accept (string)application/vnd.github+json is recommended.classroom_id (integer) (required)200 - OK
404 - Resource not found
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/classrooms/CLASSROOM_ID
Response schema (Status: 200):
id: required, integername: required, stringarchived: required, booleanorganization: required, Organization Simple for Classroom:
id: required, integerlogin: required, stringnode_id: required, stringhtml_url: required, string, format: uriname: required, string or nullavatar_url: required, stringurl: required, stringGET /classrooms/{classroom_id}/assignments
Warning
Closing down notice: This operation is closing down and will be removed on August 28, 2026.
For more information, see the GitHub Classroom sunset notice.
Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.
accept (string)application/vnd.github+json is recommended.classroom_id (integer) (required)
The unique identifier of the classroom.
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
200 - OK
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/classrooms/CLASSROOM_ID/assignments
Response schema (Status: 200):
Array of Simple Classroom Assignment:
id: required, integerpublic_repo: required, booleantitle: required, stringtype: required, string, enum: individual, groupinvite_link: required, stringinvitations_enabled: required, booleanslug: required, stringstudents_are_repo_admins: required, booleanfeedback_pull_requests_enabled: required, booleanmax_teams: integer or nullmax_members: integer or nulleditor: required, stringaccepted: required, integersubmitted: required, integerpassing: required, integerlanguage: required, stringdeadline: required, string or null, format: date-timeclassroom: required, Simple Classroom:
id: required, integername: required, stringarchived: required, booleanurl: required, string