Create Classes
Endpoint used to create and link a class to a school, defining its type, code, and title, and associating it with groups, subgroups, and specialties.
Warning: This endpoint will only work correctly if the domain of your institution is manually provided in the URL. Otherwise, the endpoint may fail or return a validation error.
Request Example
Section titled “Request Example”curl --request POST \ --url 'https://{your-institution-domain}/api/v1/schools/{schoolId}/classrooms' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "schoolId": "<string>", "type": "FILTER", "code": "ABC123", "title": "<string>", "group": [1, 2], "subgroups": [1], "specialties": [1] }'Response Example
Section titled “Response Example”{ "success": true, "data": { "id": 1, "schoolId": "<string>", "title": "<string>", "code": "<string>", "image": null, "course": null, "group": [{ "id": 1, "name": "<string>" }], "subgroups": [{ "id": 1, "name": "<string>" }], "specialties": [{ "id": 1, "name": "<string>" }], "trails": [], "contents": [], "createdAt": "<string>", "updatedAt": "<string>" }}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
schoolId | string | Identifier of the school to which the class will be associated. | Yes |
type | string | Type of class to be established, based on filtering groups, subgroups, and specialties. | Yes |
code | string | Class code: unique identifier with 1 to 10 characters. | Yes |
title | string | Class title: string description with up to 255 characters. | Yes |
group | array | Groups: set of group identifiers related to the class. Required if type is FILTER. | No |
subgroups | array | Subgroups: set of subgroup identifiers associated with the class. Required if type is FILTER. | No |
specialties | array | Specialties: set of specialty identifiers linked to the class. Required if type is FILTER. | No |
contents | array | Exclusive content items. Required when type is EXCLUSIVE_CONTENT. | No |
registration_start_date | string | Enrollment start date. | No |
registration_end_date | string | Enrollment end date. | No |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | object | Details of the created class. |
data.id | number | Unique identifier of the class. |
data.schoolId | string | Identifier of the associated school. |
data.title | string | Class title. |
data.code | string | Class code. |
data.image | string | Class image URL (may be null). |
data.course | string | Name of the associated course (may be null). |
data.group | array | List of groups associated with the class. |
data.subgroups | array | List of subgroups associated with the class. |
data.specialties | array | List of specialties associated with the class. |
data.trails | array | List of trails associated with the class. |
data.contents | array | List of content items associated with the class. |
data.createdAt | string | Date and time the class was created. |
data.updatedAt | string | Date and time the class was last updated. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.