Skip to content

Create Units

Endpoint used to create new school units in your institution in Toolzz LMS.

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.

Terminal window
curl --request POST \
--url 'https://{your-institution-domain}/api/v1/schools' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"urlSlug": "<string>",
"groups": [1, 2],
"colorScheme": {
"primary": "#000000",
"secondary": "#ffffff",
"buttonText": "#ffffff"
},
"location": {
"street": "<string>",
"number": "<string>",
"district": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>"
}
}'
{
"success": true,
"data": {
"id": 1,
"name": "<string>",
"urlSlug": "<string>",
"contractNumber": "<string>",
"tags": [],
"taxId": "<string>",
"groups": [{ "id": 1, "name": "<string>" }],
"subgroups": [],
"specialties": [],
"colorScheme": {
"primary": "<string>",
"secondary": "<string>",
"buttonText": "<string>"
},
"social": {},
"location": {
"street": "<string>",
"number": "<string>",
"additionalDetails": "<string>",
"district": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>"
},
"features": {
"enableTeacherRegistration": true,
"enableStudentRegistration": true,
"enableGoogleLogin": false,
"enableLoginByDocument": false,
"enableLoginByEmail": true,
"isPartOfProgram": false,
"enableForum": true,
"enableViewCounter": true,
"enableRating": true,
"enableReviews": true,
"showSchoolIconInMenu": true,
"showIconDetails": true,
"replicateInstitutionMenuLinks": false,
"displaySchoolAccessButton": true
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
namestringName of the unit to be created. Maximum of 255 characters.Yes
urlSlugstringUnit URL slug. Must be unique and a valid URL format. Maximum of 255 characters.Yes
groupsnumber[]Array containing group identifiers (Level 1 filters) of the institution.Yes
colorSchemeobjectObject containing the color values to be used for the unit.Yes
colorScheme.primarystringPrimary color of the unit’s visual identity, used as the highlight color.Yes
colorScheme.secondarystringComplementary secondary color of the unit’s visual identity.Yes
colorScheme.buttonTextstringColor of text displayed on buttons in the interface.Yes
locationobjectObject containing the unit’s location data.Yes
location.streetstringStreet name where the unit is located.Yes
location.numberstringStreet number of the unit’s address.Yes
location.districtstringNeighborhood where the unit is located.Yes
location.citystringCity where the unit is located.Yes
location.statestringState (UF) where the unit is located.Yes
location.zipCodestringZIP code of the unit’s address.Yes
subgroupsnumber[]Array containing subgroup identifiers (Level 2 filters) of the institution.No
specialtiesnumber[]Array containing specialty identifiers (Level 3 filters) of the institution.No
featuresobjectObject containing unit settings in boolean format.No
features.enableTeacherRegistrationbooleanEnables or disables teacher registration in the unit.No
features.enableStudentRegistrationbooleanEnables or disables student registration in the unit.No
features.enableGoogleLoginbooleanEnables or disables login via Google account.No
features.enableLoginByDocumentbooleanEnables or disables login using a document number.No
features.enableLoginByEmailbooleanEnables or disables login via email.No
features.isPartOfProgrambooleanIndicates if the unit belongs to a specific institutional program.No
features.enableForumbooleanEnables or disables the forum feature in the unit.No
features.enableViewCountbooleanEnables or disables content view counting.No
features.enableRatingbooleanEnables or disables content rating (grade) feature.No
features.enableReviewsbooleanEnables or disables comments or reviews.No
features.showSchoolIconInMenubooleanShows or hides the school icon in the navigation menu.No
features.showIconDetailsbooleanShows or hides visual details of icons associated with the school.No
features.replicateInstitutionMenuLinksbooleanEnables or disables replication of institution menu links.No
features.displaySchoolAccessButtonbooleanShows or hides the direct school access button.No
contractNumberstringContract number. Must be unique. Maximum of 50 characters.No
tagsarrayArray of strings. Maximum of 10 elements.No
taxidstringUnit’s CNPJ (Brazilian tax ID). Must be a valid CNPJ.No

KeyTypeDescription
successbooleanIndicates if the request was successful.
dataobjectDetails of the created educational unit.
data.idnumberUnique identifier of the unit.
data.namestringName of the unit.
data.urlSlugstringURL slug of the unit.
data.contractNumberstringContract number associated with the unit.
data.tagsarrayTags associated with the unit.
data.taxIdstringTax identification number (CNPJ).
data.groupsarrayList of groups associated with the unit.
data.subgroupsarrayList of subgroups associated with the unit.
data.specialtiesarrayList of specialties associated with the unit.
data.colorSchemeobjectColor scheme configuration.
data.socialobjectSocial media information.
data.locationobjectLocation details of the unit.
data.featuresobjectEnabled features for the unit.
data.createdAtstringDate and time the unit was created.
data.updatedAtstringDate and time the unit was last updated.

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.