Memberships
A membership defines the kind of association between a class and a student or teacher
This endpoint retrieves all students belonging to a class as specified by class ID.
Unique identifier for class.
Success
GET /v2/classes/{class_id}/students HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
Success
{
"student_ids": [
10193652
],
"student_levels": {
"10193652": "SL"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"per_page": 100
}
}
This endpoint updates students belonging to a class as specified by class ID.
Unique identifier for class.
Success
PATCH /v2/classes/{class_id}/students HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"students": [
{
"id": 123,
"level": "HL"
}
]
}
Success
{
"students": [
{
"id": 1,
"status": "ok"
},
{
"id": 2,
"status": "unprocessable_entity",
"errors": {
"level": [
"is not included in the list"
]
}
},
{
"id": 3,
"status": "not_found"
}
]
}
This endpoint adds students, as specified by student ID/s, to a class as specified by class ID.
Unique identifier for class.
An array of student IDs to add to the class.
Success
POST /v2/classes/{id}/add_students HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"student_ids": [
1
]
}
Success
{
"status": "ok"
}
This endpoint removes students from a class, as specified by student ID/s and class ID.
Unique identifier for class.
An array of student IDs to remove from the class.
Success
POST /v2/classes/{id}/remove_students HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"student_ids": [
1
]
}
Success
{
"status": "ok"
}
This endpoint retrieves all members for each class (students, teachers and admin). It returns for each user the class ID, user ID, user role in the class and other details.
The list of class IDs to select membership for
A timestamp to filter the modification date of results.
A timestamp to filter the deletion date of results.
An integer defining which page to display.
An integer defining the number of records to display per page.
An integer list of users ids to filter by.
An integer list of users ids to filter by.
A date param to filter by start term and end term date range.
successful
GET /v2/memberships HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
successful
{
"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": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"role": "Student"
}
],
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 3,
"per_page": 100
}
}
This endpoint retrieves details of all student memberships.
Unique identifier of a student.
Boolean value to filter memberships by archived status.
false
Success
GET /v2/students/{id}/memberships HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
Success
{
"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
}
]
}
}
This endpoint retrieves all Teachers belonging to a Class as specified by class ID.
Unique identifier for class.
Success
GET /v2/classes/{class_id}/teachers HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
Success
{
"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
}
}
Completely replaces the given class's teacher memberships according to the provided payload. Specifying a payload of an empty array [] will remove all teachers. In addition to defining memberships, also enables or disables Show on Reports.
Unique identifier for class.
Success
Bad Request
PUT /v2/classes/{class_id}/teachers HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"teachers": [
{
"id": 123,
"show_on_reports": false
}
]
}
{
"teachers": [
{
"index": 0,
"status": "unprocessable_entity",
"errors": {
"id": [
"can't be blank"
]
}
},
{
"index": 1,
"id": 1,
"status": "not_found"
},
{
"index": 2,
"id": 2,
"status": "ok"
}
]
}
This endpoint removes teachers, as specified by teacher ID/s, from a class as specified by class ID.
Unique identifier for class.
An array of teacher IDs to remove from the class.
Success
DELETE /v2/classes/{class_id}/teachers/remove_teachers HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"teacher_ids": [
1
]
}
Success
{
"status": "ok"
}
Was this helpful?