Manage organizations, ownership, and organization settings.
Get a service account
/organizations/{id}/service-accounts/{accountId}Returns the full details of a specific service account, including its name, description, role, and creation metadata. Only organization owners and admins can view service account details.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: serviceAccount } = await gc.organizations.getServiceAccount({ id: "org-id", accountId: "account-id"});Get organization service accounts
/organizations/{id}/service-accountsReturns all service accounts configured for the organization. Service accounts are non-human identities used for programmatic API access via API keys. Only organization owners and admins can view service accounts.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: serviceAccounts } = await gc.organizations.listServiceAccounts({ id: "org_123" });Get organization by slug
/organizations/by-slug/{slug}Retrieves a single organization by its URL-friendly slug (e.g. 'my-company'). Returns the full organization object including ID, name, slug, logo URL, plan, status, member count, and timestamps. Useful for resolving organizations from URLs or user input where the slug is known but the ID is not. Returns 404 if no organization matches the given slug.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: org } = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });Get an organization by ID
/organizations/{id}Retrieves a single organization by its unique ID. Returns the full organization object including name, slug, logo URL, plan, status, member count, and timestamps. Returns 404 if the organization does not exist.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: org } = await gc.organizations.getOrganization("org_123");