POST /glossary
POST /glossary
Handler
Note
Creates a new glossary entry. Triggers a background term scan to apply marks in content.
Authentication
None.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
slug |
string | Project slug |
Request Body
JSON object. Required fields: term (non-empty string), shortDefinition (non-empty string). All other fields are optional. Boolean defaults: autoMark = true, enableTooltip = true, enableHyperlink = false.
{
"term": "Arcane Rift",
"shortDefinition": "A tear in the fabric of reality caused by uncontrolled magic.",
"category": "Magic System",
"tags": ["magic", "worldbuilding"],
"aliases": ["Rift", "Arcane Tear"]
}
Success Response
Status: 201 Created
Returns the full GlossaryEntry object.
Error Responses
| Status | Description |
|---|---|
| 400 | Validation error or duplicate term (error message contains "UNIQUE") |
| 404 | Project not found |
| 500 | Server error |
Tip
After successful creation, a background term_scan job is submitted to apply glossaryLink marks in all in-scope content documents.