Website
Manage website content, pages, posts, and public rendering.
Ask the search engines to recrawl a page, post, article or doc now
/organizations/{organizationId}/projects/{projectId}/content/search-indexSubmits a content item's public URL to IndexNow (Bing, Yandex, Naver, Yep, Seznam) and nudges Google to re-fetch the sitemap. Publishing or editing content already does this automatically — reach for this when something is stale anyway: the page was edited outside the platform's knowledge, a domain was verified after the content went live, or an earlier submission failed. Only web-facing content has a URL to submit: pages, posts, KB articles, developer docs and the landings. Headers, footers, layouts and forms are not submittable because they have no URL of their own, even though editing one changes what a page renders. Drafts are not submitted either.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const result = await gc.website.submitContentToSearchEngines({ organizationId: org.id, projectId: projects[0].id, data: { urls: ["https://example.com"] }});
Get the cookie banner copy, category toggles and policy links
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/consentReturns the cookie consent and privacy settings configured for this website app, including banner text, consent categories, and GDPR/CCPA compliance options.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const settings = await gc.website.getWebsiteConsentSettings({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Get one dialog with its full block tree, max width and close control
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/dialogs/{dialogId}Returns a single website dialog by ID, including its name, type, trigger rules, content blocks, and display settings.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const dialog = await gc.website.getWebsiteDialog({ organizationId: org.id, projectId: projects[0].id, appId: "my-app-id", dialogId: "my-dialog-id",});
Delete dialog
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/dialogs/{dialogId}Permanently deletes a website dialog.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { dialogs } = await gc.website.listWebsiteDialogs({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const result = await gc.website.deleteWebsiteDialog({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, dialogId: dialogs[0].id,});
List popup dialogs (modals, banners, slide-ins) in a site, newest first
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/dialogsReturns a list of all popup dialogs configured for this website app. Dialogs are used for modals, popups, banners, and slide-ins.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { dialogs } = await gc.website.listWebsiteDialogs({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Create a popup dialog; nothing shows it until a button links dialog:{id}
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/dialogsCreates a new popup dialog for this website app.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const dialog = await gc.website.createWebsiteDialog({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, data: { name: "New Dialog", content: "Dialog content" }});
Get one domain with its verification token, verified state and primary flag
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/domains/{domainId}Returns a single custom domain by ID, including hostname, verification status, SSL status, DNS records needed, and primary flag.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const domain = await gc.website.getWebsiteCustomDomain({ organizationId: org.id, projectId: projects[0].id, appId: "your-app-id", domainId: "your-domain-id",});
List a site's custom domains, primary first, with verified state and verification token
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/domainsReturns a list of all custom domains configured for this website app, including verification status, SSL status, and whether each is the primary domain. The primary domain comes first unless a sort is requested, over domain, isPrimary, isVerified, isGenerated, createdAt or updatedAt.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { customDomains } = await gc.website.listWebsiteCustomDomains({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Get one header with its full block tree, which lite listings omit
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/headers/{headerId}Returns a single website header by ID, including its name, content blocks, and timestamps.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { headers } = await gc.website.listWebsiteHeaders({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const { header } = await gc.website.getWebsiteHeader({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, headerId: headers[0].id,});
Delete website header
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/headers/{headerId}Permanently deletes a website header component.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "default-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const result = await gc.website.deleteWebsiteHeader({ organizationId: org.id, projectId: projects[0].id, appId: "app-id", headerId: "header-id"});
List a site's headers newest first, each with its block tree unless lite
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/headersReturns a list of all header components for this website app. Headers are reusable navigation/branding sections displayed at the top of pages.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { headers } = await gc.website.listWebsiteHeaders({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Create a reusable header shell; pages attach it by id, content optional
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/headersCreates a new header component for this website app.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const header = await gc.website.createWebsiteHeader({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, data: { title: "My Website Header" }});
Get the one seeded page at the site root; no create call exists
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/landingReturns the app-level website landing page rendered at the website root.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const landing = await gc.website.getWebsiteLanding({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Update the landing page's name and SEO fields; cannot publish or edit content
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/landingUpdates the fields that describe the website landing page rather than govern it: its internal name, and SEO title, description, image and noindex. Only the fields you send are changed. A landing is the app's root singleton, so it has no slug and no title. Can rebind the layout, header and footer. Cannot change the landing's content or visibility — use the block tools for content.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const result = await gc.website.updateWebsiteLandingMeta({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, data: { title: "New Landing Page Title" },});
Get one layout with its full block tree, which lite listings omit
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/layouts/{layoutId}Returns a single website layout by ID, including its name, content blocks, layout structure, and timestamps.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const layout = await gc.website.getWebsiteLayout({ organizationId: org.id, projectId: projects[0].id, appId: "your-app-id", layoutId: "your-layout-id",});
Delete website layout
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/layouts/{layoutId}Permanently deletes a website page layout.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });
const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { layouts } = await gc.website.listWebsiteLayouts({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const result = await gc.website.deleteWebsiteLayout({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, layoutId: layouts[0].id,});
List page layouts you can apply when creating a page, newest first
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/layoutsReturns a list of all page layouts for this website app. Layouts provide reusable page layouts and content block structures.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { layouts } = await gc.website.listWebsiteLayouts({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Create a layout shell; pages set layoutId to share its block tree
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/layoutsCreates a new page layout for this website app.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const result = await gc.website.createWebsiteLayout({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, data: { name: "Main Layout" },});
Get one page with its full block tree, SEO, status and layout ids
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/pages/{pageId}Returns a single website page by ID, including title, slug, full content blocks, SEO metadata, publish status, and layout references (header, footer, sidebar).
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { pages } = await gc.website.listWebsitePages({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const page = await gc.website.getWebsitePage({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, pageId: pages[0].id,});
Delete website page
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/pages/{pageId}Soft-deletes a website page by moving it to the project trash. Can be restored from trash later.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { pages } = await gc.website.listWebsitePages({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const result = await gc.website.deleteWebsitePage({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, pageId: pages[0].id,});
Update a page's name, title, slug, SEO fields, featured image and tags; cannot publish or edit content
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/pages/{pageId}Updates the fields that describe a page rather than govern it: SEO title, description, image, noindex, featured image, and tags. Only the fields you send are changed. Can rebind the layout, header and footer. Cannot change the page's content, status or visibility — use the block tools for content and publishContent to take it live.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });
const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { pages } = await gc.website.listWebsitePages({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const result = await gc.website.updateWebsitePageMeta({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, pageId: pages[0].id, data: { title: "Updated Page Title" },});
List a site's pages with slug, live URL and publish status, newest first
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/pagesReturns a list of all pages for this website app. Each page includes its title, slug, publish status, SEO metadata, and associated header/footer/sidebar references.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { data: pages } = await gc.website.listWebsitePages({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Create a page shell; content optional and status defaults to published, live immediately
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/pagesCreates a new website page. Requires a title. Optionally set slug, content blocks, SEO metadata, header, footer, and sidebar references.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const page = await gc.website.createWebsitePage({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, data: { title: "My New Page", path: "/my-new-page" }});
Get one blog post with its full content blocks, tags and SEO fields
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/posts/{postId}Returns a single blog post by ID, including title, slug, full content blocks, excerpt, tags, author, featured image, SEO metadata, and publish status.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { posts } = await gc.website.listWebsitePosts({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const post = await gc.website.getWebsitePost({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, postId: posts[0].id,});
Delete blog post
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/posts/{postId}Soft-deletes a blog post by moving it to the project trash. Can be restored from trash later.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { posts } = await gc.website.listWebsitePosts({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const response = await gc.website.deleteWebsitePost({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, postId: posts[0].id,});
Update a post's name, title, slug, excerpt, author, publish date, tags and SEO, not its content
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/posts/{postId}Updates the fields that describe a post rather than govern it: SEO title and description, excerpt, author name, publish date, tags and featured image. Only the fields you send are changed. Can rebind the layout, header and footer. Cannot change the post's content or status — use the block tools for content and publishContent to take it live.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { id: organizationId } = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId });const projectId = projects[0].id;
const appId = "app-123";const postId = "post-123";const data = { key: "value" };
const result = await gc.website.updateWebsitePostMeta({ organizationId, projectId, appId, postId, data});
List blog posts in a site, newest first, with author, tags and status
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/postsReturns a paginated list of all blog posts for this website app. Each post includes title, slug, excerpt, publish status, author, tags, and featured image.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { posts } = await gc.website.listWebsitePosts({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Create a blog post; status defaults to draft, unlike createWebsitePage
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/postsCreates a new blog post. Requires a name and slug. Optionally set content blocks, excerpt, tags, featured image, SEO metadata, and publish status.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const post = await gc.website.createWebsitePost({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, data: { title: "My New Post", content: "This is the content of the post." }});
Get one URL redirect by id
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/redirects/{redirectId}Returns a single URL redirect by ID, including its fromPath, toPath, status and source.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { redirects } = await gc.website.listWebsiteRedirects({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const redirect = await gc.website.getWebsiteRedirect({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, redirectId: redirects[0].id,});
List a site's URL redirects, newest first, with from, to, status and source
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/redirectsReturns a paginated list of the URL redirects for this website app. Each maps an old path (fromPath) to the current path (toPath) with a status (301 or 308) and a source: auto (recorded when a slug changed) or manual (added by hand).
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { redirects } = await gc.website.listWebsiteRedirects({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Get one sidebar with its full block tree, which lite listings omit
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/sidebars/{sidebarId}Returns a single website sidebar by ID, including its name, content blocks, and timestamps.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});const { sidebars } = await gc.website.listWebsiteSidebars({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
const sidebar = await gc.website.getWebsiteSidebar({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, sidebarId: sidebars[0].id,});
Delete website sidebar
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/sidebars/{sidebarId}Permanently deletes a website sidebar component.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const result = await gc.website.deleteWebsiteSidebar({ organizationId: org.id, projectId: projects[0].id, appId: "app-id", sidebarId: "sidebar-id"});
List a site's sidebars newest first, each with its block tree unless lite
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/sidebarsReturns a list of all sidebar components for this website app. Sidebars are reusable layout sections displayed alongside page content.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { sidebars } = await gc.website.listWebsiteSidebars({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Create a reusable sidebar shell; a layoutSidebar block points at it by id
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/sidebarsCreates a new sidebar component for this website app.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const sidebar = await gc.website.createWebsiteSidebar({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id, data: { name: "Main Sidebar" },});
List the tag names in use across a site's pages and posts
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/tagsReturns a list of all tags used across pages and posts in this website app. Tags are used for categorization and filtering.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { tags } = await gc.website.listWebsiteTags({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Get the site's Google Tag Manager container ID, the only tracking setting
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/trackingReturns the tracking configuration for this website app, including Google Tag Manager container ID.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const settings = await gc.website.getWebsiteTrackingSettings({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});
Get existing page slugs and each page's layout, to avoid duplicate slugs
/organizations/{organizationId}/projects/{projectId}/apps/website/{appId}/urlsReturns existing page slugs (to avoid duplicate URLs) and per-page entries with the layout each page uses (the builder's peer-usage signal for layout selection).
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });const { apps } = await gc.projects.listProjectApps({ organizationId: org.id, projectId: projects[0].id,});
const { urls } = await gc.website.getWebsiteUrls({ organizationId: org.id, projectId: projects[0].id, appId: apps[0].id,});