Builder

Generate and manage website builder content.

POST

Delete an element from a document

/organizations/{organizationId}/projects/{projectId}/content/elements/delete

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

contentId Required
string The entity being edited.
elementId Required
string The element to delete: its `data-gc-id` in the document's markup.
contentType Required
string Which kind of document, which selects the table and the permission the edit needs.

SDK

curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/elements/delete" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "contentId": "contentId_uuid",  "elementId": "elementId_value",  "contentType": "developer_doc"}'
POST

Add an element to a document

/organizations/{organizationId}/projects/{projectId}/content/elements/insert

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

html
string One element, as markup: Tailwind classes, and each piece of text as `{{ 'key' | t }}` behind a key of your own naming, which the save replaces with a fresh one. It may hold a loop over the section's own lists, without rows. Send this or type.
type
string One of the library's elements, by directory: an entry the section catalogue lists with authoring `element`, such as `action-button`, `heading` or `image`. Send this or html.
words
object Words by locale, then by a key the element prints — for a library element, the keys the catalogue lists under it. Every key needs text in every locale the document carries.
intoId
string Put it last inside this element: its `data-gc-id` in the document's markup.
afterId
string Put it right after this element: its `data-gc-id` in the document's markup.
beforeId
string Put it right before this element: its `data-gc-id` in the document's markup.
contentId Required
string The entity being edited.
attributes
object Set on the element's own tag as it goes in, such as the `href` of a library button or the `src` of an image; a null removes one the markup carries.
contentType Required
string Which kind of document, which selects the table and the permission the edit needs.

SDK

curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/elements/insert" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "contentId": "contentId_uuid",  "contentType": "developer_doc"}'
POST

Change an element's attributes or words

/organizations/{organizationId}/projects/{projectId}/content/elements/update

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

words
object Words by locale, then by a key the element or an element inside it prints.
contentId Required
string The entity being edited.
elementId Required
string The element to change: its `data-gc-id` in the document's markup.
attributes
object Set on the element's own tag, such as `class` or `href`; a null removes that attribute. Attributes you leave out keep their value.
contentType Required
string Which kind of document, which selects the table and the permission the edit needs.

SDK

curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/elements/update" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "words": "words_value",  "contentId": "contentId_uuid",  "elementId": "elementId_value",  "attributes": "attributes_value",  "contentType": "developer_doc"}'
POST

Delete a section with its data and the words only it printed

/organizations/{organizationId}/projects/{projectId}/content/sections/delete

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

contentId Required
string The entity being edited.
sectionId Required
string A section's id in the document: the key of its data in `sections`, which its markup opens with `{%- assign section = sections. -%}`.
contentType Required
string Which kind of document. Only documents whose markup is built from sections have sections to edit.

SDK

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.builder.deleteSection({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: { id: "section-id" }});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsorg_id = orgs[0].idprojects = gc.projects.list_projects(organization_id=org_id).projectsproject_id = projects[0].idresult = gc.builder.delete_section(    organization_id=org_id,    project_id=project_id,    data={})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/sections/delete" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "contentId": "contentId_uuid",  "sectionId": "sectionId_value",  "contentType": "developers_landing"}'
POST

Add a library section to a page or other section document

/organizations/{organizationId}/projects/{projectId}/content/sections/insert

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

type Required
string The library section to add, by directory: the `id` the section catalogue lists it under.
lists
object Rows by list name, each replacing that list whole: the rows a loop over the section's own data reads, such as `features` for a feature grid.
words
object Words by locale, then by the library key the catalogue lists under the section's `keys`. Every key needs text in every locale the document carries.
settings
object Merged over the section's settings, key by key; a null removes that setting.
contentId Required
string The entity being edited.
contentType Required
string Which kind of document. Only documents whose markup is built from sections have sections to edit.
afterSectionId
string Place it right after this section.
beforeSectionId
string Place it right before this section. With neither anchor it goes after the last section.

SDK

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.builder.insertSection({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: {}});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs_res = gc.me.list_my_organizations()org_id = orgs_res.organizations[0].idprojects_res = gc.projects.list_projects(organization_id=org_id)project_id = projects_res.projects[0].idresult = gc.builder.insert_section(    organization_id=org_id,    project_id=project_id,    data={"title": "New Section"})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/sections/insert" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "type": "type_value",  "contentId": "contentId_uuid",  "contentType": "developers_landing"}'
POST

Change one section's settings, rows or words

/organizations/{organizationId}/projects/{projectId}/content/sections/update

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

lists
object Rows by list name, each replacing that list whole: the rows a loop over the section's own data reads, such as `features` for a feature grid.
words
object Words by locale, then by a key this section prints.
settings
object Merged over the section's settings, key by key; a null removes that setting.
contentId Required
string The entity being edited.
sectionId Required
string A section's id in the document: the key of its data in `sections`, which its markup opens with `{%- assign section = sections. -%}`.
contentType Required
string Which kind of document. Only documents whose markup is built from sections have sections to edit.

SDK

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.builder.updateSection({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: {}});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsprojects = gc.projects.list_projects().projectsresult = gc.builder.update_section(    organization_id=orgs[0].id,    project_id=projects[0].id,    data={})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/sections/update" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "lists": "lists_value",  "words": "words_value",  "settings": "settings_value",  "contentId": "contentId_uuid",  "sectionId": "sectionId_value",  "contentType": "developers_landing"}'
POST

Move an element to another place in its document

/organizations/{organizationId}/projects/{projectId}/content/elements/move

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

intoId
string Put it last inside this element: its `data-gc-id` in the document's markup.
afterId
string Put it right after this element: its `data-gc-id` in the document's markup.
beforeId
string Put it right before this element: its `data-gc-id` in the document's markup.
contentId Required
string The entity being edited.
elementId Required
string The element to move: its `data-gc-id` in the document's markup.
contentType Required
string Which kind of document, which selects the table and the permission the edit needs.

SDK

curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/elements/move" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "intoId": "intoId_value",  "afterId": "afterId_value",  "beforeId": "beforeId_value",  "contentId": "contentId_uuid",  "elementId": "elementId_value",  "contentType": "developer_doc"}'
POST

Move a section before or after another, or to the end

/organizations/{organizationId}/projects/{projectId}/content/sections/move

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

contentId Required
string The entity being edited.
sectionId Required
string A section's id in the document: the key of its data in `sections`, which its markup opens with `{%- assign section = sections. -%}`.
contentType Required
string Which kind of document. Only documents whose markup is built from sections have sections to edit.
afterSectionId
string Place it right after this section.
beforeSectionId
string Place it right before this section. With neither anchor it goes after the last section.

SDK

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.builder.moveSection({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: {},});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsorg_id = orgs[0].idprojects = gc.projects.list_projects(organization_id=org_id).projectsproject_id = projects[0].idresult = gc.builder.move_section(    organization_id=org_id,    project_id=project_id,    data={"section_id": "sec_123", "index": 0})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/sections/move" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "contentId": "contentId_uuid",  "sectionId": "sectionId_value",  "contentType": "developers_landing",  "afterSectionId": "afterSectionId_value",  "beforeSectionId": "beforeSectionId_value"}'
POST

Set whether content is listed and whether it requires a signed-in reader

/organizations/{organizationId}/projects/{projectId}/content/visibility

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

isListed
boolean Whether this appears anywhere that lists content: the sitemap, blog and category indexes, post grids, next-post navigation and site search. False is "anyone with the link" — the page stays live at its own URL and is simply not advertised. It is not a way to make something private; use requiresViewerAuth for that.
contentId Required
string The entity being edited.
contentType Required
string Which kind of entity. Only types that appear in listings can have their visibility set; of those, only website pages and posts can be gated.
requiresViewerAuth
boolean Whether a reader must be signed in to see the body. A gated page does not 404 for an anonymous visitor — it renders the site's own Sign In Page, so someone who followed a link learns that signing in would show it. Only website pages and posts can be gated, and only on a site that has viewer sign-in switched on; without a tenant to sign in to, a gated page is unreachable by everyone.

SDK

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.builder.setContentVisibility({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: {},});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsorg_id = orgs[0].idprojects = gc.projects.list_projects(organization_id=org_id).projectsproject_id = projects[0].idresult = gc.builder.set_content_visibility(    organization_id=org_id,    project_id=project_id,    data={})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/visibility" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "isListed": true,  "contentId": "contentId_uuid",  "contentType": "developer_doc",  "requiresViewerAuth": true}'
POST

Unpublish a content item, returning it to draft

/organizations/{organizationId}/projects/{projectId}/content/unpublish

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

contentId Required
string The entity being edited.
publishAt
union When to publish. Omit to publish immediately. An ISO timestamp in the future schedules it instead: the item stays a draft, invisible to the public, until a job takes it live within five minutes of that time. Null cancels a schedule already set. A time in the past is rejected rather than published now — say what you mean by omitting this.
contentType Required
string Which kind of entity. Only types with a draft/published lifecycle can be published or unpublished.

SDK

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.builder.unpublishContent({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: {}});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsorg_id = orgs[0].idprojects = gc.projects.list_projects(organization_id=org_id).projectsproject_id = projects[0].idresult = gc.builder.unpublish_content(    organization_id=org_id,    project_id=project_id,    data={})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/unpublish" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "contentId": "contentId_uuid",  "publishAt": "publishAt_value",  "contentType": "developer_doc"}'
POST

Publish a page, post, article, doc or email — status only, never the body

/organizations/{organizationId}/projects/{projectId}/content/publish

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

contentId Required
string The entity being edited.
publishAt
union When to publish. Omit to publish immediately. An ISO timestamp in the future schedules it instead: the item stays a draft, invisible to the public, until a job takes it live within five minutes of that time. Null cancels a schedule already set. A time in the past is rejected rather than published now — say what you mean by omitting this.
contentType Required
string Which kind of entity. Only types with a draft/published lifecycle can be published or unpublished.

SDK

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.builder.publishContent({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: { title: "New Content", body: "Hello world" }});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsprojects = gc.projects.list_projects().projectsresult = gc.builder.publish_content(    organization_id=orgs[0].id,    project_id=projects[0].id,    data={"title": "New Content", "body": "Hello world"})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content/publish" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "contentId": "contentId_uuid",  "publishAt": "publishAt_value",  "contentType": "developer_doc"}'
GET

Get a document to edit, with an id on every element

/organizations/{organizationId}/projects/{projectId}/content

Parameters

contentType Required
query · string
contentId Required
query · string
organizationId Required
path · string
projectId Required
path · string

SDK

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 { content } = await gc.builder.getContent({  organizationId: orgs[0].id,  projectId: projects[0].id,  contentType: "page",  contentId: "content-123",});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs_res = gc.me.list_my_organizations()org_id = orgs_res.organizations[0].idprojects_res = gc.projects.list_projects()project_id = projects_res.projects[0].idtypes_res = gc.builder.get_content_types()content_type = types_res.content_types[0]content = gc.builder.get_content(    organization_id=org_id,    project_id=project_id,    content_type=content_type,    content_id="your-content-id")
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content?contentType=developer_doc&contentId=contentId_uuid" \  -H "Authorization: Bearer $API_KEY"
Built Autonomously With AI

This content was built autonomously. Giant Context analyzed the site, determined what was missing, created and submitted an idea and draft, which Giant Context staff accepted and published.

Powered by Giant Context