Manage website header components, navigation, and header-related operations in the CMS system.
/api/cms-headers
The CMS Headers API provides endpoints for managing website header components including creation, editing, activation, and listing. Supports multiple header variations with activation workflow.
Creates a new header component.
{
"name": "Main Header v1",
"html": " ",
"css": "header { background: #fff; }",
"isActive": false,
"description": "Main website header with navigation"
}
{
"id": "header_123",
"name": "Main Header v1",
"isActive": false,
"createdAt": "2026-06-02T10:30:00Z"
}
Gets header component details by ID.
| Parameter | Type |
|---|---|
| id | string |
{
"id": "header_123",
"name": "Main Header v1",
"html": " ",
"css": "header { background: #fff; }",
"isActive": false,
"description": "Main website header with navigation",
"createdAt": "2026-06-02T10:30:00Z"
}
Gets all header components with pagination.
| Parameter | Type | Description |
|---|---|---|
| $skip | integer | Skip n records |
| $top | integer | Take n records |
{
"value": [
{
"id": "header_123",
"name": "Main Header v1",
"isActive": true,
"createdAt": "2026-06-02T10:30:00Z"
}
],
"count": 10
}
Updates header component details.
{
"name": "Main Header v2",
"html": " ",
"css": "header { background: #f5f5f5; }",
"description": "Updated main header"
}
{
"id": "header_123",
"name": "Main Header v2",
"updatedAt": "2026-06-02T11:00:00Z"
}
Soft deletes a header component.
{
"success": true,
"message": "Header deleted"
}
Activates a header component for public use (deactivates others).
{
"id": "header_123",
"isActive": true,
"activatedAt": "2026-06-02T11:05:00Z"
}
| Code | HTTP Status | Description |
|---|---|---|
| HEADER_NOT_FOUND | 404 | Header component does not exist |
| INVALID_HTML | 400 | Invalid HTML content |
| DUPLICATE_NAME | 409 | Header name already exists |