API · Context · Create a context document
Create a new context document and link it to the brand kit.
Two creation modes:
- Link existing: Provide
document_idto link an existing KnowledgeDoc. - Inline creation: Provide
doc_typeandname(plus optionaldescription,data,content) to create a new KnowledgeDoc and link it automatically.
Singleton constraint: For predefined types (brand_voice, icps, usps, etc.), only one document per type per brandkit is allowed. Attempting to create a duplicate will return a 400 error.
The canonical_key is auto-set from doc_type if it matches a predefined type.
Authentication
Header authentication of the form Api-Key <token>
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
Link an existing KnowledgeDoc by ID (mutually exclusive with inline fields)
Document type key for inline creation (e.g. brand_voice, style_guide)
Document description (optional, defaults to empty)
Structured JSON data (optional, defaults to empty object)
Markdown content (optional, defaults to empty)
