Create Class
Endpoint used to create a class.
Request Example
Section titled “Request Example”curl --request POST \ --url https://kong.api.toolzz.com.br/api/content/course/{course_id}/create_class \ --header 'Content-Type: application/json' \ --data '{ "title": "<string>", "description": "<string>", "duration": 123, "tag": [ {} ], "progress_criteria": [ {} ], "show_title": 123, "enable_lesson_view": 123, "scheduled_date": "<string>"}'Response Example
Section titled “Response Example”{ "data": { "curso_id": "<string>", "id": "<string>", "user_id": "<string>", "titulo": "<string>", "descricao": "<string>", "enable_lesson_view": 123, "duracao": 123, "liberacao": "<string>", "requisito": "<string>", "requisito_id": 123, "tags": "<string>", "created_at": "<string>", "updated_at": "<string>", "ordem": 123, "title_visibility": 123, "description_visibility": 123 }}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 |
URL Parameters (Path)
Section titled “URL Parameters (Path)”| Parameter | Type | Description | Required |
|---|---|---|---|
course_id | int | Course ID in which the new class will be registered. | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
title | string | Class title. Maximum of 150 characters. | Yes |
description | string | Class content description. Maximum of 255 characters. | Yes |
duration | int | Total class duration time. Maximum of 4 characters. | No |
tag | array | Classification used to group the class. Each tag can have a maximum of 150 characters. | No |
progress_criteria | array | List of class IDs required to unlock the current class. Optional, can be sent as null. The indicated classes must belong to the same course as course_id. If one or more IDs are invalid, they are ignored and only the valid IDs are registered. | No |
show_title | int | Defines if the class title is displayed. To be 1, the institution must have the feature “visitor views package”. Default: 0. | No |
enable_lesson_view | int | Defines if the class can be accessed by guest users. To be 1, the institution must have the feature “visitor views package”. Default: 0. | No |
scheduled_date | date | Date for future release of the class. Expected format: YYYY-MM-DD HH:MM. If null, the class will be considered unscheduled. | No |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
data | object | List of configurations. |
data.curso_id | string | Unique identifier for the course. |
data.id | string | Unique identifier for the configuration. |
data.user_id | string | ID of the associated user. |
data.titulo | string | Title of the course. |
data.descricao | string | Description of the course. |
data.enable_lesson_view | number | Enable lesson view status. |
data.duracao | number | Duration of the course. |
data.liberacao | Date | Release date and time for the course. |
data.requisito | string | Prerequisite for the course. |
data.requisito_id | number | ID of the prerequisite. |
data.tags | string | Tags associated with the course. |
data.created_at | Date | Date and time when the course was created. |
data.updated_at | Date | Date and time when the course was last updated. |
data.ordem | number | Order or priority of the course. |
data.title_visibility | number | Visibility status of the title. |
data.description_visibility | number | Visibility status of the description. |
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.