---
title: "Regenerate Global Context"
method: POST
path: "/global-context/regenerate"
tags: ["GTM Context"]
---

# Regenerate Global Context

`POST /global-context/regenerate`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/global-context/regenerate`
- Auth: HTTP bearer

Regenerate Studio (Global Context) documents against a website.

**Why this exists.** Studio docs are generated once at onboarding from the
company profile's website. If that profile was wrong at the time — the common
case for self-serve orgs, which seed graph8's own profile when no domain is
given — every downstream ICP, persona, TAM and campaign is built on the wrong
company, and there was no machine path to fix it:

* the internal ``POST /global-context/generate-all`` refuses forever once the
  first pipeline completes (``409 ... Contact support to reset and regenerate``);
* ``POST /global-context/generate/{doc_type}`` has no such lock but was
  JWT-only, so an agent or API key could not call it.

This endpoint wraps the per-document path, which means it is **not** subject to
the one-shot pipeline lock and can be run whenever the source of truth changes.

Requires intelligence data for ``website_url`` to exist already — run the
intelligence analyze step first for a newly-changed domain, otherwise this
returns 404 rather than regenerating stale content.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- RegenerateContextRequest
  - `website_url` string, required: Website to generate from. After a company-profile change this must be the NEW domain — intelligence is keyed by URL, so passing the old one silently regenerates the same stale content.
  - `doc_types` string[], nullable: Specific Studio doc types to regenerate (e.g. ['icp_research','persona_research']). Omit to regenerate every document that already exists in the org.

## Response `202`

Successful Response

- ApiResponseDict
  - `data` object, required
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
