Tenant-scoped controlled vocabularies — CRUD.

Vocabularies

A vocabulary is a tenant-scoped set of allowed values for a field (typically a predicate, entity type, or label namespace). The extractor uses vocabularies to coerce LLM-extracted strings to canonical IDs.

Stability: beta.


POST /v1/vocabularies

{
  "name":   "deal_stage",
  "kind":   "closed",
  "values": ["lead", "qualified", "poc", "close", "signed", "lost"]
}

| Field | Type | Notes | |---|---|---| | name | string | Required. Tenant-unique. | | kind | enum | closed (only these values allowed) or open (these values preferred, others kept). | | values | string[] | Required for closed; optional seeds for open. |

Returns 201 with the same shape.

GET /v1/vocabularies

List all vocabularies.

GET /v1/vocabularies/

Single vocabulary.

PUT /v1/vocabularies/

Replace values. For closed vocabularies, removed values are migrated to null in extracted facts.

DELETE /v1/vocabularies/

Returns 204. Facts using the vocabulary are not deleted — they retain their last extracted values.