Skip to content

Enroll Students in a Class

Endpoint used to indicate a class and send one or more student objects to register them in the class in Toolzz LMS.

Terminal window
curl --request POST \
--url 'https://kong.api.toolzz.com.br/api/classes/{class_id}/attach' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"users": [
{
"name": "Student Name",
"email": "student@example.com",
"birth_date": "2000-01-01",
"cpf": "12345678901",
"registration_start_date": "2025-01-01",
"registration_end_date": "2025-12-31",
"enrollment_renewal": false
}
]
}'
{
"data": [
{
"user_id": 1,
"user_name": "<string>",
"school_id": 1,
"class_id": "<string>",
"class_name": "<string>",
"birth_date": "<string>",
"cpf": "<string>",
"registration_start_date": "<string>",
"registration_end_date": "<string>",
"enrollment_renewal": false,
"id": "<string>"
}
]
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
class_idstringIdentifier of the class in which the student(s) will be enrolled.Yes
ParameterTypeDescriptionRequired
usersarrayList of users to be enrolled and registered. If the user already exists, they can be linked via ID using the id key with the corresponding value.Yes
users.namestringStudent name. Required for unregistered students.No
users.emailstringStudent email address. Required for unregistered students.No
users.idintID of the registered student in the institution. Optional for already registered users.No
birth_datestringUser’s date of birth in YYYY-MM-DD format.No
cpfstringUser’s CPF number, containing exactly 11 numeric digits.No
registration_start_datestringUser’s enrollment start date in YYYY-MM-DD format.No
registration_end_datestringUser’s enrollment end date in YYYY-MM-DD format. Must be equal to or after the current date.No
enrollment_renewalbooleanFlag indicating whether the enrollment will be renewed.No

KeyTypeDescription
dataarrayList of associations between users and the class.
data.user_idnumberUnique identifier of the user.
data.user_namestringName of the user.
data.school_idnumberUnique identifier of the associated school.
data.class_idstringUnique identifier of the class.
data.class_namestringName of the class.
data.birth_datestringUser’s date of birth in YYYY-MM-DD format.
data.cpfstringUser’s CPF, containing exactly 11 digits.
data.registration_start_datestringUser’s enrollment start date in the class.
data.registration_end_datestringUser’s enrollment end date in the class.
data.enrollment_renewalbooleanIndicates if the user’s enrollment was renewed (true) or not (false).
data.idstringClass identifier or code used for validation. May be numeric or alphanumeric.

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.