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.
Request Example
Section titled “Request Example”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>" } }'Response Example
Section titled “Response Example”{ "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>" }}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 |
|---|---|---|---|
name | string | Name of the unit to be created. Maximum of 255 characters. | Yes |
urlSlug | string | Unit URL slug. Must be unique and a valid URL format. Maximum of 255 characters. | Yes |
groups | number[] | Array containing group identifiers (Level 1 filters) of the institution. | Yes |
colorScheme | object | Object containing the color values to be used for the unit. | Yes |
colorScheme.primary | string | Primary color of the unit’s visual identity, used as the highlight color. | Yes |
colorScheme.secondary | string | Complementary secondary color of the unit’s visual identity. | Yes |
colorScheme.buttonText | string | Color of text displayed on buttons in the interface. | Yes |
location | object | Object containing the unit’s location data. | Yes |
location.street | string | Street name where the unit is located. | Yes |
location.number | string | Street number of the unit’s address. | Yes |
location.district | string | Neighborhood where the unit is located. | Yes |
location.city | string | City where the unit is located. | Yes |
location.state | string | State (UF) where the unit is located. | Yes |
location.zipCode | string | ZIP code of the unit’s address. | Yes |
subgroups | number[] | Array containing subgroup identifiers (Level 2 filters) of the institution. | No |
specialties | number[] | Array containing specialty identifiers (Level 3 filters) of the institution. | No |
features | object | Object containing unit settings in boolean format. | No |
features.enableTeacherRegistration | boolean | Enables or disables teacher registration in the unit. | No |
features.enableStudentRegistration | boolean | Enables or disables student registration in the unit. | No |
features.enableGoogleLogin | boolean | Enables or disables login via Google account. | No |
features.enableLoginByDocument | boolean | Enables or disables login using a document number. | No |
features.enableLoginByEmail | boolean | Enables or disables login via email. | No |
features.isPartOfProgram | boolean | Indicates if the unit belongs to a specific institutional program. | No |
features.enableForum | boolean | Enables or disables the forum feature in the unit. | No |
features.enableViewCount | boolean | Enables or disables content view counting. | No |
features.enableRating | boolean | Enables or disables content rating (grade) feature. | No |
features.enableReviews | boolean | Enables or disables comments or reviews. | No |
features.showSchoolIconInMenu | boolean | Shows or hides the school icon in the navigation menu. | No |
features.showIconDetails | boolean | Shows or hides visual details of icons associated with the school. | No |
features.replicateInstitutionMenuLinks | boolean | Enables or disables replication of institution menu links. | No |
features.displaySchoolAccessButton | boolean | Shows or hides the direct school access button. | No |
contractNumber | string | Contract number. Must be unique. Maximum of 50 characters. | No |
tags | array | Array of strings. Maximum of 10 elements. | No |
taxid | string | Unit’s CNPJ (Brazilian tax ID). Must be a valid CNPJ. | No |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | object | Details of the created educational unit. |
data.id | number | Unique identifier of the unit. |
data.name | string | Name of the unit. |
data.urlSlug | string | URL slug of the unit. |
data.contractNumber | string | Contract number associated with the unit. |
data.tags | array | Tags associated with the unit. |
data.taxId | string | Tax identification number (CNPJ). |
data.groups | array | List of groups associated with the unit. |
data.subgroups | array | List of subgroups associated with the unit. |
data.specialties | array | List of specialties associated with the unit. |
data.colorScheme | object | Color scheme configuration. |
data.social | object | Social media information. |
data.location | object | Location details of the unit. |
data.features | object | Enabled features for the unit. |
data.createdAt | string | Date and time the unit was created. |
data.updatedAt | string | Date and time the unit 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.