> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/managebac/public-rest-apis/v2p3/classes.md).

# Classes

Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students.

## Get all Classes

> Retrieves all classes for the school. Returns class name, class ID, grade, program,\
> subject information, teacher assignments, and any school-defined values. Supports\
> filtering by modification date, deletion date, and archived status. Results are paginated.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"Class":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Class Name."},"description":{"type":"string","description":"Class description."},"language":{"type":"string","description":"Language of Instruction. Receives a language code."},"uniq_id":{"type":"string","description":"Unique ID in ManageBac."},"class_section":{"type":"string","description":"Identifier for a duplicated class/grade."},"start_term_id":{"type":"integer","description":"Academic term ID."},"end_term_id":{"type":"integer","description":"Academic term ID."},"created_at":{"type":"string","description":"Created date; yyyy-mm-dd."},"updated_at":{"type":"string","description":"Updated date; yyyy-mm-dd."},"grade":{"type":"string","description":"Grade name."},"grade_number":{"type":"integer","description":"Grade number."},"applicable_levels":{"type":"array","description":"Applicable Levels.","items":{"type":"string"}},"program":{"type":"string","description":"Program name."},"program_code":{"type":"string","description":"Program code."},"subject_id":{"type":"integer","description":"Subject’s unique ID."},"subject_name":{"type":"string","description":"Subject Name."},"subject_group":{"type":"string","description":"Subject group."},"subject_option":{"type":"string","description":"Subject option."},"lock_memberships":{"type":"string","description":"Lock Memberships."},"archived":{"type":"boolean","description":"Archive Class."},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Subject Name."},"subject_group_id":{"type":"integer","description":"Unique ID in ManageBac."},"subject_group":{"type":"string","description":"Subject group."}}}},"teachers":{"type":"array","items":{"type":"object","properties":{"teacher_id":{"type":"integer","description":"Uniq ID in ManageBac."},"show_on_reports":{"type":"boolean","description":"Determines if teach should be shown on reports."},"teacher_archived":{"type":"boolean","description":"DDetermines if teacher is archived."}}}}}},"Meta":{"type":"object","description":"Pagination metadata included in all list (index) responses.","properties":{"current_page":{"type":"integer","description":"The page number of the current result set, starting from 1."},"total_pages":{"type":"integer","description":"The total number of pages available for this query."},"total_count":{"type":"integer","description":"The total number of records matching the query across all pages."},"per_page":{"type":"integer","description":"The number of records returned per page. Defaults to 100; can be overridden with the per_page query parameter (max 200)."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2p3/classes":{"get":{"summary":"Get all Classes","operationId":"listClasses","tags":["Classes"],"description":"Retrieves all classes for the school. Returns class name, class ID, grade, program,\nsubject information, teacher assignments, and any school-defined values. Supports\nfiltering by modification date, deletion date, and archived status. Results are paginated.\n","parameters":[{"name":"modified_since","in":"query","description":"A timestamp to filter the modification date of results.","required":false,"schema":{"type":"string"}},{"name":"deleted_since","in":"query","description":"A timestamp to filter the deleted date of results.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"An integer defining which page to display.","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"An integer defining the number of records to display per page.","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","description":"A boolean that, if set to True, returns only archived classes.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"classes":{"type":"array","items":{"$ref":"#/components/schemas/Class"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}}}}}}}
```

## Create a class

> Creates a new class in the school. Requires program, grade, subject, language, and term\
> information. Returns the created class details including assigned teachers. The class name\
> is auto-generated from program, subject, grade, and section if not explicitly provided.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"Class":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Class Name."},"description":{"type":"string","description":"Class description."},"language":{"type":"string","description":"Language of Instruction. Receives a language code."},"uniq_id":{"type":"string","description":"Unique ID in ManageBac."},"class_section":{"type":"string","description":"Identifier for a duplicated class/grade."},"start_term_id":{"type":"integer","description":"Academic term ID."},"end_term_id":{"type":"integer","description":"Academic term ID."},"created_at":{"type":"string","description":"Created date; yyyy-mm-dd."},"updated_at":{"type":"string","description":"Updated date; yyyy-mm-dd."},"grade":{"type":"string","description":"Grade name."},"grade_number":{"type":"integer","description":"Grade number."},"applicable_levels":{"type":"array","description":"Applicable Levels.","items":{"type":"string"}},"program":{"type":"string","description":"Program name."},"program_code":{"type":"string","description":"Program code."},"subject_id":{"type":"integer","description":"Subject’s unique ID."},"subject_name":{"type":"string","description":"Subject Name."},"subject_group":{"type":"string","description":"Subject group."},"subject_option":{"type":"string","description":"Subject option."},"lock_memberships":{"type":"string","description":"Lock Memberships."},"archived":{"type":"boolean","description":"Archive Class."},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Subject Name."},"subject_group_id":{"type":"integer","description":"Unique ID in ManageBac."},"subject_group":{"type":"string","description":"Subject group."}}}},"teachers":{"type":"array","items":{"type":"object","properties":{"teacher_id":{"type":"integer","description":"Uniq ID in ManageBac."},"show_on_reports":{"type":"boolean","description":"Determines if teach should be shown on reports."},"teacher_archived":{"type":"boolean","description":"DDetermines if teacher is archived."}}}}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"CreateClass":{"type":"object","properties":{"start_term_id":{"type":"integer","description":"Academic term ID."},"end_term_id":{"type":"integer","description":"Academic term ID."},"subject_id":{"type":"integer","description":"Subject’s unique ID."},"program":{"type":"string","description":"Program code."},"grade_number":{"type":"integer","description":"Grade number."},"name":{"type":"string","description":"Class Name."},"description":{"type":"string","description":"Class description."},"language":{"type":"string","description":"Language of Instruction. Receives a language code."},"uniq_id":{"type":"string","description":"Unique ID in ManageBac."},"class_section":{"type":"string","description":"Identifier for a duplicated class/grade."},"subject_ids":{"type":"array","description":"Subjects unique IDs.","items":{"type":"integer"}},"sl":{"type":"boolean","description":"SL level"},"hl":{"type":"boolean","description":"HL level"},"subject_option":{"description":"Subject option.","oneOf":[{"type":"string","description":"Allowed for Subject that support language level (e.g. Language and literature)."},{"type":"array","description":"Allowed for Subject that support phases.","items":{"type":"string"}}]},"lock_memberships":{"type":"string","description":"Lock Memberships."}}}}},"paths":{"/v2p3/classes":{"post":{"summary":"Create a class","operationId":"createClass","tags":["Classes"],"description":"Creates a new class in the school. Requires program, grade, subject, language, and term\ninformation. Returns the created class details including assigned teachers. The class name\nis auto-generated from program, subject, grade, and section if not explicitly provided.\n","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Class"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","properties":{"subject_ids":{"type":"array","items":{"type":"string"}}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClass"}}},"required":true}}}}}
```

## Get a Class

> Retrieves a single class by its ID. Returns full class details including name, grade,\
> program, subject information, applicable levels, and the IDs of assigned teachers.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"Class":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Class Name."},"description":{"type":"string","description":"Class description."},"language":{"type":"string","description":"Language of Instruction. Receives a language code."},"uniq_id":{"type":"string","description":"Unique ID in ManageBac."},"class_section":{"type":"string","description":"Identifier for a duplicated class/grade."},"start_term_id":{"type":"integer","description":"Academic term ID."},"end_term_id":{"type":"integer","description":"Academic term ID."},"created_at":{"type":"string","description":"Created date; yyyy-mm-dd."},"updated_at":{"type":"string","description":"Updated date; yyyy-mm-dd."},"grade":{"type":"string","description":"Grade name."},"grade_number":{"type":"integer","description":"Grade number."},"applicable_levels":{"type":"array","description":"Applicable Levels.","items":{"type":"string"}},"program":{"type":"string","description":"Program name."},"program_code":{"type":"string","description":"Program code."},"subject_id":{"type":"integer","description":"Subject’s unique ID."},"subject_name":{"type":"string","description":"Subject Name."},"subject_group":{"type":"string","description":"Subject group."},"subject_option":{"type":"string","description":"Subject option."},"lock_memberships":{"type":"string","description":"Lock Memberships."},"archived":{"type":"boolean","description":"Archive Class."},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Subject Name."},"subject_group_id":{"type":"integer","description":"Unique ID in ManageBac."},"subject_group":{"type":"string","description":"Subject group."}}}},"teachers":{"type":"array","items":{"type":"object","properties":{"teacher_id":{"type":"integer","description":"Uniq ID in ManageBac."},"show_on_reports":{"type":"boolean","description":"Determines if teach should be shown on reports."},"teacher_archived":{"type":"boolean","description":"DDetermines if teacher is archived."}}}}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"Record was not found"}}}}},"paths":{"/v2p3/classes/{id}":{"get":{"summary":"Get a Class","operationId":"getClassByID","tags":["Classes"],"description":"Retrieves a single class by its ID. Returns full class details including name, grade,\nprogram, subject information, applicable levels, and the IDs of assigned teachers.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for class.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/Class"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Update a class

> Updates an existing class by its ID. Only a subset of fields can be updated (name,\
> description, levels, subject option, section, uniq\_id, lock\_memberships, archived status).\
> Attempting to update immutable fields (language, start\_term\_id, program, grade\_number, etc.)\
> returns a 422 error listing the allowed parameters.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"Class":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Class Name."},"description":{"type":"string","description":"Class description."},"language":{"type":"string","description":"Language of Instruction. Receives a language code."},"uniq_id":{"type":"string","description":"Unique ID in ManageBac."},"class_section":{"type":"string","description":"Identifier for a duplicated class/grade."},"start_term_id":{"type":"integer","description":"Academic term ID."},"end_term_id":{"type":"integer","description":"Academic term ID."},"created_at":{"type":"string","description":"Created date; yyyy-mm-dd."},"updated_at":{"type":"string","description":"Updated date; yyyy-mm-dd."},"grade":{"type":"string","description":"Grade name."},"grade_number":{"type":"integer","description":"Grade number."},"applicable_levels":{"type":"array","description":"Applicable Levels.","items":{"type":"string"}},"program":{"type":"string","description":"Program name."},"program_code":{"type":"string","description":"Program code."},"subject_id":{"type":"integer","description":"Subject’s unique ID."},"subject_name":{"type":"string","description":"Subject Name."},"subject_group":{"type":"string","description":"Subject group."},"subject_option":{"type":"string","description":"Subject option."},"lock_memberships":{"type":"string","description":"Lock Memberships."},"archived":{"type":"boolean","description":"Archive Class."},"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac."},"name":{"type":"string","description":"Subject Name."},"subject_group_id":{"type":"integer","description":"Unique ID in ManageBac."},"subject_group":{"type":"string","description":"Subject group."}}}},"teachers":{"type":"array","items":{"type":"object","properties":{"teacher_id":{"type":"integer","description":"Uniq ID in ManageBac."},"show_on_reports":{"type":"boolean","description":"Determines if teach should be shown on reports."},"teacher_archived":{"type":"boolean","description":"DDetermines if teacher is archived."}}}}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"UpdateClass":{"type":"object","properties":{"archived":{"type":"boolean","description":"Archive Class."},"name":{"type":"string","description":"Class Name."},"description":{"type":"string","description":"Class description."},"language":{"type":"string","description":"Language of Instruction. Receives a language code."},"uniq_id":{"type":"string","description":"Unique ID in ManageBac."},"class_section":{"type":"string","description":"Identifier for a duplicated class/grade."},"subject_ids":{"type":"array","description":"Subjects unique IDs.","items":{"type":"integer"}},"sl":{"type":"boolean","description":"SL level"},"hl":{"type":"boolean","description":"HL level"},"subject_option":{"description":"Subject option.","oneOf":[{"type":"string","description":"Allowed for Subject that support language level (e.g. Language and literature)."},{"type":"array","description":"Allowed for Subject that support phases.","items":{"type":"string"}}]},"lock_memberships":{"type":"string","description":"Lock Memberships."}}}}},"paths":{"/v2p3/classes/{id}":{"patch":{"summary":"Update a class","operationId":"updateClass","tags":["Classes"],"description":"Updates an existing class by its ID. Only a subset of fields can be updated (name,\ndescription, levels, subject option, section, uniq_id, lock_memberships, archived status).\nAttempting to update immutable fields (language, start_term_id, program, grade_number, etc.)\nreturns a 422 error listing the allowed parameters.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for class.","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Class"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"allowed_params":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClass"}}},"required":true}}}}}
```

## Add Students to a Class

> Adds one or more students to a class, specified by student IDs and class ID. Students\
> must belong to the same school. Returns a status indicating success.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p3/classes/{id}/add_students":{"post":{"summary":"Add Students to a Class","operationId":"addStudentsToClass","tags":["Classes"],"description":"Adds one or more students to a class, specified by student IDs and class ID. Students\nmust belong to the same school. Returns a status indicating success.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for class.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"student_ids":{"description":"An array of student IDs to add to the class.","type":"array","items":{"type":"integer"}}},"required":["student_ids"]}}}}}}}}
```

## Remove Students from a Class

> Removes one or more students from a class, specified by student IDs and class ID.\
> Returns a status indicating success.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p3/classes/{id}/remove_students":{"post":{"summary":"Remove Students from a Class","operationId":"removeStudentsFromClass","tags":["Classes"],"description":"Removes one or more students from a class, specified by student IDs and class ID.\nReturns a status indicating success.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for class.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"student_ids":{"description":"An array of student IDs to remove from the class.","type":"array","items":{"type":"integer"}}},"required":["student_ids"]}}}}}}}}
```

## Get Class terms details

> Retrieves the academic terms associated with a class. Returns term name, start and end\
> dates, and the parent academic year for each term. Supports filtering by academic year ID\
> and by active-only status.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"Record was not found"}}}}},"paths":{"/v2p3/classes/{id}/terms":{"get":{"summary":"Get Class terms details","operationId":"getClassTerms","tags":["Classes"],"description":"Retrieves the academic terms associated with a class. Returns term name, start and end\ndates, and the parent academic year for each term. Supports filtering by academic year ID\nand by active-only status.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for class.","required":true,"schema":{"type":"integer"}},{"name":"academic_year_id","in":"query","description":"Filter results by unique identifier for an academic year.","required":false,"schema":{"type":"integer"}},{"name":"active_only","in":"query","description":"Filter results by active academic terms only.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Add Teachers to a Class

> Adds one or more teachers to a class by their teacher IDs. If a teacher was previously removed\
> (soft-deleted), they are restored. Teachers who are already active members are silently skipped.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P3","version":"v2p3"},"tags":[{"name":"Classes","description":"Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p3/classes/{class_id}/teachers/add_teachers":{"post":{"summary":"Add Teachers to a Class","operationId":"addTeachersToClass","tags":["Classes"],"description":"Adds one or more teachers to a class by their teacher IDs. If a teacher was previously removed\n(soft-deleted), they are restored. Teachers who are already active members are silently skipped.\n","parameters":[{"name":"class_id","in":"path","description":"The unique numeric identifier of the class.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teacher_ids":{"description":"An array of teacher IDs to add to the class.","type":"array","items":{"type":"integer"}}},"required":["teacher_ids"]}}}}}}}}
```
