GiantContext TypeScript SDK
Official TypeScript SDK for the Giant Context API -- an autonomous marketing platform.
| Resource | Link |
|---|---|
| npm | npmjs.com/package/@giantcontext/sdk-typescript |
| GitHub | github.com/giantcontext/sdk-typescript |
| Python SDK | pypi.org/project/giantcontext |
| Python GitHub | github.com/giantcontext/sdk-python |
| Developer Portal | giantcontext.com/en/developers |
| Platform | giantcontext.com |
Installation
npm install @giantcontext/sdk-typescript
# or
pnpm add @giantcontext/sdk-typescript
# or
yarn add @giantcontext/sdk-typescript
Usage
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({
apiKey: process.env.GIANTCONTEXT_API_KEY!,
});
// Get your organizations
const orgs = await gc.me.listMyOrganizations();
const org = orgs[0];
// List projects in the organization
const { data: projects } = await gc.projects.listProjects({ id: org.id });
// Find the website app in the first project
const project = projects[0];
const { data: apps } = await gc.projectApps.listProjectApps({
id: org.id,
projectId: project.id,
});
const websiteApp = apps.find((app) => app.appType === "website");
// List all website pages
const { data: pages } = await gc.website.listWebsitePages({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
console.log(`Found ${pages.length} pages`);
for (const page of pages) {
console.log(` ${page.title} - ${page.slug}`);
}
Authentication
The SDK uses API keys that start with gct_. Get yours from the Giant Context console under Settings > API Keys.
const gc = createGiantContext({
apiKey: "gct_a1b2c3d4e5f6...",
});
How it works: The SDK automatically exchanges your API key for a short-lived JWT on the first request, then caches the token until 60 seconds before expiry. You never need to manage tokens yourself.
Environment variable pattern:
# .env
GIANTCONTEXT_API_KEY=gct_a1b2c3d4e5f6...
const gc = createGiantContext({
apiKey: process.env.GIANTCONTEXT_API_KEY!,
});
Core Concepts
Giant Context organizes content in a hierarchy:
Organization (my-company)
└── Project (marketing-site)
├── Website App
│ ├── Pages
│ ├── Posts (blog)
│ ├── Layouts
│ ├── Headers
│ ├── Footers
│ ├── Sidebars
│ └── Dialogs
├── Email App
│ ├── Emails (each carries a natural-language trigger description)
│ ├── Sends (the delivery timeline Mind plans per contact)
│ ├── Headers
│ └── Footers
├── CRM App
│ ├── Contacts
│ ├── Companies
│ └── Activities
├── Forms App
│ ├── Forms
│ └── Submissions
├── Knowledge Base App
│ ├── Articles
│ └── Categories
└── Chat App
└── Conversations
Key entities:
- Organizations -- Top-level workspace. Like a GitHub org, this is your team or company.
- Projects -- Within an org. Contains all content, apps, files, and branding for a single site or product.
- Apps -- Within a project. Each app type (Website, Email, CRM, Forms, Knowledge Base, Chat) is a separate app instance with its own content.
- Files -- Media library shared across all apps in a project. Supports folders, search, and image variants.
- Branding -- Design tokens (colors, fonts, logos) applied to apps within a project.
- Ideas -- AI-generated content suggestions from Mind (the built-in AI). Review, approve, or dismiss.
- Drafts -- AI-generated content with a review workflow:
pending>ready>accepted/rejected>published.
Working with Organizations and Projects
List your organizations
const orgs = await gc.me.listMyOrganizations();
// [{ id: "d3f1a2b4-...", name: "My Company", slug: "my-company", ... }]
Get an organization by slug
const org = await gc.organizations.getOrganizationBySlug({
slug: "my-company",
});
// { id: "d3f1a2b4-...", name: "My Company", plan: "pro", ... }
List projects
const { data: projects, meta } = await gc.projects.listProjects({
id: org.id,
});
// data: [{ id: "...", name: "Marketing Site", slug: "marketing-site", ... }]
// meta: { total: 3, page: 1, pageSize: 25, pageCount: 1 }
Get a project by slug
const project = await gc.projects.getProjectBySlug({
id: org.id,
projectSlug: "marketing-site",
});
// { id: "...", name: "Marketing Site", defaultLocale: "en", apps: [...] }
Discover apps in a project
Every project contains one or more apps. Use listProjectApps to discover them, then use the appType field to find the one you need:
const { data: apps } = await gc.projectApps.listProjectApps({
id: org.id,
projectId: project.id,
});
const websiteApp = apps.find((a) => a.appType === "website");
const emailApp = apps.find((a) => a.appType === "email");
const crmApp = apps.find((a) => a.appType === "crm");
const formsApp = apps.find((a) => a.appType === "forms");
const kbApp = apps.find((a) => a.appType === "knowledgeBase");
const chatApp = apps.find((a) => a.appType === "chat");
Or look up an app directly by slug:
const app = await gc.projectApps.getProjectAppBySlug({
id: org.id,
projectId: project.id,
appSlug: "main-website",
});
Working with Website Content
All website methods require organizationId, projectId, and appId. Get these from the org/project/app discovery pattern above.
List pages
const { data: pages, meta } = await gc.website.listWebsitePages({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
for (const page of pages) {
console.log(`${page.title} (${page.slug})`);
}
Get a single page
const page = await gc.website.getWebsitePage({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
pageId: "a1b2c3d4-5678-9abc-def0-1234567890ab",
});
// { id: "...", title: "About Us", slug: "about-us", content: { sections: [...] }, ... }
List blog posts
const { data: posts } = await gc.website.listWebsitePosts({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
search: "product launch", // optional: filter by keyword
});
Get a single blog post
const post = await gc.website.getWebsitePost({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
postId: "b2c3d4e5-6789-abcd-ef01-234567890abc",
});
Layouts, headers, footers, sidebars
// Layouts
const { data: layouts } = await gc.website.listWebsiteLayouts({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
// Headers
const { data: headers } = await gc.website.listWebsiteHeaders({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
// Footers
const { data: footers } = await gc.website.listWebsiteFooters({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
// Sidebars
const { data: sidebars } = await gc.website.listWebsiteSidebars({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
Dialogs (modals/popups)
const { data: dialogs } = await gc.website.listWebsiteDialogs({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
Tags and URLs
// Get all tags used in the website
const tags = await gc.website.listWebsiteTags({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
// Get all page URLs (useful for sitemaps)
const { urls } = await gc.website.listWebsiteUrls({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
});
Using lite mode
Many list endpoints accept a lite parameter. When set to "true", responses omit heavy fields like full content bodies, returning only metadata. Use this for listing/browsing UI:
const { data: pages } = await gc.website.listWebsitePages({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
lite: "true", // lighter response, no full content bodies
});
Working with Email
There are no campaigns or segments. Each email carries a natural-language trigger description ("send 48h after signup if onboarding isn't finished"), and Mind decides what to send, when, per contact. The sends timeline is the record of what it planned and delivered.
// List emails
const { data: emails } = await gc.email.listEmails({
organizationId: org.id,
projectId: project.id,
appId: emailApp.id,
});
// Get a specific email
const email = await gc.email.getEmail({
organizationId: org.id,
projectId: project.id,
appId: emailApp.id,
emailId: "c3d4e5f6-7890-abcd-ef01-34567890abcd",
});
// List sends (past + planned deliveries across the app)
const { data: sends } = await gc.email.listEmailSends({
organizationId: org.id,
projectId: project.id,
appId: emailApp.id,
});
// A contact's full email timeline (what Mind sent and has planned)
const timeline = await gc.email.getContactEmailTimeline({
organizationId: org.id,
projectId: project.id,
appId: emailApp.id,
contactId: "d4e5f6a7-8901-bcde-f012-4567890abcde",
});
// Email headers and footers
const { data: emailHeaders } = await gc.email.listEmailHeaders({
organizationId: org.id,
projectId: project.id,
appId: emailApp.id,
});
const { data: emailFooters } = await gc.email.listEmailFooters({
organizationId: org.id,
projectId: project.id,
appId: emailApp.id,
});
Working with CRM
// List contacts (with pagination and search)
const { data: contacts, meta } = await gc.crm.listCrmContacts({
organizationId: org.id,
projectId: project.id,
appId: crmApp.id,
page: "1",
pageSize: "50",
search: "jane",
});
// Get a single contact
const contact = await gc.crm.getCrmContact({
organizationId: org.id,
projectId: project.id,
appId: crmApp.id,
contactId: "d4e5f6a7-8901-bcde-f012-4567890abcde",
});
// List companies
const { data: companies } = await gc.crm.listCrmCompanies({
organizationId: org.id,
projectId: project.id,
appId: crmApp.id,
});
// Get contacts for a specific company
const companyContacts = await gc.crm.listCrmCompanyContacts({
organizationId: org.id,
projectId: project.id,
appId: crmApp.id,
companyId: companies[0].id,
});
// List activities (calls, emails, meetings, tasks, notes)
const { data: activities } = await gc.crm.listCrmActivities({
organizationId: org.id,
projectId: project.id,
appId: crmApp.id,
});
// Get activities for a specific contact
const contactActivities = await gc.crm.listCrmContactActivities({
organizationId: org.id,
projectId: project.id,
appId: crmApp.id,
contactId: contact.id,
});
Working with Forms
// List forms
const { data: forms } = await gc.forms.listForms({
organizationId: org.id,
projectId: project.id,
appId: formsApp.id,
});
// Get a specific form
const form = await gc.forms.getForm({
organizationId: org.id,
projectId: project.id,
appId: formsApp.id,
formId: forms[0].id,
});
// List submissions for a form
const { data: submissions } = await gc.forms.listFormSubmissions({
organizationId: org.id,
projectId: project.id,
appId: formsApp.id,
formId: forms[0].id,
page: "1",
pageSize: "25",
});
// Get a single submission
const submission = await gc.forms.getFormSubmission({
organizationId: org.id,
projectId: project.id,
appId: formsApp.id,
formId: forms[0].id,
submissionId: submissions[0].id,
});
Working with Knowledge Base
// List categories
const categories = await gc.other.listKbCategories({
organizationId: org.id,
projectId: project.id,
appId: kbApp.id,
});
// List articles (optionally filter by category or status)
const { data: articles } = await gc.other.listKbArticles({
organizationId: org.id,
projectId: project.id,
appId: kbApp.id,
categoryId: categories[0]?.id,
status: "published",
});
// Get a single article
const article = await gc.other.getKbArticle({
organizationId: org.id,
projectId: project.id,
appId: kbApp.id,
articleId: articles[0].id,
});
Working with Chat
// List conversations
const { data: conversations } = await gc.chat.listChatConversations({
organizationId: org.id,
projectId: project.id,
appId: chatApp.id,
});
// Get a conversation with paginated messages
const conversation = await gc.chat.getChatConversation({
organizationId: org.id,
projectId: project.id,
appId: chatApp.id,
conversationId: conversations[0].id,
limit: "50",
});
Working with Files
Files are shared across all apps in a project. The files API lives on gc.projectFiles.
List files
const { data: files, meta } = await gc.projectFiles.listFiles({
id: org.id,
projectId: project.id,
page: "1",
pageSize: "50",
});
for (const file of files) {
console.log(`${file.filename} (${file.mimeType}, ${file.sizeBytes} bytes)`);
console.log(` URL: ${file.url}`);
}
Get a single file
const file = await gc.projectFiles.getFile({
id: org.id,
projectId: project.id,
fileId: "e5f6a7b8-9012-cdef-0123-567890abcdef",
});
// { id: "...", filename: "hero.jpg", url: "https://...", width: 1920, height: 1080, variants: { thumbnail: {...}, small: {...}, medium: {...}, large: {...} } }
Search files by content
const results = await gc.projectFiles.searchProjectFiles({
id: org.id,
projectId: project.id,
query: "product roadmap",
limit: "10",
});
// [{ fileId: "...", filename: "roadmap.pdf", similarity: 0.87, matchingContent: "..." }]
Save a file from text content
const file = await gc.projectFiles.saveFile({
id: org.id,
projectId: project.id,
data: {
content: "# Meeting Notes\n\nDiscussed Q3 goals...",
filename: "meeting-notes-2025-01.md",
mimeType: "text/markdown",
title: "Q3 Planning Meeting Notes",
},
});
Folders
// List all folders
const folders = await gc.projectFiles.listFileFolders({
id: org.id,
projectId: project.id,
});
// Get files in a specific folder
const { data: folderFiles } = await gc.projectFiles.listFiles({
id: org.id,
projectId: project.id,
folderId: folders[0].id,
});
// Get a folder by ID
const folder = await gc.projectFiles.getFileFolder({
id: org.id,
projectId: project.id,
folderId: folders[0].id,
});
Find where a file is used
const references = await gc.projectFiles.listFileReferences({
id: org.id,
projectId: project.id,
fileId: file.id,
});
// [{ type: "page", id: "...", name: "About Us", projectId: "..." }]
Working with Drafts
Drafts are AI-generated content that go through a review workflow. When you request content generation, it runs asynchronously. Poll the draft status until it completes.
List drafts
const { data: drafts } = await gc.drafts.listDrafts({
id: org.id,
projectId: project.id,
});
for (const draft of drafts) {
console.log(`${draft.title} [${draft.status}] - ${draft.contentType}`);
}
Request an edit draft
const result = await gc.drafts.editDraft({
data: {
organizationId: org.id,
projectId: project.id,
contentType: "page",
resourceId: "a1b2c3d4-5678-9abc-def0-1234567890ab",
prompt: "Rewrite the hero section to focus on enterprise customers",
},
});
// { draftId: "f6a7b8c9-...", status: "pending" }
Poll for draft completion
async function waitForDraft(orgId: string, projectId: string, draftId: string) {
while (true) {
const draft = await gc.drafts.getDraft({
id: orgId,
projectId,
draftId,
});
if (draft.status === "ready") {
console.log("Draft is ready for review");
return draft;
}
if (draft.status === "failed") {
throw new Error(`Draft failed: ${draft.errorMessage}`);
}
// Still processing, wait and retry
await new Promise((resolve) => setTimeout(resolve, 3000));
}
}
const draft = await waitForDraft(org.id, project.id, result.draftId);
console.log(`Quality score: ${draft.qualityScore}`);
console.log(`Items: ${draft.itemCount}`);
Working with Ideas
Ideas are AI-generated content suggestions from Mind. They surface opportunities based on your existing content and knowledge base.
List ideas
const { data: ideas } = await gc.ideas.listIdeas({
id: org.id,
projectId: project.id,
});
for (const idea of ideas) {
console.log(`[${idea.priority}] ${idea.title}`);
console.log(` ${idea.description}`);
console.log(` Status: ${idea.status}`);
}
Approve an idea
Approving an idea triggers draft generation. You can optionally override the content type or provide a custom prompt:
const approved = await gc.ideas.approveIdea({
id: org.id,
projectId: project.id,
ideaId: ideas[0].id,
data: {
contentType: "post",
prompt: "Focus on a beginner audience",
},
});
// approved.status === "approved"
// approved.draftId will be set once generation starts
Dismiss an idea
const dismissed = await gc.ideas.dismissIdea({
id: org.id,
projectId: project.id,
ideaId: ideas[1].id,
data: {
reason: "Already covered in the FAQ page",
},
});
Working with Branding
// List brandings for a project
const { data: brandings } = await gc.projectBranding.listProjectBrandings({
id: org.id,
projectId: project.id,
});
// Get a specific branding (colors, fonts, logos)
const branding = await gc.projectBranding.getProjectBranding({
id: org.id,
projectId: project.id,
brandingId: brandings[0].id,
});
Pagination
List endpoints return paginated responses with a meta object:
const { data, meta } = await gc.website.listWebsitePages({
organizationId: org.id,
projectId: project.id,
appId: websiteApp.id,
page: "1",
pageSize: "25",
});
console.log(`Page ${meta.page} of ${meta.pageCount}`);
console.log(`${meta.total} total items`);
Iterating through all pages
async function getAllPages(orgId: string, projectId: string, appId: string) {
const allPages = [];
let page = 1;
while (true) {
const { data, meta } = await gc.website.listWebsitePages({
organizationId: orgId,
projectId: projectId,
appId: appId,
page: String(page),
pageSize: "100",
});
allPages.push(...data);
if (page >= meta.pageCount) break;
page++;
}
return allPages;
}
Error Handling
The SDK throws Axios errors. Inspect error.response for API error details:
import { AxiosError } from "axios";
try {
const project = await gc.projects.getProject({
id: org.id,
projectId: "nonexistent-id",
});
} catch (error) {
if (error instanceof AxiosError && error.response) {
console.error("Status:", error.response.status); // 404
console.error("Message:", error.response.data.message); // "Project not found"
console.error("Code:", error.response.data.code); // "NOT_FOUND"
} else {
// Network error, timeout, etc.
console.error("Request failed:", error.message);
}
}
Error codes
| Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid parameters or request body |
| 401 | UNAUTHORIZED | Invalid or expired API key |
| 403 | FORBIDDEN | Insufficient permissions for this resource |
| 404 | NOT_FOUND | Resource does not exist |
| 429 | RATE_LIMITED | Too many requests. Back off and retry. |
| 500 | INTERNAL_ERROR | Server error. Retry with backoff. |
Request IDs and Tracing
Every API response includes an x-request-id header for debugging. When reporting issues, include this ID:
import axios, { AxiosError } from "axios";
try {
await gc.projects.getProject({ id: org.id, projectId: "some-id" });
} catch (error) {
if (error instanceof AxiosError && error.response) {
const requestId = error.response.headers["x-request-id"];
console.error(
`Request failed (${requestId}):`,
error.response.data.message,
);
// Include requestId when contacting support
}
}
Configuration
const gc = createGiantContext({
// Required: Your API key (get one from Settings > API Keys in the console)
apiKey: process.env.GIANTCONTEXT_API_KEY!,
// Optional: Custom API base URL (default: https://api.giantcontext.com)
baseUrl: "https://api.giantcontext.com",
// Optional: Request timeout in milliseconds (default: 30000)
timeout: 30000,
});
You can also instantiate the class directly:
import { GiantContext } from "@giantcontext/sdk-typescript";
const gc = new GiantContext({
apiKey: process.env.GIANTCONTEXT_API_KEY!,
});
API Reference
265 methods across 33 resources.
- API Keys (2)
- Analytics (2)
- App Members (2)
- Bug Reports (2)
- Builder (16)
- CRM (8)
- Chat (7)
- Content Versions (3)
- Developers (14)
- Drafts (8)
- Email (18)
- Feature Requests (3)
- Forms (7)
- Health (1)
- Ideas (7)
- Invitations (3)
- KB (13)
- Me (6)
- Organization Members (5)
- Organizations (4)
- People (22)
- Plans (6)
- Project Apps (6)
- Project Branding (2)
- Project Domains (2)
- Project Envs (5)
- Project Files (15)
- Project Legal Documents (5)
- Project Members (2)
- Project Trash (6)
- Project Workflows (4)
- Projects (6)
- Website (53)
API Keys
gc.apiKeys — List your own API keys across organizations; never returns the secret value, List all API keys in an organization; metadata only, no secret values, and more.
listMyApiKeys
List your own API keys across organizations; never returns the secret value Returns all active API keys belonging to the current user. Each key includes its ID, name, creation date, expiration date, and associated organization. The secret key value is not returned for security.
| Parameter | Type | Required |
|---|---|---|
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
name | string | No |
organizationId | string | No |
Returns: Promise<object>
const result = await gc.apiKeys.listMyApiKeys({
page: 1,
});
listOrganizationApiKeys
List all API keys in an organization; metadata only, no secret values Returns all active API keys for an organization. Each key object includes its ID, name, creation date, expiration date, and the user it is associated with. The secret key value is never returned in list responses. Requires admin or owner role within the organization.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
name | string | No |
userId | string | No |
Returns: Promise<object>
const result = await gc.apiKeys.listOrganizationApiKeys({
organizationId: "uuid-organizationId",
page: 1,
});
Analytics
gc.analytics — Website traffic for one project, Traffic and usage across an organization, and more.
getProjectAnalyticsReport
Website traffic for one project Returns one analytics report for this project, chosen with 'dimension'. Five cover the public website: 'website-traffic' for views over time, 'website-pages' for the most-read pages, and 'website-countries', 'website-devices' and 'website-cities' for where and how people read it. The rest cover the project's own use of the platform: 'activity' for events over time, 'events-by-category' and 'tokens-by-category' for what those events were and what they cost, 'operations' and 'top-operations' for which operations ran, and 'health' and 'avg-response-time' for how they went. Narrow the range with startDate and endDate and choose the bucket size with interval; reports that group by a column take 'field' and default to the one the report is named for. The whole report comes back in one response unless pageSize asks for a slice of it, and 'meta.total' is its size either way. A report is never silently shortened: if the response would exceed 256KB it is refused with the measurement and with the ways to shrink it — a narrower date range, a coarser interval, a smaller limit, or pageSize to take it a page at a time. Covers only this project — no other organization's figures are reachable through it.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
dimension | string | Yes |
appId | string | No |
startDate | string | No |
endDate | string | No |
interval | string | No |
field | string | No |
limit | string | No |
action | string | No |
appSlug | string | No |
appType | string | No |
blockType | string | No |
browser | string | No |
category | string | No |
channel | string | No |
city | string | No |
contentType | string | No |
countryCode | string | No |
deviceType | string | No |
endpoint | string | No |
entityType | string | No |
hostname | string | No |
httpMethod | string | No |
kind | string | No |
locale | string | No |
mimeType | string | No |
model | string | No |
os | string | No |
outcome | string | No |
part | string | No |
platform | string | No |
project | string | No |
projectSlug | string | No |
rating | string | No |
region | string | No |
resource | string | No |
resourceType | string | No |
role | string | No |
source | string | No |
sourceType | string | No |
status | string | No |
statusCode | string | No |
tag | string | No |
template | string | No |
type | string | No |
writer | string | No |
Returns: Promise<object>
const result = await gc.analytics.getProjectAnalyticsReport({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
page: 1,
dimension: "value",
});
getOrganizationAnalyticsReport
Traffic and usage across an organization Returns one analytics report covering every project in this organization, chosen with 'dimension'. Five cover the public websites: 'website-traffic' for views over time, 'website-pages' for the most-read pages, and 'website-countries', 'website-devices' and 'website-cities' for where and how people read them. The rest cover the organization's own use of the platform: 'activity' for events over time, 'events-by-category' and 'tokens-by-category' for what those events were and what they cost, 'operations' and 'top-operations' for which operations ran, and 'health' and 'avg-response-time' for how they went. Narrow the range with startDate and endDate and choose the bucket size with interval; reports that group by a column take 'field', which accepts 'projectSlug' here to split a total between the organization's projects. The whole report comes back in one response unless pageSize asks for a slice of it, and 'meta.total' is its size either way. A report is never silently shortened: if the response would exceed 256KB it is refused with the measurement and with the ways to shrink it — a narrower date range, a coarser interval, a smaller limit, or pageSize to take it a page at a time. Covers only this organization — no other organization's figures are reachable through it.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
dimension | string | Yes |
appId | string | No |
startDate | string | No |
endDate | string | No |
interval | string | No |
field | string | No |
limit | string | No |
action | string | No |
appSlug | string | No |
appType | string | No |
blockType | string | No |
browser | string | No |
category | string | No |
channel | string | No |
city | string | No |
contentType | string | No |
countryCode | string | No |
deviceType | string | No |
endpoint | string | No |
entityType | string | No |
hostname | string | No |
httpMethod | string | No |
kind | string | No |
locale | string | No |
mimeType | string | No |
model | string | No |
os | string | No |
outcome | string | No |
part | string | No |
platform | string | No |
project | string | No |
projectSlug | string | No |
rating | string | No |
region | string | No |
resource | string | No |
resourceType | string | No |
role | string | No |
source | string | No |
sourceType | string | No |
status | string | No |
statusCode | string | No |
tag | string | No |
template | string | No |
type | string | No |
writer | string | No |
Returns: Promise<object>
const result = await gc.analytics.getOrganizationAnalyticsReport({
organizationId: "uuid-organizationId",
page: 1,
dimension: "value",
});
App Members
gc.appMembers — Get an app member by ID, List users with explicit app-level roles, excluding inherited org and project access, and more.
getAppMember
Get an app member by ID Retrieves the full details of a specific app member by their membership ID. Returns the member's user profile information (name, email, avatar) along with their assigned role within the app and membership timestamps.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
memberId | string | Yes |
Returns: Promise<object>
const result = await gc.appMembers.getAppMember({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
memberId: "uuid-memberId",
});
listAppMembers
List users with explicit app-level roles, excluding inherited org and project access Returns a paginated list of all members who have been explicitly assigned roles at the app level. Each member entry includes the user's profile information (name, email, avatar) and their assigned role within the app. This is separate from organization-level or project-level membership; only users with direct app-level role assignments are returned.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
role | string | No |
Returns: Promise<object>
const result = await gc.appMembers.listAppMembers({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
page: 1,
});
Bug Reports
gc.bugReports — List bug reports you filed, with severity, status and GitHub issue link, List comments for a bug report, and more.
listMyBugReports
List bug reports you filed, with severity, status and GitHub issue link Returns a paginated list of bug reports submitted by the current user, filterable by status, severity and source and searchable by title or description. Each report includes its title, description, steps to reproduce, expected/actual behavior, severity, status (open/resolved/cancelled), browser info, page URL, report count, and linked GitHub issue details if any.
| Parameter | Type | Required |
|---|---|---|
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
status | string | No |
severity | string | No |
source | string | No |
reportCount | string | No |
createdAt | string | No |
Returns: Promise<object>
const result = await gc.bugReports.listMyBugReports({
page: 1,
});
listBugReportComments
List comments for a bug report Returns all team comments and responses for a specific bug report owned by the current user. Each comment includes its ID, the comment text, the author name, and a creation timestamp. Comments are returned in chronological order.
| Parameter | Type | Required |
|---|---|---|
bugReportId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
author | string | No |
source | string | No |
createdAt | string | No |
Returns: Promise<object>
const result = await gc.bugReports.listBugReportComments({
bugReportId: "uuid-bugReportId",
page: 1,
});
Builder
gc.builder — Get every content type and the blocks allowed in it, Get the styles schema shared by every block, Get one block type's own fields and hints, and more.
getContentTypes
Get every content type and the blocks allowed in it Lists every content type — website pages, posts, landings, headers, footers, sidebars, dialogs and layouts; kb articles and landings; developer docs and landings; forms; emails and their headers and footers — with the builder context each belongs to and the exact block types allowed inside it.
Returns: Promise<object>
const result = await gc.builder.getContentTypes();
getBlockStyles
Get the styles schema shared by every block Returns the one styles object every block, column and section accepts — margin, padding, width, background, border, box shadow, position, per-breakpoint visibility, entrance animation and cssId/cssClasses. It is identical for every block type and is not repeated on each one. The schema carries its own value-format guidance: which fields take per-breakpoint objects, when a bare number means a theme spacing multiple rather than pixels, and exactly which colour tokens resolve. A per-breakpoint { desktop, tablet, mobile } object sent to a flat field does not error and does not render.
Returns: Promise<{ styles: unknown; }>
const result = await gc.builder.getBlockStyles();
getBlock
Get one block type's own fields and hints Returns the JSON schema for a single block type plus its per-field authoring hints, scoped to (and validated against) the content type's palette. The styles object is identical for every block type and is not repeated here.
| Parameter | Type | Required |
|---|---|---|
blockType | string | Yes |
contentType | string | Yes |
Returns: Promise<{ type: string; schema: unknown; hints: Record<string, unknown>; }>
const result = await gc.builder.getBlock({
blockType: "value",
contentType: "value",
});
deleteSection
Delete a section and every block inside it; recoverable from version history Removes a section (and its blocks) from a content tree and records a version. Returns the removed section. The prior state is recoverable from version history.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<{ section: unknown; }>
const result = await gc.builder.deleteSection({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
insertSection
Insert a section into a content tree Inserts a new section (validated against the section schema, including any blocks it carries) and records a version. Every field on the supplied section is kept; only id and type are server-owned. Ids are generated for the section and for any columns/blocks that omit one. Omit an anchor to append at the end. A section given no columns is created with one empty column.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<{ section: unknown; position: number; }>
const result = await gc.builder.insertSection({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
updateSection
Update a section's own properties; blocks stay untouched and columns cannot be patched Patches a section's own properties and records a version. Any section field may be patched; id, type and columns are refused with an error rather than ignored. Does not touch its blocks.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<{ section: unknown; }>
const result = await gc.builder.updateSection({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
deleteBlock
Delete a block, returning it; the prior tree stays in version history Removes a block from a content tree and records a version. Returns the removed block, plus columnRemoved or sectionRemoved when deleting the block emptied its container: an empty column is pruned (it renders a gap) and, when that empties the whole section, the section is pruned too (it paints an orphan background band). Non-destructive at the history level — the prior state is recoverable from version history.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<object>
const result = await gc.builder.deleteBlock({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
insertBlock
Insert a block into a content tree Inserts a new block into a content entity's tree and records a version. The block's data is validated against its type's schema and the content's block palette. Returns the created block (with its generated id).
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<object>
const result = await gc.builder.insertBlock({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
updateBlock
Update a block's data and/or styles by merging only the fields you send; null clears a field Merges the supplied fields into a block's data and/or its styles and records a version. Send data, styles, or both; fields you omit keep their current value; send null to clear one. Styles cover padding, margins, borders, background, alignment and hideOnMobile. Locale maps merge per locale, so writing one language leaves the others intact. Validated against the block type's schema.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<{ block: unknown; }>
const result = await gc.builder.updateBlock({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
moveSection
Move a section before or after a sibling, or append it at the end Reorders a section to a new position (relative to a sibling, or appended) and records a version. Returns the moved section.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<{ section: unknown; }>
const result = await gc.builder.moveSection({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
moveBlock
Move a block beside a sibling or into a section, leaving its data unchanged Relocates a block to a new anchor (next to a sibling, or into a section) and records a version. Returns the moved block.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<{ block: unknown; }>
const result = await gc.builder.moveBlock({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
setContentVisibility
Set whether content is listed and whether it requires a signed-in reader Changes who may read a content item and whether anything advertises it, and nothing else — not its content, status, slug or metadata. The two flags are independent. isListed governs whether the item appears in the sitemap, indexes, grids and search; an unlisted item stays live at its own URL, which is 'anyone with the link'. requiresViewerAuth governs whether an anonymous reader is served the body at all; a gated item renders the site's Sign In Page instead, never a 404. All four combinations are meaningful, including listed and gated — a page whose existence is public and whose contents are not. Only website pages and posts can be gated; a KB article, a developer doc or a landing can only be unlisted, and a request to gate one is refused by name. Only the flags sent are changed.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<object>
const result = await gc.builder.setContentVisibility({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
unpublishContent
Unpublish a content item, returning it to draft Takes a published content item off the public site and returns it to draft. The body, slug and metadata are left untouched, so it can be published again unchanged, and the first-published date is kept rather than cleared.
A pending scheduled publish is cancelled, so an item taken down stays down instead of reappearing when its old schedule comes due. The search engines are told the URL is gone and the public cache is purged, so the page stops being served rather than lingering in a cache or an index. The response reports alreadyInState when the item was a draft already.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<object>
const result = await gc.builder.unpublishContent({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
publishContent
Publish a page, post, article, doc or email — status only, never the body Sets a content item's status to published and leaves everything else untouched: not its content, slug, layout or metadata. Works for every content type that has a draft/published lifecycle — website pages and posts, KB articles, developer docs and emails. Structural pieces (headers, footers, layouts, landings, forms) are always live and are refused by name. Publishing re-indexes the item for AI search, signals the search engines, and purges the public cache. Re-publishing something already published is not an error; the response says alreadyInState. A publishAt with a future timestamp schedules instead of publishing: the item stays a draft until a job takes it live, and the response returns scheduledPublishAt with status still draft. A publishAt in the past is rejected rather than treated as publish-now, and publishing or unpublishing by hand cancels a schedule already pending. Publishing is refused when the content references a tenant value the project has not defined — a {{env.name}} with no matching entry under Project envs — and the refusal names the values, so define them or remove the references and publish again. Unpublishing is never refused for that reason.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
data | object | Yes |
Returns: Promise<object>
const result = await gc.builder.publishContent({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
data: { /* ... */ },
});
searchContent
Find a string or a block type inside content Search the content of pages, posts, KB articles and developer docs in a project — by exact case-insensitive string (query), by block type (blockTypes), or both. A text query also searches each section's heading and subheading, not just block copy. Filter by content type and by draft/published status. Every match reports its full location — contentId (canonical type), sectionId, columnId and blockId — plus matchIn (block, heading or subheading). blockTypes is validated against the content type's palette, so an unknown type errors rather than returning an empty result. The field path, locale and snippet are populated for a text query and null for a pure block-type match, and the locale a match reports is the one that holds it — patching a different locale overwrites another language.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
query | string | No |
blockTypes | string | No |
contentTypes | string | No |
status | string | No |
limit | string | No |
Returns: Promise<object>
const result = await gc.builder.searchContent({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
});
getContent
Get a content tree for editing Returns the full Section[] content tree (with every section/column/block id) for a content entity — pages, posts, landings, etc. Includes the id of every section, column and block.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
contentType | string | Yes |
contentId | string | Yes |
Returns: Promise<{ content: Array<Record<string, unknown>>; }>
const result = await gc.builder.getContent({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
contentType: "value",
contentId: "uuid-contentId",
});
CRM
gc.crm — Get one activity's description, writing app and JSON data payload, List the activity timeline for a whole CRM app, newest first, searchable, Log a past-tense sentence onto a contact or company timeline, append-only, and more.
getCrmActivity
Get one activity's description, writing app and JSON data payload Returns a single CRM activity by ID. Each activity is a natural-language description of something that happened, tagged with the app that wrote it, with optional JSON metadata and linked contact/company objects.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
activityId | string | Yes |
Returns: Promise<object>
const result = await gc.crm.getCrmActivity({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
activityId: "uuid-activityId",
});
listCrmActivities
List the activity timeline for a whole CRM app, newest first, searchable
Returns a paginated timeline of CRM activities for the specified app, newest first. Each activity is a natural-language description of something that happened for a contact (or company), tagged with the app that wrote it and optionally enriched with a JSON data payload. Supports free-text search across the description.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
contactId | string | No |
companyId | string | No |
writtenBy | string | No |
createdAt | string | No |
Returns: Promise<object>
const result = await gc.crm.listCrmActivities({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
page: 1,
});
logCrmActivity
Log a past-tense sentence onto a contact or company timeline, append-only
Appends an activity to the CRM timeline. description is a natural-language sentence ('Viewed pricing page', 'Unsubscribed from newsletter'). writtenBy identifies which app wrote it. Optional data carries structured metadata. Link to a contact and/or company via id.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
data | object | Yes |
const result = await gc.crm.logCrmActivity({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
data: { /* ... */ },
});
listCrmCompanyActivities
List a company's activity timeline, newest first, whatever app logged it Returns the natural-language activity timeline for a company, newest first. Each row is a description of something that happened, tagged with the app that wrote it, with optional JSON metadata.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
companyId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
writtenBy | string | No |
contactId | string | No |
Returns: Promise<object>
const result = await gc.crm.listCrmCompanyActivities({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
companyId: "uuid-companyId",
page: 1,
});
listCrmCompanyContacts
List contacts linked to one company, paginated, alphabetical by last name Returns a paginated list of CRM contacts linked to a specific company, ordered by last name then first name. Each contact includes name, email, phone, title, department, status, source, tags, and linked company object.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
companyId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
status | string | No |
source | string | No |
title | string | No |
department | string | No |
Returns: Promise<object>
const result = await gc.crm.listCrmCompanyContacts({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
companyId: "uuid-companyId",
page: 1,
});
listCrmCompanyTimeline
A company's timeline — its people's happenings, one stream The activity of everyone at a company, merged into one list, newest first. Because this is the people's own activity viewed through their employer, it needs permission to read people across the project as well as access to the company — access to the CRM app alone is not enough and the call is refused.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
companyId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
limit | number | No |
Returns: Promise<object>
const result = await gc.crm.listCrmCompanyTimeline({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
companyId: "uuid-companyId",
page: 1,
});
getCrmCompany
Get one company with its profile fields and count of linked contacts Returns a single CRM company by ID, including name, website, industry, size, annual revenue, contact info, address, tags, custom properties, and a count of associated contacts.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
companyId | string | Yes |
Returns: Promise<object>
const result = await gc.crm.getCrmCompany({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
companyId: "uuid-companyId",
});
listCrmCompanies
List companies in one CRM app, alphabetical by name, each with contact count Returns a paginated list of all CRM companies for the specified app. Supports search by company name or industry. Each company includes a count of associated contacts.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
name | string | No |
industry | string | No |
size | string | No |
email | string | No |
website | string | No |
Returns: Promise<object>
const result = await gc.crm.listCrmCompanies({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
page: 1,
});
Chat
gc.chat — Get chat conversation with paginated messages, Reply into a chat conversation as a human operator, Take over a chat conversation from the AI, and more.
getChatConversation
Get chat conversation with paginated messages Retrieve a chat conversation with cursor-based paginated messages. Without a cursor, returns the most recent messages (up to limit). direction=older with cursor/cursorId walks back through history.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
conversationId | string | Yes |
cursor | string | No |
cursorId | string | No |
direction | string | No |
limit | string | No |
Returns: Promise<object>
const result = await gc.chat.getChatConversation({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
conversationId: "uuid-conversationId",
});
replyToChatConversation
Reply into a chat conversation as a human operator Send a human operator's reply into a conversation. Persists an 'operator' role message and claims the conversation for the operator if it was not already held. The visitor's widget receives it on its next poll.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
conversationId | string | Yes |
data | `{ |
content: string;
}` | Yes |
const result = await gc.chat.replyToChatConversation({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
conversationId: "uuid-conversationId",
data: { /* ... */ },
});
takeOverChatConversation
Take over a chat conversation from the AI A human operator takes control of a live conversation. While held, the AI answer path stands down and the operator's replies drive the conversation. Returns the resulting hold state.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
conversationId | string | Yes |
Returns: Promise<{ heldByUserId: string | unknown; heldAt: string | unknown; }>
const result = await gc.chat.takeOverChatConversation({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
conversationId: "uuid-conversationId",
});
releaseChatConversation
Release a chat conversation back to the AI Release a conversation a human was holding. The AI answer path resumes for the conversation's next visitor message.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
conversationId | string | Yes |
const result = await gc.chat.releaseChatConversation({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
conversationId: "uuid-conversationId",
});
getChatConversationTimeline
The visitor's trail behind a conversation, newest first What the visitor in this conversation has done across the whole project — pages read, forms submitted, other conversations — newest first, so whoever answers the chat knows who they are talking to. If the visitor has been identified, their full history is included; if not, it is that browser's own activity.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
conversationId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
limit | number | No |
Returns: Promise<object>
const result = await gc.chat.getChatConversationTimeline({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
conversationId: "uuid-conversationId",
page: 1,
});
listChatConversations
List every visitor conversation in a chat app, most recently updated first List all chat conversations for a given chat app. Returns a paginated list of conversations with their IDs, titles, visitor IDs, and timestamps. Supports search filtering by conversation title or visitor ID. Results are ordered by most recently updated first. This is an admin-only endpoint used to review and manage all customer chat conversations.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
visitorId | string | No |
userId | string | No |
Returns: Promise<object>
const result = await gc.chat.listChatConversations({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
page: 1,
});
listChatEscalations
List every escalation in a chat app, newest first List all escalations for a chat app — the escalations inbox. Returns a paginated list with each escalation's status, visitor contact details, summary, originating URL, linked conversation, and timestamps. status is one of collecting_contact, collecting_summary, submitted or cancelled, and filtering it separates open handoffs from submitted or cancelled ones; visitorEmail filters to one person and search matches visitor email or summary. Results are ordered by most recently created first. Admin-only.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
status | string | No |
visitorEmail | string | No |
Returns: Promise<object>
const result = await gc.chat.listChatEscalations({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
page: 1,
});
Content Versions
gc.contentVersions — Restore an entity to an older version; non-destructive, forward history is kept, Get one version's full content snapshot, which the list tool omits, List one entity's edit history newest first; metadata only, no content snapshots, and more.
restoreContentVersion
Restore an entity to an older version; non-destructive, forward history is kept Rolls 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.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
versionId | string | Yes |
Returns: Promise<object>
const result = await gc.contentVersions.restoreContentVersion({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
versionId: "uuid-versionId",
});
getContentVersion
Get one version's full content snapshot, which the list tool omits Returns a single content version including its full Section[] content snapshot.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
versionId | string | Yes |
Returns: Promise<object>
const result = await gc.contentVersions.getContentVersion({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
versionId: "uuid-versionId",
});
listContentVersions
List one entity's edit history newest first; metadata only, no content snapshots Returns the newest-first version history for a single content entity (page, post, landing, etc). Metadata only ; content snapshots are not included. This is the undo/rollback trail for both human and AI edits.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
page | string | No |
pageSize | string | No |
lite | string | No |
sort | string | No |
search | string | No |
source | string | No |
createdBy | string | No |
version | string | No |
createdAt | string | No |
contentType | string | Yes |
contentId | string | Yes |
Returns: Promise<object>
const result = await gc.contentVersions.listContentVersions({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
page: 1,
contentType: "value",
contentId: "uuid-contentId",
});
Developers
gc.developers — Get one category's own fields, Delete developer doc category, Update a category's handle, public title and description; cannot re-slug or re-parent it, and more.
getDevelopersDocCategory
Get one category's own fields Retrieves a single developer docs category by its ID, including its name, slug, description, parent relationship, icon, and display order. Returns 404 if the category does not exist or has been soft-deleted.
| Parameter | Type | Required |
|---|---|---|
organizationId | string | Yes |
projectId | string | Yes |
appId | string | Yes |
categoryId | string | Yes |
Returns: Promise<Record<string, unknown>>
const result = await gc.developers.getDevelopersDocCategory({
organizationId: "uuid-organizationId",
projectId: "uuid-projectId",
appId: "uuid-appId",
categoryId: "uuid-categoryId",
});
deleteDevelopersDocCategory
Delete developer doc category Soft-deletes a developer docs category by moving it to the trash. Returns 404 if t