CreatePageBody

Request body for creating a Page.

Definition

TypeScript
interface CreatePageBody {
  workspaceId: string;
  title: string;
  slug?: string | undefined;
  body?: string | undefined;
  parentId?: string | null | undefined;
  kind?: "dashboard" | "page" | undefined;
}

Fields

FieldTypeNotes
workspaceIdstringrequired — Workspace that will own the new page.
titlestringrequired — Display title.
slugstring | undefinedoptional — Optional override. Defaults to slugify(title). Must be kebab-case, unique among siblings, and not a reserved slug.
bodystring | undefinedoptional — MDX source. Defaults to an empty string.
parentIdstring | null | undefinedoptional — Parent page. Must be null for dashboards.
kind"dashboard" | "page" | undefinedoptional — Defaults to page. Dashboards must have parentId = null.