Skip to main content
PATCH
/
context-documents
/
config
Update this app's brain-generation config (structure/prompts/weights)
curl --request PATCH \
  --url https://api.hyperspell.com/context-documents/config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "structure": {
    "company": [
      {
        "key": "<string>",
        "filename": "<string>",
        "prompt": "<string>",
        "search_queries": [
          "<string>"
        ]
      }
    ],
    "workstream": [
      {
        "key": "<string>",
        "filename": "<string>",
        "prompt": "<string>",
        "search_queries": [
          "<string>"
        ]
      }
    ]
  },
  "company_prompts": {},
  "workstream_prompts": {},
  "personal_prompt": "<string>",
  "detection_prompt": "<string>",
  "source_weights": {}
}
'
{
  "structure": {},
  "prompts": {},
  "source_weights": {}
}

Authorizations

Authorization
string
header
required

API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.

Body

application/json

The self-serve subset of context-doc config an app may edit with its OWN credential. Excludes canonical_documents, demo/pretend, employee_domains, and digest flags — those are not customer-editable through this surface.

structure
BrainConfigStructure · object | null

Per-tier document set — the custom prompt set. Mirrors the admin TreeStructureUpdate validation without coupling this router to the admin package.

company_prompts
Company Prompts · object | null
workstream_prompts
Workstream Prompts · object | null
personal_prompt
string | null
detection_prompt
string | null
source_weights
Source Weights · object | null

Response

Successful Response

Filtered read view — only the customer-editable fields, never internal ones.

structure
Structure · object
required
prompts
Prompts · object
required
source_weights
Source Weights · object
required