For the complete documentation index, see llms.txt. This page is also available as Markdown.

Memberships

A membership defines the kind of association between a class and a student or teacher

Get Students for a Class

get
/v2p1/classes/{class_id}/students

This endpoint retrieves all students belonging to a class as specified by class ID.

The response includes an array of student IDs and, for classes with subject levels enabled, a mapping of student IDs to their level (SL or HL).

Authorizations
AuthorizationstringRequired

OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as Bearer <token>.

Path parameters
class_idintegerRequired

Unique identifier for class.

Query parameters
include_archived_studentsbooleanOptionalDefault: false
student_idsinteger[]Optional

List of student ids. Accepts repeated params or a comma-separated string.

Example: student_ids=1,2,3 OR student_ids[]=1&student_ids[]=2
Responses
200

Success

application/json
get/v2p1/classes/{class_id}/students
GET /v2p1/classes/{class_id}/students HTTP/1.1
Host: api.managebac.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "student_ids": [
    10193652
  ],
  "student_levels": {
    "10193652": "SL"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "per_page": 100
  }
}

Get all Memberships

get
/v2p1/memberships

Retrieves all class memberships for the school, including students, teachers, and administrators. Each record contains the class ID, user ID, user role, and timestamps. Results can be filtered by class IDs, user IDs, modification date, deletion date, and date range.

Authorizations
AuthorizationstringRequired

OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as Bearer <token>.

Query parameters
class_ids[]integer[]Optional

The list of class IDs to select membership for

modified_sincestringOptional

A timestamp to filter the modification date of results.

deleted_sincestringOptional

A timestamp to filter the deletion date of results.

pagestringOptional

An integer defining which page to display.

per_pagestringOptional

An integer defining the number of records to display per page.

user_ids[]integer[]Optional

An integer list of users ids to filter by.

user_idsinteger[]Optional

An integer list of users ids to filter by.

class_happens_onstring · dateOptional

A date param to filter by start term and end term date range.

student_idsinteger[]Optional

List of student ids. Accepts repeated params or a comma-separated string.

Example: student_ids=1,2,3 OR student_ids[]=1&student_ids[]=2
Responses
200

successful

application/json
get/v2p1/memberships
GET /v2p1/memberships HTTP/1.1
Host: api.managebac.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "memberships": [
    {
      "id": 922,
      "user_id": 2012,
      "level": 1,
      "created_at": "2021-06-28T12:39:52.000Z",
      "updated_at": "2021-06-28T12:39:52.000Z",
      "class_id": 899,
      "user_email": "301-cdavis@skimia.biz",
      "role": "Student"
    },
    {
      "id": 923,
      "user_id": 2013,
      "created_at": "2021-06-28T12:39:52.000Z",
      "updated_at": "2021-06-28T12:39:52.000Z",
      "class_id": 900,
      "user_email": "302-jgray@tagcat.org",
      "role": "Student"
    },
    {
      "id": 924,
      "user_id": 2014,
      "created_at": "2021-06-28T12:39:52.000Z",
      "updated_at": "2021-06-28T12:39:52.000Z",
      "class_id": 901,
      "user_email": "303-lpatterson@plambee.gov",
      "role": "Student"
    }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 3,
    "per_page": 100
  }
}

Get a Student's memberships

get
/v2p1/students/{id}/memberships

Retrieves all memberships for a student, organized by type: classes, groups, and year groups. Each membership includes its ID, name, and archived status. Classes also include uniq_id, start_term_id, and end_term_id. Year groups include the program field. By default only active (non-archived) memberships are returned.

Authorizations
AuthorizationstringRequired

OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as Bearer <token>.

Path parameters
idintegerRequired

Unique identifier of a student.

Query parameters
archivedbooleanOptional

Filter memberships by archived status. When false (default), returns only active memberships. When true, returns only archived memberships.

Default: false
Responses
200

Success

application/json
get/v2p1/students/{id}/memberships
GET /v2p1/students/{id}/memberships HTTP/1.1
Host: api.managebac.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "memberships": {
    "classes": [
      {
        "id": 1,
        "uniq_id": "text",
        "name": "text",
        "archived": true,
        "start_term_id": 1,
        "end_term_id": 1
      }
    ],
    "groups": [
      {
        "id": 1,
        "name": "text",
        "archived": true
      }
    ],
    "year_groups": [
      {
        "id": 1,
        "name": "text",
        "program": "text",
        "archived": true
      }
    ]
  }
}

Get Teachers for a Class

get
/v2p1/classes/{class_id}/teachers

Retrieves all teachers assigned to a class, including their archive status and report visibility settings. Each teacher record includes a show_on_reports flag indicating whether the teacher appears on printed reports, and timestamps for when they first joined the class and when their record was last updated. Soft-deleted teacher assignments are excluded.

Authorizations
AuthorizationstringRequired

OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as Bearer <token>.

Path parameters
class_idintegerRequired

The unique numeric identifier of the class.

Responses
200

Success

application/json
get/v2p1/classes/{class_id}/teachers
GET /v2p1/classes/{class_id}/teachers HTTP/1.1
Host: api.managebac.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "teachers": [
    {
      "id": 123,
      "show_on_reports": true,
      "teacher_archived": false,
      "first_joined_at": "2025-06-01T12:40:00.000Z",
      "updated_at": "2025-06-01T13:25:15.000Z"
    },
    {
      "id": 234,
      "show_on_reports": false,
      "teacher_archived": true,
      "first_joined_at": "2025-06-01T13:40:30.000Z",
      "updated_at": "2025-06-01T14:15:00.000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 2,
    "per_page": 100
  }
}

Remove Teachers from a Class

delete
/v2p1/classes/{class_id}/teachers/remove_teachers

Removes one or more teachers from a class by their teacher IDs. This performs a soft delete of the teacher-class assignment. Teachers who are not currently assigned are silently skipped.

Authorizations
AuthorizationstringRequired

OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as Bearer <token>.

Path parameters
class_idintegerRequired

The unique numeric identifier of the class.

Body
teacher_idsinteger[]Required

An array of teacher IDs to remove from the class.

Responses
200

Success

application/json
delete/v2p1/classes/{class_id}/teachers/remove_teachers
DELETE /v2p1/classes/{class_id}/teachers/remove_teachers HTTP/1.1
Host: api.managebac.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "teacher_ids": [
    1
  ]
}
{
  "status": "ok"
}

Last updated