Define content types and attributes
Changed onCreate, modify, and organise your company's content-type trees and their attributes. Every action is idempotent, safe to re-run.
Two ways to build your schema:
- Adopt from starter templates: import ready-made trees from the seed catalog (GET /api/v3/content-types/templates). Once adopted, they're yours to customize.
- Build from scratch: create your own trees, nodes, and attributes entirely with define_content_type and define_attribute.
You can mix both: adopt legal from the seeds, then add a custom compliance tree alongside it. Each tree is independent.
Actions:
- adopt: import trees from the seed catalog (starter templates)
- define_content_type: create or update a tree node (root or child)
- undefine_content_type: delete a node and its entire subtree
- define_attribute: add or update a metadata field on a node
- undefine_attribute: remove a metadata field
Building a tree from scratch, example flow:
- Create a root:
{"action": "define_content_type", "code": "compliance", "label": "Compliance"} - Add children:
{"action": "define_content_type", "parent_path": "compliance", "code": "audit-report", "label": "Audit Report"} - Add attributes:
{"action": "define_attribute", "content_type_path": "compliance", "name": "owner", "attribute_type": "text"} - Classify files via POST /api/v3/files/{id}/facets:
{"action": "classify", "content_type_path": "compliance:audit-report"}
Attributes are metadata fields you define on each node. Types: text, number, date, boolean, select, multi-select, rich-text. select and multi-select require choices. Attributes inherit down the tree: define jurisdiction on legal and it's available on all children.
Description best practices: The description field on attributes feeds into the scope inference endpoint (POST /api/v3/content-types/scope), where it helps the LLM generate accurate search filters. Use keywords that signal the attribute's nature:
- Person names: include "name", "examiner", "inventor", or "author" → enables *value* wildcard syntax hints
- Codes/identifiers: include "code", "classification", or "identifier" → enables exact-match hints (don't guess from topic keywords)
Multi-classification: A single document can be classified under multiple content types from different trees (e.g., both legal:contract:nda and compliance:audit-report).
Available seed roots for adopt: finance, healthcare, legal, manufacturing, tech
Requires admin-level access to modify the company's schema.
Request
- Base URLhttps://api.lighton.ai
- URLhttps://api.lighton.ai/api/v3/content-types
- AuthHTTP bearer
Request body
Response
Action completed: existing node updated or already-present attribute replaced
Changes
- breaking
added required request body
- info
api operation id
api_v3_content_types_createwas added - info
the endpoint scheme security
bearerAuthwas added to the API - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the success response with the status
- info
added the success response with the status
- info
added the success response with the status
- breaking