Skip to content

Update Global Context Document

PATCH
/global-context/documents/{doc_id}

Update a Global Context (Studio) document’s content and/or status.

Read-side counterpart already exists (GET /global-context/documents); this closes the long-standing “read but can’t update” gap for the Context bucket. Each save creates a DocumentVersion snapshot, identical to the internal Studio editor — so version history stays consistent regardless of whether the edit came from the UI, the developer API, or MCP.

Partial update: send content, status, or both. Returns 400 if neither is provided, 404 if the document does not exist in this org.

Note: the Intelligence bucket (cb_intelligence_data) is intentionally read-only — it is machine-generated and has no manual-edit path.

Authorizations

Parameters

Path Parameters

doc_id
required

Global context document ID (UUID)

string

Global context document ID (UUID)

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Body for PATCH /global-context/documents/{doc_id}.

Partial update: send only the fields you want to change. At least one of content / status must be present.

object
content
Any of:
string
status
Any of:
string

Responses

200

Successful Response

object
data
required
object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string