Create Library Content
Endpoint used to create standalone content in the institution library. Supported types in this version: text, online video (video_online), and HTML5 embed (html5).
Note: This endpoint is served by Toolzz LXP API (Encore
libraryservice), not by the institution monolith domain. Use the LXP API base URL (e.g.https://lxp.prod.api.toolzz.media).
Warning: Requires a valid admin JWT. Users with student privilege (
privilegio_id = 4) cannot manage library content.institutionIdanduserIdare taken from the token.
Request Example (text)
Section titled “Request Example (text)”curl --request POST \ --url 'https://lxp.prod.api.toolzz.media/institution/library/contents' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Introduction to the platform", "type": "text", "description": "Getting started guide", "body": "<p>Welcome to the library</p>", "cycleIds": [179], "difficultyLevel": "medium", "tags": "onboarding,guide", "status": 1 }'Request Example (online video)
Section titled “Request Example (online video)”curl --request POST \ --url 'https://lxp.prod.api.toolzz.media/institution/library/contents' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Product overview", "type": "video_online", "description": "Overview video", "videoUrl": "https://www.youtube.com/watch?v=example", "duration": 5, "cycleIds": [179], "difficultyLevel": "low", "status": 1 }'Request Example (HTML5)
Section titled “Request Example (HTML5)”curl --request POST \ --url 'https://lxp.prod.api.toolzz.media/institution/library/contents' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Interactive module", "type": "html5", "description": "Embedded HTML5 content", "body": "<iframe src=\"https://example.com/interactive\"></iframe>", "cycleIds": [179], "schoolIds": [7802619], "difficultyLevel": "hard", "status": 1 }'Response Example
Section titled “Response Example”{ "content": { "id": 1234567, "institutionId": 39955387, "userId": 98210156, "title": "Introduction to the platform", "description": "Getting started guide", "type": "text", "monolithType": 1, "status": 1, "body": "<p>Welcome to the library</p>", "fileUrl": null, "videoUrl": null, "duration": 0, "thumbnailUrl": null, "catalogCoverRectangularUrl": null, "cycleIds": [179], "cycleStageIds": [], "disciplineIds": [], "schoolIds": [], "difficulty": "medium", "tags": "onboarding,guide", "source": null, "authors": null, "disablePlayerControls": false, "showInStudentCatalog": false, "showInVisitorCatalog": false, "blockCatalogLoggedOut": false, "showCourseDetails": false, "showInRelatedVideos": false, "videoOrientation": null, "createdAt": "2026-06-15T12:00:00.000Z", "updatedAt": "2026-06-15T12:00:00.000Z" }}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | JWT access token (Bearer <token>). Must include institutionId, userID, and subdomain. | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
title | string | Content title. | Yes |
type | string | Content type: text, video_online, or html5. | Yes |
cycleIds | number[] | Cycle IDs linked to the content. At least one positive integer. | Yes |
difficultyLevel | string | Difficulty level: hard, medium, or low. | Yes |
description | string | Content description. | No |
body | string | HTML content. Required for text and html5. | Conditional |
videoUrl | string | External video URL. Required for video_online (can use fileUrl instead). | Conditional |
fileUrl | string | Alternative URL for video_online. | No |
duration | number | Duration in minutes. Default 0. | No |
thumbnailUrl | string | Thumbnail image URL. Required when any catalog visibility flag is enabled. | Conditional |
catalogCoverRectangularUrl | string | Rectangular catalog cover URL. Required when showInStudentCatalog is true. | Conditional |
cycleStageIds | number[] | Cycle stage IDs (positive integers). | No |
disciplineIds | number[] | Discipline IDs (positive integers). | No |
schoolIds | number[] | School IDs (positive integers). | No |
tags | string | Comma-separated tags. | No |
source | string | Content source. | No |
authors | string | Content authors. | No |
disablePlayerControls | boolean | Disable video player controls. Default false. | No |
showInStudentCatalog | boolean | Show in student catalog. Default false. | No |
showInVisitorCatalog | boolean | Show in visitor catalog. Default false. | No |
blockCatalogLoggedOut | boolean | Block catalog access when logged out. Default false. | No |
showCourseDetails | boolean | Show course details in catalog. Default false. | No |
showInRelatedVideos | boolean | Show in related videos section. Default false. | No |
videoOrientation | string | Video orientation: horizontal or vertical. | No |
status | number | 0: Draft. 1: Published (default). | No |
Content type rules
Section titled “Content type rules”| Type | Required fields | Description |
|---|---|---|
text | body | HTML text content. |
video_online | videoUrl or fileUrl | External video URL (no file upload in this version). |
html5 | body | HTML embed/iframe content. |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
content | object | Created content object. |
content.id | number | Unique content identifier. |
content.type | string | API content type (text, video_online, html5). |
content.monolithType | number | Legacy type ID: 1 (text), 3 (video_online), 28 (html5). |
content.status | number | 0: Draft. 1: Published. |
content.cycleIds | number[] | Linked cycle IDs. |
content.difficulty | string | Difficulty level (hard, medium, low). |
content.createdAt | string | Creation timestamp (ISO 8601). |
content.updatedAt | string | Last update timestamp (ISO 8601). |
Error responses
Section titled “Error responses”| HTTP | Code | When |
|---|---|---|
| 400 | invalid_argument | Missing or invalid fields (e.g. empty title, invalid type, missing body/videoUrl) |
| 401 | unauthenticated | Missing or invalid JWT |
| 403 | permission_denied | User is not linked to the institution or is a student |
| 500 | internal | Content creation failure |
Example:
{ "code": "invalid_argument", "message": "body is required for text content", "details": null}Security
Section titled “Security”- Requires valid JWT with admin access (
auth: true). - Data is scoped to the institution from the token.
- Students cannot create library content.
- HTTPS/TLS for all environments.