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}Retrieves a single knowledge base article by its ID, including its full rich text content, publish status, SEO metadata, and associated category IDs. Returns 404 if the article does not exist or has been soft-deleted.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects(organization_id=org_id)project_id = projects.items[0].id
app_id = "your_app_id"article_id = "your_article_id"
article = gc.kb.get_kb_article( organization_id=org_id, project_id=project_id, app_id=app_id, article_id=article_id)
Delete KB article
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articles/{articleId}Soft-deletes a knowledge base article by moving it to the trash. Also removes the article from the AI knowledge base. Returns 404 if the article does not exist or is already deleted.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects(organization_id=org_id)project_id = projects.items[0].id
apps = gc.projects.list_project_apps(organization_id=org_id, project_id=project_id)app_id = apps.items[0].id
articles = gc.kb.list_kb_articles( organization_id=org_id, project_id=project_id, app_id=app_id)article_id = articles.items[0].id
result = gc.kb.delete_kb_article( organization_id=org_id, project_id=project_id, app_id=app_id, article_id=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}Updates the fields that describe a knowledge base article rather than govern it: SEO title, description, image and noindex, plus the excerpt, tags and featured image. Only the fields you send are changed. Can rebind the layout, header and footer. Cannot change the article's content, status, visibility, order or category assignments — use publishContent to take it live.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects()project_id = projects.items[0].id
result = gc.kb.update_kb_article_meta( organization_id=org_id, project_id=project_id, app_id="app_id_placeholder", article_id="article_id_placeholder", data={"meta_key": "meta_value"})
List articles in one KB app, newest first; pass lite=true to omit huge content
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articlesLists all knowledge base articles for the specified app, with support for pagination, filtering by category, filtering by publish status, and full-text search across names and slugs. Returns articles sorted by creation date (newest first) by default.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org = orgs.items[0]
projects = gc.projects.list_projects(organization_id=org.id)project = projects.items[0]
apps = gc.projects.list_project_apps(organization_id=org.id, project_id=project.id)app = apps.items[0]
articles = gc.kb.list_kb_articles( organization_id=org.id, project_id=project.id, app_id=app.id)
Create an article shell; publishing with content also ingests it for AI chat
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/articlesCreates a new knowledge base article in the specified app. Validates slug uniqueness, automatically assigns display order, and optionally associates the article with categories. If the article is created with 'published' status and has content, it is automatically ingested into the AI knowledge base for search and retrieval.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects()project_id = projects.items[0].id
article = gc.kb.create_kb_article( organization_id=org_id, project_id=project_id, app_id="app_123", data={"title": "My KB Article", "content": "Article content here"})
Get one category's name, slug, description, parent and order; not its articles
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categories/{categoryId}Retrieves a single knowledge base 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.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects(organization_id=org_id)project_id = projects.items[0].id
category = gc.kb.get_kb_category( organization_id=org_id, project_id=project_id, app_id="your_app_id", category_id="your_category_id")
Delete KB category
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categories/{categoryId}Soft-deletes a knowledge base category by moving it to the trash. Returns 404 if the category does not exist or is already deleted.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()projects = gc.projects.list_projects(organization_id=orgs.items[0].id)
result = gc.kb.delete_kb_category( organization_id=orgs.items[0].id, project_id=projects.items[0].id, app_id="your_app_id", category_id="your_category_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}Updates a knowledge base category's name and its description, the blurb shown beneath it in listings and on its own page. Only the fields you send are changed. A category has no separate title, so name IS the label a reader sees, and it is translatable. Cannot change the category's slug or icon, reorder it, or move it in the hierarchy — a category slug sits in the public path of every article beneath it and re-slugging leaves no redirect.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects(organization_id=org_id)project_id = projects.items[0].id
result = gc.kb.update_kb_category_meta( organization_id=org_id, project_id=project_id, app_id="app_123", category_id="cat_123", data={"key": "value"})
List a KB app's categories as a nested parent-child tree, roots paginated
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categoriesLists all knowledge base categories for the specified app, returned as a hierarchical tree structure. Categories are nested under their parent categories and sorted by their display order. Includes all active (non-deleted) categories.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects(organization_id=org_id)project_id = projects.items[0].id
apps = gc.projects.list_project_apps(organization_id=org_id, project_id=project_id)app_id = apps.items[0].id
categories = gc.kb.list_kb_categories( organization_id=org_id, project_id=project_id, app_id=app_id)
Create a category, optionally nested under a parent; order assigned automatically
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/categoriesCreates a new knowledge base category in the specified app. Validates slug uniqueness, automatically assigns display order among sibling categories, and supports hierarchical nesting via the parentId field. Categories are used to organize articles within the knowledge base.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org = orgs.items[0]
projects = gc.projects.list_projects(organization_id=org.id)project = projects.items[0]
apps = gc.projects.list_project_apps( organization_id=org.id, project_id=project.id)app = apps.items[0]
category = gc.kb.create_kb_category( organization_id=org.id, project_id=project.id, app_id=app.id, data={"name": "New Category"})
Update knowledge base landing page metadata
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/landingUpdates the SEO title, description and image of the knowledge base landing page. Only the fields you send are changed. Can rebind its website, layout, header and footer. Cannot replace the landing's builder content or change its visibility.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()org_id = orgs.items[0].id
projects = gc.projects.list_projects(organization_id=org_id)project_id = projects.items[0].id
result = gc.kb.update_kb_landing_meta( organization_id=org_id, project_id=project_id, app_id="app_id_placeholder", data={"key": "value"})
Get one URL redirect by id
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/redirects/{redirectId}Returns a single URL redirect by ID, including its fromPath, toPath, status and source.
import osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
orgs = gc.me.list_my_organizations()projects = gc.projects.list_projects(organization_id=orgs.items[0].id)
redirect = gc.kb.get_kb_redirect( organization_id=orgs.items[0].id, project_id=projects.items[0].id, app_id="app_id", redirect_id="redirect_id")
List a knowledge base's URL redirects, newest first, with from, to, status and source
/organizations/{organizationId}/projects/{projectId}/apps/kb/{appId}/redirectsReturns a paginated list of the URL redirects for this knowledge base 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 osfrom giantcontext import GiantContext
gc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])
org = gc.me.list_my_organizations().items[0]project = gc.projects.list_projects(organization_id=org.id).items[0]app = gc.projects.list_project_apps(organization_id=org.id, project_id=project.id).items[0]
redirects = gc.kb.list_kb_redirects( organization_id=org.id, project_id=project.id, app_id=app.id)