TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM-API/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/v1/sidebar endpoint creates a new sidebar navigation item in the sidebarItems table. Creating an item does not assign it to any role — it simply registers the item so it can later be linked to one or more roles via POST /api/v1/sidebar/:idItem/role/:idRole. This two-step design lets you create items once and reuse them across multiple roles without duplication.
Authentication
Requires a valid JWT in theAuthorization header. The authenticated user’s role must also have the permission POST /api/v1/sidebar registered in the permissions table and assigned via permissionXRole.
Request
Method:POSTPath:
/api/v1/sidebar
Body Parameters
Display label for the navigation item shown in the sidebar menu. Must be between 1 and 100 characters.
Icon identifier for the navigation item — typically a CSS class name (e.g.
"bi bi-speedometer2" for Bootstrap Icons). Maximum 50 characters. Omit or pass null to leave unset.Frontend route path this item should navigate to when clicked (e.g.
"/dashboard", "/users/list"). Maximum 100 characters. Omit or pass null to leave unset.Example Request Body
Response
201 — Created
Returns the newly created sidebar item, including its auto-generatedidItem.
Always
true for successful responses.Human-readable confirmation:
"Sidebar item creado exitosamente".The newly created sidebar item object.
Auto-generated numeric ID for the new item (
insertId from the database). Use this value in subsequent calls to assign the item to a role.Display label as provided in the request body.
Icon identifier as provided, or
null if omitted.Route path as provided, or
null if omitted.400 — Bad Request
Returned when the request body fails schema validation (e.g.nameItem is missing, exceeds length limits, or has the wrong type).
401 — Unauthorized
Returned when theAuthorization header is missing or the token is invalid/expired.
403 — Forbidden
Returned when the authenticated user’s role does not have thePOST /api/v1/sidebar permission.
Example
After creating an item, it is not visible to any user yet. Use
POST /api/v1/sidebar/:idItem/role/:idRole to assign the new item to one or more roles. Users with those roles will then see it in their sidebar at next login — sidebar items are delivered as part of the POST /api/v1/auth/login response under the sidebarItems key.Real-time Events
This endpoint emits Socket.IO events throughout the creation lifecycle:| Event | Stage | Description |
|---|---|---|
sidebar:create | start | Creation process initiated |
sidebar:create | processing | Item being persisted to the database |
sidebar:create | success | Item created successfully, payload includes new item data |