KB
Manage knowledge base articles and categories.
Get one article including its full content tree, status, SEO and category ids
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articles/{articleId}- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- articleIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});const { articles } = await gc.kb.listKbArticles({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id,});
const { article } = await gc.kb.getKbArticle({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id, articleId: articles[0].id,});
Delete KB article
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articles/{articleId}- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- articleIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });
const result = await gc.kb.deleteKbArticle({ organizationId: orgs[0].id, projectId: projects[0].id, appId: "app-id", articleId: "article-id",});
Update an article's name, title, slug, SEO fields, excerpt, tags and featured image; cannot publish or edit content
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articles/{articleId}- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- articleIdRequired
- path · string
- seo
- object
- name
- stringInternal use only
- slug
- stringThe URL segment. Changing this MOVES the public URL: a redirect from the old path to the new one is recorded automatically, so existing links keep working, but anything quoting the old URL verbatim (a printed link, an external citation) now travels one hop. Must be unique within the app — a collision is a 409, not a silent rename.
- tags
- array
- title
- unionWhat a reader sees, per locale. Send a locale map like {"en": "..."} on a multilingual project; check the project's enabledLocales with getProject first. Falls back to name where unset.
- excerpt
- union
- footerId
- unionThe footer this renders with. Discover ids with listWebsiteFooters. Null unbinds and falls back to the app default.
- headerId
- unionThe header this renders with. Discover ids with listWebsiteHeaders. Null unbinds and falls back to the app default.
- layoutId
- unionThe layout this renders inside. Discover ids with listWebsiteLayouts. Null unbinds and falls back to the app default.
- websiteAppId
- unionThe website app whose shell this borrows. Discover ids with listProjectApps (appType website).
- featuredImageUrl
- unionFeatured image, stored as a file reference (file:{uuid}) and resolved to a serving URL at render. Set it to a project file's reference, not a resolved URL — a URL is not recorded as in-use in core.file_references and could be deleted out from under the article.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });
const result = await gc.kb.updateKbArticleMeta({ organizationId: orgs[0].id, projectId: projects[0].id, appId: "app-id", articleId: "article-id", data: {}});
List articles in one KB app, newest first; pass lite=true to omit huge content
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articles- page
- query · number
- pageSize
- query · number
- lite
- query · string
- sort
- query · string
- search
- query · string
- name
- query · string
- slug
- query · string
- status
- query · string
- isListed
- query · string
- categoryId
- query · string
- createdAt
- query · string
- updatedAt
- query · string
- publishedAt
- query · string
- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});
const { articles } = await gc.kb.listKbArticles({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id,});
Create an article shell; publishing with content also ingests it for AI chat
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articles- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- seo
- object
- nameRequired
- string
- slugRequired
- string
- tags
- array
- order
- number
- title
- any
- status
- union
- content
- array
- excerpt
- any
- footerId
- union
- headerId
- union
- isListed
- boolean
- layoutId
- union
- categoryIds
- array
- websiteAppId
- union
- featuredImageUrl
- unionFeatured image, stored as a file reference (file:{uuid}) and resolved to a serving URL at render. Set it to a project file's reference, not a resolved URL — a URL is not recorded as in-use in core.file_references and could be deleted out from under the article.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});
const { article } = await gc.kb.createKbArticle({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id, data: { title: "New KB Article", content: "Article content goes here." }});
Get one category's name, slug, description, parent and order; not its articles
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categories/{categoryId}- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- categoryIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});const { categories } = await gc.kb.listKbCategories({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id,});
const { category } = await gc.kb.getKbCategory({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id, categoryId: categories[0].id,});
Delete KB category
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categories/{categoryId}- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- categoryIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});const { categories } = await gc.kb.listKbCategories({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id,});
const result = await gc.kb.deleteKbCategory({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id, categoryId: categories[0].id,});
Update a category's name and description; cannot re-slug, reorder or re-parent it
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categories/{categoryId}- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- categoryIdRequired
- path · string
- name
- stringThe internal handle. One string, never translated. Operators search and reference by this; readers never see it.
- title
- unionThe category label a reader sees, per locale. Send a locale map like {"en": "..."} on a multilingual project. The internal handle is `name` and is not reader-facing, so it is not editable here.
- description
- union
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: organizations[0].id });
const result = await gc.kb.updateKbCategoryMeta({ organizationId: organizations[0].id, projectId: projects[0].id, appId: "app-id", categoryId: "category-id", data: {}});
List a KB app's categories as a nested parent-child tree, roots paginated
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categories- page
- query · number
- pageSize
- query · number
- lite
- query · string
- sort
- query · string
- search
- query · string
- slug
- query · string
- icon
- query · string
- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});
const { categories } = await gc.kb.listKbCategories({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id,});
Create a category, optionally nested under a parent; order assigned automatically
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categories- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- icon
- union
- nameRequired
- string
- slugRequired
- string
- order
- number
- title
- any
- parentId
- union
- description
- any
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});
const result = await gc.kb.createKbCategory({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id, data: { name: "New Category" }});
Update knowledge base landing page metadata
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/landing- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- seo
- object
- footerId
- unionThe footer this renders with. Discover ids with listWebsiteFooters. Null unbinds and falls back to the app default.
- headerId
- unionThe header this renders with. Discover ids with listWebsiteHeaders. Null unbinds and falls back to the app default.
- layoutId
- unionThe layout this renders inside. Discover ids with listWebsiteLayouts. Null unbinds and falls back to the app default.
- websiteAppId
- unionThe website app whose shell this landing borrows. Discover ids with listProjectApps (appType website).
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});
const result = await gc.kb.updateKbLandingMeta({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id, data: {},});
Get one URL redirect by id
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/redirects/{redirectId}- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
- redirectIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });
const redirect = await gc.kb.getKbRedirect({ organizationId: orgs[0].id, projectId: projects[0].id, appId: "app-id", redirectId: "redirect-id",});
List a knowledge base's URL redirects, newest first, with from, to, status and source
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/redirects- page
- query · number
- pageSize
- query · number
- lite
- query · string
- sort
- query · string
- search
- query · string
- source
- query · string
- status
- query · string
- createdAt
- query · string
- updatedAt
- query · string
- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- appIdRequired
- path · string
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { apps } = await gc.projects.listProjectApps({ organizationId: orgs[0].id, projectId: projects[0].id,});
const { redirects } = await gc.kb.listKbRedirects({ organizationId: orgs[0].id, projectId: projects[0].id, appId: apps[0].id,});