Download OpenAPI specification:
Welcome to the HumHub custom pages module API reference.
This is a read-only API: only GET endpoints are exposed for reading pages and their
rendered content. The CRUD-style requests (create/update/delete) supported by other modules'
REST APIs are intentionally disabled here and return 405 Method Not Allowed.
All endpoints enforce the page's own visibility settings (Public / Logged-In Users /
Non-Logged-In Users / Administrative Users / Custom group- or language-restricted) - the
same rules that apply when viewing the page in the web UI, see the visibility field of the
CustomPage schema below. A page returns 403 on /custom-pages/page/{id} when the
requesting user is not allowed to view it, and is silently omitted from the list endpoints.
Since that visibility check runs in addition to, and after, the regular database pagination,
a listing page can come back with fewer results than limit (or, rarely, empty) when
restricted pages are mixed into it, and total/pages may be slightly higher than what a
given user will actually see across all pages combined.
Returns all custom pages the current user is allowed to view, ordered by creation date
descending. Pass contentcontainer_id=0 to only return global custom pages (equivalent
to /custom-pages/global), or a specific container id to only return that container's
pages (equivalent to /custom-pages/container/{containerId}).
| contentcontainer_id | integer Filter by content container id. Use |
| page | integer >= 0 The number of page of the result set. |
| limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page. |
{- "total": 76,
- "page": 1,
- "pages": 8,
- "links": {
- "self": "{endpoint_path}?page=1&per-page=10",
- "next": "{endpoint_path}?page=2&per-page=10",
- "last": "{endpoint_path}?page=8&per-page=10"
}, - "results": [
- {
- "id": 123,
- "title": "My custom page",
- "type": 2,
- "target": "SpaceMenu",
- "icon": "fa-file-text-o",
- "sort_order": 100,
- "in_new_window": false,
- "url": "my-custom-page",
- "abstract": "Short description",
- "cssClass": "team-page",
- "page_content": "# Raw content",
- "rendered_content": "<h1>Rendered content</h1><p>… as displayed…</p>",
- "text_content": "Rendered content… as displayed…",
- "visibility": 1,
- "hide_menu": false,
- "page_type": "page",
- "template_id": 0,
- "content": {
- "metadata": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "object_model": "humhub\\modules\\post\\models\\Post",
- "object_id": 12,
- "visibility": 1,
- "state": 1,
- "archived": true,
- "hidden": true,
- "pinned": false,
- "locked_comments": false,
- "scheduled_at": "2023-09-14 05:15:00",
- "created_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "created_at": "2022-04-13 05:15:43",
- "updated_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "updated_at": "2022-05-21 06:20:18",
- "contentcontainer_id": 5,
- "stream_channel": "default"
}, - "comments": {
- "total": 55,
- "latestComments": [
- {
- "id": 14,
- "message": "Calvin Klein – Between love and madness lies obsession.",
- "objectModel": "humhub\\modules\\post\\models\\Post",
- "objectId": 123,
- "createdBy": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "createdAt": "2018-08-09 14:22:03",
- "commentsCount": 5,
- "comments": [
- { }
]
}
]
}, - "likes": {
- "total": 35
}, - "files": {
- "id": 14,
- "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
- "mime_type": "text/plain",
- "size": 14353,
- "file_name": "image.jpg",
}, - "topics": [
- {
- "id": 135,
- "name": "News"
}
]
}
}
]
}Alias for /custom-pages?contentcontainer_id=0.
| page | integer >= 0 The number of page of the result set. |
| limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page. |
{- "total": 76,
- "page": 1,
- "pages": 8,
- "links": {
- "self": "{endpoint_path}?page=1&per-page=10",
- "next": "{endpoint_path}?page=2&per-page=10",
- "last": "{endpoint_path}?page=8&per-page=10"
}, - "results": [
- {
- "id": 123,
- "title": "My custom page",
- "type": 2,
- "target": "SpaceMenu",
- "icon": "fa-file-text-o",
- "sort_order": 100,
- "in_new_window": false,
- "url": "my-custom-page",
- "abstract": "Short description",
- "cssClass": "team-page",
- "page_content": "# Raw content",
- "rendered_content": "<h1>Rendered content</h1><p>… as displayed…</p>",
- "text_content": "Rendered content… as displayed…",
- "visibility": 1,
- "hide_menu": false,
- "page_type": "page",
- "template_id": 0,
- "content": {
- "metadata": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "object_model": "humhub\\modules\\post\\models\\Post",
- "object_id": 12,
- "visibility": 1,
- "state": 1,
- "archived": true,
- "hidden": true,
- "pinned": false,
- "locked_comments": false,
- "scheduled_at": "2023-09-14 05:15:00",
- "created_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "created_at": "2022-04-13 05:15:43",
- "updated_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "updated_at": "2022-05-21 06:20:18",
- "contentcontainer_id": 5,
- "stream_channel": "default"
}, - "comments": {
- "total": 55,
- "latestComments": [
- {
- "id": 14,
- "message": "Calvin Klein – Between love and madness lies obsession.",
- "objectModel": "humhub\\modules\\post\\models\\Post",
- "objectId": 123,
- "createdBy": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "createdAt": "2018-08-09 14:22:03",
- "commentsCount": 5,
- "comments": [
- { }
]
}
]
}, - "likes": {
- "total": 35
}, - "files": {
- "id": 14,
- "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
- "mime_type": "text/plain",
- "size": 14353,
- "file_name": "image.jpg",
}, - "topics": [
- {
- "id": 135,
- "name": "News"
}
]
}
}
]
}| containerId required | integer ID of content container |
| page | integer >= 0 The number of page of the result set. |
| limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page. |
{- "total": 76,
- "page": 1,
- "pages": 8,
- "links": {
- "self": "{endpoint_path}?page=1&per-page=10",
- "next": "{endpoint_path}?page=2&per-page=10",
- "last": "{endpoint_path}?page=8&per-page=10"
}, - "results": [
- {
- "id": 123,
- "title": "My custom page",
- "type": 2,
- "target": "SpaceMenu",
- "icon": "fa-file-text-o",
- "sort_order": 100,
- "in_new_window": false,
- "url": "my-custom-page",
- "abstract": "Short description",
- "cssClass": "team-page",
- "page_content": "# Raw content",
- "rendered_content": "<h1>Rendered content</h1><p>… as displayed…</p>",
- "text_content": "Rendered content… as displayed…",
- "visibility": 1,
- "hide_menu": false,
- "page_type": "page",
- "template_id": 0,
- "content": {
- "metadata": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "object_model": "humhub\\modules\\post\\models\\Post",
- "object_id": 12,
- "visibility": 1,
- "state": 1,
- "archived": true,
- "hidden": true,
- "pinned": false,
- "locked_comments": false,
- "scheduled_at": "2023-09-14 05:15:00",
- "created_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "created_at": "2022-04-13 05:15:43",
- "updated_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "updated_at": "2022-05-21 06:20:18",
- "contentcontainer_id": 5,
- "stream_channel": "default"
}, - "comments": {
- "total": 55,
- "latestComments": [
- {
- "id": 14,
- "message": "Calvin Klein – Between love and madness lies obsession.",
- "objectModel": "humhub\\modules\\post\\models\\Post",
- "objectId": 123,
- "createdBy": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "createdAt": "2018-08-09 14:22:03",
- "commentsCount": 5,
- "comments": [
- { }
]
}
]
}, - "likes": {
- "total": 35
}, - "files": {
- "id": 14,
- "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
- "mime_type": "text/plain",
- "size": 14353,
- "file_name": "image.jpg",
}, - "topics": [
- {
- "id": 135,
- "name": "News"
}
]
}
}
]
}{- "id": 123,
- "title": "My custom page",
- "type": 2,
- "target": "SpaceMenu",
- "icon": "fa-file-text-o",
- "sort_order": 100,
- "in_new_window": false,
- "url": "my-custom-page",
- "abstract": "Short description",
- "cssClass": "team-page",
- "page_content": "# Raw content",
- "rendered_content": "<h1>Rendered content</h1><p>… as displayed…</p>",
- "text_content": "Rendered content… as displayed…",
- "visibility": 1,
- "hide_menu": false,
- "page_type": "page",
- "template_id": 0,
- "content": {
- "metadata": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "object_model": "humhub\\modules\\post\\models\\Post",
- "object_id": 12,
- "visibility": 1,
- "state": 1,
- "archived": true,
- "hidden": true,
- "pinned": false,
- "locked_comments": false,
- "scheduled_at": "2023-09-14 05:15:00",
- "created_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "created_at": "2022-04-13 05:15:43",
- "updated_by": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "updated_at": "2022-05-21 06:20:18",
- "contentcontainer_id": 5,
- "stream_channel": "default"
}, - "comments": {
- "total": 55,
- "latestComments": [
- {
- "id": 14,
- "message": "Calvin Klein – Between love and madness lies obsession.",
- "objectModel": "humhub\\modules\\post\\models\\Post",
- "objectId": 123,
- "createdBy": {
- "id": 14,
- "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
- "display_name": "John Doe",
}, - "createdAt": "2018-08-09 14:22:03",
- "commentsCount": 5,
- "comments": [
- { }
]
}
]
}, - "likes": {
- "total": 35
}, - "files": {
- "id": 14,
- "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
- "mime_type": "text/plain",
- "size": 14353,
- "file_name": "image.jpg",
}, - "topics": [
- {
- "id": 135,
- "name": "News"
}
]
}
}