Content Versions
List, inspect, and restore prior versions of builder content (pages, posts, landings). The undo/rollback history for human and AI edits.
Restore an entity to an older version; non-destructive, forward history is kept
/organizations/{organizationId}/projects/{projectId}/content-versions/{versionId}/restoreRolls a content entity back to a prior version. Non-destructive: writes the snapshot's content to the live entity and appends a new 'revert' version, preserving forward history.
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.contentVersions.restoreContentVersion({ organizationId: org.id, projectId: projects[0].id, versionId: "ver_123",});
Get one version's full content snapshot, which the list tool omits
/organizations/{organizationId}/projects/{projectId}/content-versions/{versionId}Returns a single content version including its full Section[] content snapshot.
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 version = await gc.contentVersions.getContentVersion({ organizationId: org.id, projectId: projects[0].id, versionId: "ver_123",});
List one entity's edit history newest first; metadata only, no content snapshots
/organizations/{organizationId}/projects/{projectId}/content-versionsReturns the newest-first version history for a single content entity (page, post, landing, etc). Metadata only — use getContentVersion for a version's full content snapshot. This is the undo/rollback trail for both human and AI edits.
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 { versions } = await gc.contentVersions.listContentVersions({ organizationId: org.id, projectId: projects[0].id, contentType: "page", contentId: "content-123",});