pages.create
Puck Pages is experimental and may change in a future release.
Create a page.
await puck.pages.create({ path: "/about" });
// { id: "page_123", path: "/about", data: { root: {}, content: [] }, version: 1, publishedVersion: null, status: "draft", createdAt: "2026-10-30T12:00:00.000Z", createdBy: null }Returns the created Page.
Args
| Param | Example | Type | Status |
|---|---|---|---|
params | { path: "/about" } | Object | Required |
options | { auth: {} } | Object | - |
params
What to create the page with.
| Param | Example | Type | Status |
|---|---|---|---|
path | path: "/about" | String | Required |
data | data: { root: {}, content: [] } | Data | - |
path
The page’s path.
data
The initial data. Defaults to an empty page.
const page = await puck.pages.create({
path: "/about",
data: { root: { props: {} }, content: [] },
});options
Set the request options for this call.