People

The project's people — everyone a project knows, whether or not a CRM app is installed. A person's email is an identifier pointing at them, never a column; subscription lives on the address. The CRM app is a workspace over this surface.

POST

Approve the compiled segment for consumption

/organizations/{organizationId}/projects/{projectId}/segments/{segmentId}/approve

Parameters

organizationId Required
path · string
projectId Required
path · string
segmentId 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 result = await gc.people.approveSegment({  organizationId: orgs[0].id,  projectId: projects[0].id,  segmentId: "segment-id",});
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.people.approve_segment(    organization_id=orgs[0].id,    project_id=projects[0].id,    segment_id="segment_123")
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/segments/segmentId_uuid/approve" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{}'
GET

Live membership preview — total, deliverable, sample

/organizations/{organizationId}/projects/{projectId}/segments/{segmentId}/preview

Parameters

organizationId Required
path · string
projectId Required
path · string
segmentId 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 { segments } = await gc.people.listSegments({  organizationId: orgs[0].id,  projectId: projects[0].id,});const preview = await gc.people.getSegmentPreview({  organizationId: orgs[0].id,  projectId: projects[0].id,  segmentId: segments[0].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].idpreview = gc.people.get_segment_preview(    organization_id=org_id,    project_id=project_id,    segment_id="segment_123")
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/segments/segmentId_uuid/preview" \  -H "Authorization: Bearer $API_KEY"
POST

Erase a person — sever, scrub, retain

/organizations/{organizationId}/projects/{projectId}/people/{personId}/erasures

Parameters

organizationId Required
path · string
projectId Required
path · string
personId 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 result = await gc.people.erasePerson({  organizationId: orgs[0].id,  projectId: projects[0].id,  personId: "person-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.people.erase_person(    organization_id=org_id,    project_id=project_id,    person_id="person_123")
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/personId_uuid/erasures" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{}'
PUT

Set one custom field on a person, merging into properties

/organizations/{organizationId}/projects/{projectId}/people/{personId}/fields

Parameters

organizationId Required
path · string
projectId Required
path · string
personId Required
path · string

Body Required

key Required
string
value Required
any

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.people.setPersonField({  organizationId: orgs[0].id,  projectId: projects[0].id,  personId: "person-123",  data: { customField: "value" }});
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.people.set_person_field(    organization_id=org_id,    project_id=project_id,    person_id="person_123",    data={"role": "admin"})
curl -X PUT "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/personId_uuid/fields" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "key": "key_value",  "value": "value_value"}'
GET

A person's activity across the project, newest first

/organizations/{organizationId}/projects/{projectId}/people/{personId}/edges

Parameters

page
query · number
pageSize
query · number
lite
query · string
limit
query · integer
organizationId Required
path · string
projectId Required
path · string
personId 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 { edges } = await gc.people.listPersonEdges({  organizationId: orgs[0].id,  projectId: projects[0].id,  personId: "person_123",});
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].idpeople = gc.people.list_people(organization_id=org_id, project_id=project_id).peopleperson_id = people[0].idedges = gc.people.list_person_edges(    organization_id=org_id,    project_id=project_id,    person_id=person_id)
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/personId_uuid/edges" \  -H "Authorization: Bearer $API_KEY"
POST

Tag one person with a single free-form string, idempotent, returns the person

/organizations/{organizationId}/projects/{projectId}/people/{personId}/tags

Parameters

organizationId Required
path · string
projectId Required
path · string
personId Required
path · string

Body Required

tag Required
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 result = await gc.people.tagPerson({  organizationId: orgs[0].id,  projectId: projects[0].id,  personId: "person_123",  data: { tags: ["vip"] }});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs_response = gc.me.list_my_organizations()org_id = orgs_response.organizations[0].idprojects_response = gc.projects.list_projects()project_id = projects_response.projects[0].idresult = gc.people.tag_person(    organization_id=org_id,    project_id=project_id,    person_id="person_123",    data={"tags": ["VIP"]})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/personId_uuid/tags" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "tag": "tag_value"}'
DELETE

Remove one tag from a person, returns the person

/organizations/{organizationId}/projects/{projectId}/people/{personId}/tags

Parameters

organizationId Required
path · string
projectId Required
path · string
personId Required
path · string

Body Required

tag Required
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 result = await gc.people.untagPerson({  organizationId: orgs[0].id,  projectId: projects[0].id,  personId: "person-id",  data: { tag: "example-tag" }});
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.people.untag_person(    organization_id=org_id,    project_id=project_id,    person_id="person_123",    data={"tag": "example_tag"})
curl -X DELETE "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/personId_uuid/tags" \  -H "Authorization: Bearer $API_KEY"
GET

Every property key the project's people carry, with counts

/organizations/{organizationId}/projects/{projectId}/people/property-keys

Parameters

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 { keys } = await gc.people.getPersonPropertyKeys({  organizationId: orgs[0].id,  projectId: projects[0].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].idkeys = gc.people.get_person_property_keys(    organization_id=org_id,    project_id=project_id)
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/property-keys" \  -H "Authorization: Bearer $API_KEY"
POST

Merge a drifted property key into its canonical name

/organizations/{organizationId}/projects/{projectId}/people/property-keys

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

toKey Required
string
fromKey Required
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 result = await gc.people.mergePersonPropertyKeys({  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.people.merge_person_property_keys(    organization_id=org_id,    project_id=project_id,    data={"keys": ["old_key", "new_key"]})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/property-keys" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "toKey": "toKey_value",  "fromKey": "fromKey_value"}'
GET

One segment — description, compiled tree, gates

/organizations/{organizationId}/projects/{projectId}/segments/{segmentId}

Parameters

organizationId Required
path · string
projectId Required
path · string
segmentId 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 segment = await gc.people.getSegment({  organizationId: orgs[0].id,  projectId: projects[0].id,  segmentId: "segment-id",});
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].idsegment = gc.people.get_segment(    organization_id=org_id,    project_id=project_id,    segment_id="segment_123")
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/segments/segmentId_uuid" \  -H "Authorization: Bearer $API_KEY"
PUT

Update a segment; a new description clears both gates

/organizations/{organizationId}/projects/{projectId}/segments/{segmentId}

Parameters

organizationId Required
path · string
projectId Required
path · string
segmentId Required
path · string

Body Required

name
string
description
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 result = await gc.people.updateSegment({  organizationId: orgs[0].id,  projectId: projects[0].id,  segmentId: "segment-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.people.update_segment(    organization_id=org_id,    project_id=project_id,    segment_id="segment_123",    data={"name": "Updated Segment"})
curl -X PUT "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/segments/segmentId_uuid" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "name": "name_value",  "description": "description_value"}'
DELETE

Delete a segment definition

/organizations/{organizationId}/projects/{projectId}/segments/{segmentId}

Parameters

organizationId Required
path · string
projectId Required
path · string
segmentId 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 result = await gc.people.deleteSegment({  organizationId: orgs[0].id,  projectId: projects[0].id,  segmentId: "segment-id",});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsprojects = gc.projects.list_projects(organization_id=orgs[0].id).projectsresult = gc.people.delete_segment(    organization_id=orgs[0].id,    project_id=projects[0].id,    segment_id="segment_123")
curl -X DELETE "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/segments/segmentId_uuid" \  -H "Authorization: Bearer $API_KEY"
GET

Get one person with all fields, tags and the CRM company overlay

/organizations/{organizationId}/projects/{projectId}/people/{personId}

Parameters

organizationId Required
path · string
projectId Required
path · string
personId 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 person = await gc.people.getPerson({  organizationId: orgs[0].id,  projectId: projects[0].id,  personId: "person-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].idperson = gc.people.get_person(    organization_id=org_id,    project_id=project_id,    person_id="person_123")
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/personId_uuid" \  -H "Authorization: Bearer $API_KEY"
PATCH

Update person

/organizations/{organizationId}/projects/{projectId}/people/{personId}

Parameters

organizationId Required
path · string
projectId Required
path · string
personId Required
path · string

Body Required

tags
array
email
string
phone
string
title
string
locale
any
source
union
status
union
lastName
string
companyId
string
firstName
string
department
string
properties
object

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.people.updatePerson({  organizationId: orgs[0].id,  projectId: projects[0].id,  personId: "person-123",  data: { name: "Jane Doe" }});
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.people.update_person(    organization_id=org_id,    project_id=project_id,    person_id="person_123",    data={"name": "Alice"})
curl -X PATCH "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/personId_uuid" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{}'
GET

Resolve a person by email address

/organizations/{organizationId}/projects/{projectId}/people/by-email

Parameters

email 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 { person } = await gc.people.getPersonByEmail({  organizationId: orgs[0].id,  projectId: projects[0].id,  email: "test@example.com",});
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].idperson = gc.people.get_person_by_email(    organization_id=org_id,    project_id=project_id,    email="user@example.com")
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/by-email?email=user%40example.com" \  -H "Authorization: Bearer $API_KEY"
POST

Attach an email address to an anonymous visitor

/organizations/{organizationId}/projects/{projectId}/people/identify

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

email Required
string
traits
object
visitorId
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 result = await gc.people.identify({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: { email: "user@example.com", name: "Alice" }});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsprojects = gc.projects.list_projects(organization_id=orgs[0].id).projectsresult = gc.people.identify(    organization_id=orgs[0].id,    project_id=projects[0].id,    data={"email": "user@example.com", "name": "Alice"})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people/identify" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "email": "user@example.com",  "traits": {    "phone": "phone_value",    "locale": "locale_value",    "lastName": "lastName_value",    "firstName": "firstName_value"  },  "visitorId": "visitorId_uuid"}'
GET

The deletion ledger, newest first

/organizations/{organizationId}/projects/{projectId}/erasures

Parameters

page
query · number
pageSize
query · number
lite
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 { erasures } = await gc.people.listErasures({  organizationId: orgs[0].id,  projectId: projects[0].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].iderasures = gc.people.list_erasures(    organization_id=org_id,    project_id=project_id)
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/erasures" \  -H "Authorization: Bearer $API_KEY"
GET

The project's segments — saved, compiled views over people

/organizations/{organizationId}/projects/{projectId}/segments

Parameters

page
query · number
pageSize
query · number
lite
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 { segments } = await gc.people.listSegments({  organizationId: orgs[0].id,  projectId: projects[0].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].idsegments = gc.people.list_segments(    organization_id=org_id,    project_id=project_id)
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/segments" \  -H "Authorization: Bearer $API_KEY"
POST

Create a segment from a plain-language description

/organizations/{organizationId}/projects/{projectId}/segments

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

name Required
string
description Required
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 { segment } = await gc.people.createSegment({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: {    name: "New Segment"  }});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs_response = gc.me.list_my_organizations()org = orgs_response.organizations[0]projects_response = gc.projects.list_projects(organization_id=org.id)project = projects_response.projects[0]segment = gc.people.create_segment(    organization_id=org.id,    project_id=project.id,    data={"name": "Active Users", "filters": []})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/segments" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "name": "name_value",  "description": "description_value"}'
GET

List a project's people, alphabetical by last name, search supported

/organizations/{organizationId}/projects/{projectId}/people

Parameters

page
query · number
pageSize
query · number
lite
query · string
sort
query · string
search
query · string
status
query · string
source
query · string
title
query · string
department
query · string
locale
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 { people } = await gc.people.listPeople({  organizationId: orgs[0].id,  projectId: projects[0].id,});
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].idpeople_res = gc.people.list_people(    organization_id=org_id,    project_id=project_id)
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people" \  -H "Authorization: Bearer $API_KEY"
POST

Create person

/organizations/{organizationId}/projects/{projectId}/people

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

tags
array
email
string
phone
string
title
string
locale
any
source
union
status
union
lastName Required
string
companyId
string
firstName Required
string
department
string
properties
object

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 { person } = await gc.people.createPerson({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: {    name: "John Doe",    email: "john.doe@example.com"  }});
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].idperson = gc.people.create_person(    organization_id=org_id,    project_id=project_id,    data={"name": "Alice", "email": "alice@example.com"})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/people" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "lastName": "lastName_value",  "firstName": "firstName_value"}'
POST

Record something a visitor did

/organizations/{organizationId}/projects/{projectId}/edges

Parameters

organizationId Required
path · string
projectId Required
path · string

Body Required

facts
object
object
object
statement Required
string
visitorId Required
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 response = await gc.people.track({  organizationId: orgs[0].id,  projectId: projects[0].id,  data: { event: "test_event" }});
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.people.track(    organization_id=org_id,    project_id=project_id,    data={"event": "test_event"})
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/edges" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{  "facts": "facts_value",  "object": {    "id": "id_uuid",    "type": "type_value"  },  "statement": "statement_value",  "visitorId": "visitorId_uuid"}'
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