Skip to content

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 library service), 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. institutionId and userId are taken from the token.

Terminal window
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
}'
Terminal window
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
}'
Terminal window
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
}'
{
"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"
}
}

ParameterTypeDescriptionRequired
AuthorizationStringJWT access token (Bearer <token>). Must include institutionId, userID, and subdomain.Yes
ParameterTypeDescriptionRequired
titlestringContent title.Yes
typestringContent type: text, video_online, or html5.Yes
cycleIdsnumber[]Cycle IDs linked to the content. At least one positive integer.Yes
difficultyLevelstringDifficulty level: hard, medium, or low.Yes
descriptionstringContent description.No
bodystringHTML content. Required for text and html5.Conditional
videoUrlstringExternal video URL. Required for video_online (can use fileUrl instead).Conditional
fileUrlstringAlternative URL for video_online.No
durationnumberDuration in minutes. Default 0.No
thumbnailUrlstringThumbnail image URL. Required when any catalog visibility flag is enabled.Conditional
catalogCoverRectangularUrlstringRectangular catalog cover URL. Required when showInStudentCatalog is true.Conditional
cycleStageIdsnumber[]Cycle stage IDs (positive integers).No
disciplineIdsnumber[]Discipline IDs (positive integers).No
schoolIdsnumber[]School IDs (positive integers).No
tagsstringComma-separated tags.No
sourcestringContent source.No
authorsstringContent authors.No
disablePlayerControlsbooleanDisable video player controls. Default false.No
showInStudentCatalogbooleanShow in student catalog. Default false.No
showInVisitorCatalogbooleanShow in visitor catalog. Default false.No
blockCatalogLoggedOutbooleanBlock catalog access when logged out. Default false.No
showCourseDetailsbooleanShow course details in catalog. Default false.No
showInRelatedVideosbooleanShow in related videos section. Default false.No
videoOrientationstringVideo orientation: horizontal or vertical.No
statusnumber0: Draft. 1: Published (default).No
TypeRequired fieldsDescription
textbodyHTML text content.
video_onlinevideoUrl or fileUrlExternal video URL (no file upload in this version).
html5bodyHTML embed/iframe content.

KeyTypeDescription
contentobjectCreated content object.
content.idnumberUnique content identifier.
content.typestringAPI content type (text, video_online, html5).
content.monolithTypenumberLegacy type ID: 1 (text), 3 (video_online), 28 (html5).
content.statusnumber0: Draft. 1: Published.
content.cycleIdsnumber[]Linked cycle IDs.
content.difficultystringDifficulty level (hard, medium, low).
content.createdAtstringCreation timestamp (ISO 8601).
content.updatedAtstringLast update timestamp (ISO 8601).

HTTPCodeWhen
400invalid_argumentMissing or invalid fields (e.g. empty title, invalid type, missing body/videoUrl)
401unauthenticatedMissing or invalid JWT
403permission_deniedUser is not linked to the institution or is a student
500internalContent creation failure

Example:

{
"code": "invalid_argument",
"message": "body is required for text content",
"details": null
}

  • 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.