create_page
Creates a new page as the last child of the page given in the path. Pass the collection's rootParentId (invisible root, from List Collections) to create a top-level page (type 1, parent page/module); pass any other page id to create a subpage (type 3). The type is decided by the parent, not the body. New pages start as draft (state 1); passing state 2 publishes immediately (parent must already be published) and returns publicUrl. Requires READ_WRITE permission. To write the page body afterwards use Update Page Content. Body fields:
name (string, required) - Page title (min 1 char). urlName (string, optional) - URL slug (min 3 chars); made unique among siblings. Derived from name if omitted. contents (string, optional) - Legacy initial HTML/text contents column (editor content is stored in doc-rtc; prefer Update Page Content). state (number, optional) - 0 pending, 1 draft (default), 2 approved/published (publishes right away; parent must be published), 3 rejected. meta (object, optional) - Page metadata object (e.g. {"description":"...","tags":["setup"]}); may include editable boolean. sharingMeta (object, optional) - Sharing settings object, e.g. {"editable":true}. pageType (number, optional) - Accepted (1 or 3) but ignored; the type is derived from the parent page. uniqueTabId (string, optional) - Optional browser tab id used only to suppress the realtime socket echo to the calling tab; agents can omit it. POST https://api.docstar.io/orgs/:orgId/pages/:pageId
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"orgId": "<orgId>",
"pageId": "<pageId>"
},
"name": "create_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | e.g. Getting Started | |
| orgId | Yes | Organization (company) ID of the current workspace | |
| state | No | e.g. 1 | |
| pageId | Yes | 12-character id of the PARENT page (rootParentId for a top-level page) | |
| urlName | No | e.g. getting-started | |
| contents | No | e.g. content in markdown |