Create Batch
Creates a batch for a course, with one class per subject (curriculum) and the tutor for each. Learners are then enrolled into the batch.
POST
/masterbatchCreate Batch
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/masterbatch' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"class_name":"IIT JEE Foundation Batch - March 2026","tutor_id":"1025","organization_id":45,"start_date":"09 Mar 2026","end_date":"30 Jun 2026","courses_array":[{"course_id":23,"batch_name":"Physics for IIT JEE - Mechanics Module","tutor_id":"1025"},{"course_id":24,"batch_name":"Chemistry for IIT JEE - Organic Chemistry","tutor_id":"1032"},{"course_id":236,"batch_name":"Mathematics for IIT JAM - Algebra & Calculus","tutor_id":"1041"}],"bundle_id":5012,"individual_batch_attendance":1}'{
"code": 200,
"message": "Class Created",
"master_batch_id": 2338,
"classes": [
{
"class_id": 4397,
"course_id": 23
},
{
"class_id": 4398,
"course_id": 24
},
{
"class_id": 4399,
"course_id": 236
}
]
}Access: Institute admins, tutors, plus custom roles that can manage batches.
Request body: form-data with one field, JSONString, containing this JSON:
Body
JSONStringclass_namestring
Batch name. Defaults to the course name.
Course (bundle) ID the batch belongs to.
User ID of the batch manager.
organization_idinteger
Organization (branch) of the batch. Defaults to your current organization.
start_datestring
Batch start date, e.g.
18 Aug 2021.end_datestring
Batch end date, e.g.
31 Jul 2023.individual_batch_attendanceinteger
0 (default) attendance is taken per class. 1 one common attendance for all classes held on the same day.The classes in the batch (fields below). At least one.
date_of_commencementstring
Start date passed to each new class's schedule.
Fields in each courses_array object (one per class, i.e. one subject taught in the batch):
| Name | Required | Type | Description |
|---|---|---|---|
| class_id | No | integer | An existing class to keep (on update) or reuse (on create). Leave it out to create a new class. |
| course_id | Yes for new classes | integer | Curriculum ID the class teaches. Use a curriculum linked to the course. |
| batch_name | Yes | string | Class name. |
| tutor_id | Yes | integer | User ID of the class tutor. |
| description | No | string | Class description. |
| is_live | No | integer | 1 the class has live sessions, 0 (default) it does not. |
| virtual_class_type | No | integer | Live platform when is_live is 1: 1 Zoom Meeting (default), 2 BotSite, 3 GoTo, 4 GoTo Meeting, 5 Zoom Webinar, 6 Custom link, 7 Super Live, 8 MS Teams. |
| external_class_link | No | string | Meeting URL, used only with virtual_class_type 6. |
| zoom_room_waiting | No | integer | 1 turns on the Zoom waiting room. Default 0. |
| batch_class_count | No | integer | Planned number of sessions. Default 0. |
| display_index | No | integer | Position of the class in the batch (update only). |
Response
codeinteger
Example:
200messagestring
Example:
Class Createdclassesobject[]
Show child attributesHide child attributes
classes.class_idinteger
Example:
4397classes.course_idinteger
Example:
23Notes: Errors: "Please select a tutor for the batch" (no tutor_id), "Please add atleast one Module to batch" (empty courses_array). Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.