Docs home

Create Session

Schedules one session, or a recurring series of sessions, for a class or for one or more batches. Use it to create normal class sessions, extra sessions for selected students, batch-level sessions, offline sessions, and live sessions on Zoom Meeting, Zoom Webinar or a custom link.

POST/schedule/version/session
Create Session
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/schedule/version/session' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={"class_name":"Physics - Motion and Laws | Normal Session","class_date":"09 Mar 2026","tutor_id":"165300","scheduled_notification":true,"reminder_notification":true,"zoom_room_waiting":false,"is_sharable_link_enabled":false,"can_join_without_login":false,"topics":"<p>Introduction to Motion and Newton'\''s Laws</p>","class_type":1,"feedback_form_id":"","s_hour":6,"s_minute":0,"e_hour":"7","e_minute":"00","is_live":true,"virtual_class_type":1,"class_id":4259,"all_selected":true,"custom_recurrence":{},"force_schedule":1,"repeat_type":0}'
{
  "code": 200,
  "message": "Class Created",
  "attendance_details": {
    "attendance_id": [
      48932
    ]
  }
}

Access: Institute admins, plus custom roles with scheduling write permission.

Request body: form-data with one field, JSONString, containing this JSON:

BodyJSONString
class_typeintegerrequired
1 class session: a normal session for the class, or an extra session if student_ids is given. 3 batch-level session for the batches in master_batch_ids.
class_idintegerYes for class_type 1
Class (subject batch) the session belongs to. Must be in your current organization.
master_batch_idsarray of integersYes for class_type 3
Batches to schedule for. Students come from these batches.
tutor_idintegerrequired
Tutor who will take the session. Must be a member of your organization.
class_datestringrequired
Date of the (first) session, as D Mon YYYY, for example 20 Jul 2026.
s_hourinteger
Start hour, 0-23, in your timezone. Default 0.
s_minuteinteger
Start minute. Default 0.
e_hourinteger
End hour, 0-23. Default 0.
e_minuteinteger
End minute. Default 0. Start and end cannot be the same.
1 if the session ends after midnight. Without it, an end time earlier than the start time fails with code 5021.
Session name. Defaults to the class name in notifications.
topicsstring
Topics to be taught. Up to 1024 characters.
student_idsarray of integers
With class_type 1, makes an extra session for only these students. Each must be enrolled in the class (or batches).
true notifies every enrolled student of the class.
is_liveboolean
true for a live (online) session, false for offline. Default offline.
Only when live: 1 Zoom Meeting (default), 5 Zoom Webinar, 6 Custom Link.
true turns on the Zoom waiting room. Default off.
1 marks Zoom attendees present only above a minimum share of the session.
The minimum share, 1-100. Used only with use_threshold_attendance.
true sends a "session scheduled" notification now. Default off.
true sends a reminder before the session starts. Default off.
send_smsinteger
0 turns off the scheduled notification even if scheduled_notification is true. Default 1.
0 or left out: one session. 1: recurring, needs custom_recurrence.
custom_recurrenceobjectYes if repeat_type is 1
How the series repeats (fields below).
1 skips the tutor, student and batch clash checks. Default 0.
Feedback form attached to the session.
true lets people join through the shareable link without logging in.
1 marks the session as optional.
Linked content ID. Default 0.

Fields in the custom_recurrence object:

Name Required Type Description
repeat_value_type Yes integer 0 repeat every N days, 1 every N weeks, 2 every N months.
repeat_value Yes integer N, the gap between occurrences.
end_type Yes integer 1 stop after a number of sessions, 0 stop on a date.
end_value No integer or string With end_type 1, the number of sessions (default 50). With end_type 0, the end date, for example 2026-12-31 (default three months after class_date).
days_selected Yes for weekly array of integers Weekdays, 0 Sunday to 6 Saturday.
month_day Yes for monthly integer Day of the month. Monthly dates before today are skipped.

Example (weekly on Monday, Wednesday and Friday, 10 sessions, for two batches):

{"class_type": 3, "master_batch_ids": [9001, 9002], "tutor_id": 9322, "class_name": "Batch Revision",
 "class_date": "20 Jul 2026", "s_hour": 8, "s_minute": 0, "e_hour": 9, "e_minute": 30,
 "is_live": true, "virtual_class_type": 1, "scheduled_notification": true, "reminder_notification": true,
 "repeat_type": 1, "custom_recurrence": {"repeat_value_type": 1, "repeat_value": 1, "days_selected": [1, 3, 5], "end_type": 1, "end_value": 10}}
Response200application/json
codeinteger
Example: 200
messagestring
Example: Class Created
Show child attributesHide child attributes

Notes:

  • Fields typed boolean must be JSON true or false. Sending 1 or 0 fails with "Type mismatch".
  • Unless force_schedule is 1, the request fails with code 5010 if the tutor is busy, 5011 if students have another session then, or 5028 if a selected batch already has a batch-level session in that slot (the message lists the clashing batches and sessions).
  • Creating one batch-level session for more than one batch needs a plan that allows it. Batches with a merged schedule can't be used.
  • If your institute has webhooks for "session created", one is sent with the new session IDs.
  • Rate limit: 100 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI