Manage project domains and DNS verification.
Get domain verification instructions
/organizations/{id}/projects/{projectId}/domains/{domainId}/verificationRetrieves the DNS verification instructions for the specified custom domain. Returns the exact DNS record (type, name, and value) that must be added to the domain's DNS configuration at the domain registrar to prove ownership. This is required before the domain can be verified and used for serving content. The instructions include the CNAME or TXT record details needed for the verification process.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: instructions } = await gc.projectDomains.getDomainVerificationInstructions({ id: "example_id", projectId: "example_project_id", domainId: "example_domain_id"});Get all domains for a project
/organizations/{id}/projects/{projectId}/domainsReturns a comprehensive list of all domains (both auto-generated and custom) across all apps within the specified project. Each domain entry includes its hostname, verification status, whether it is generated or custom, whether it is the primary domain for its app, and the associated app name and slug. Domains are grouped by app and sorted with generated domains first and primary domains prioritized.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const { data: projectDomains } = await gc.projectDomains.listProjectDomains({ id: "example-id", projectId: "example-project-id"});