Skip to navigation

CreateClass

View as Markdown

Create a class in a school period.

Input variables

  • schoolPeriodId: id of the school period. Check the GetSchoolPeriods call

Two kinds of class:

  • Single-subject: send its course as courseId (as in the example). If you leave name empty the class takes the course’s name.
  • Multi-subject: send its courses as courseIds instead, e.g. "courseIds": [12, 13].

Send one or the other, not both. Course ids come from GetSchoolCourses (or CreateCourse) and must all belong to your school. The school period must be one of your school’s.

Accepted fields: name, code, description, startDate, endDate, capacity, courseId / courseIds. Anything else is ignored.

Returns the class in the same shape as GetPeriodClasses; its class courses then appear in GetPeriodClassCourses. Fires the CLASS_CREATED webhook.

Path parameters

schoolPeriodIdstringRequired

Headers

dreamclass-secret-keystringOptional

Your DreamClass API key. Required on every request. Find it in the DreamClass app under Settings > Integrations.

tenantstringOptional

Your tenant code: the DreamClass subdomain you sign in at (for https://myaccount.dreamclass.io it is “myaccount”), or your full white-labelled domain. Required on every request.

schoolCodestringOptional

Your school code. Required on every request. Find it in the DreamClass app under Settings > Integrations.

Request

This endpoint expects an object.
namestringRequired
codestringRequired
descriptionstringRequired
startDatedateRequired
endDatedateRequired
capacityintegerRequired
courseIdintegerRequired

Response headers

Access-Control-Allow-OriginstringOptional
Access-Control-Allow-MethodsstringOptional
X-Content-Type-OptionsstringOptional
Cache-ControlstringOptional

Response

OK
namestring
idinteger
descriptionstring
codestring
endDatedate
startDatedate
schoolTagslist of any
capacityinteger