Skip to main content
POST
/
api
/
v3
/
content-types
curl --request POST \ --url https://api.lighton.ai/api/v3/content-types \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "action": "adopt", "content_types": [ "legal", "finance" ] } '
{ "content_types": [ { "path": "legal", "code": "legal", "label": "Legal", "children": [ { "path": "legal:contract", "code": "contract", "label": "Contract" } ] } ] }

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for POST /api/v3/content-types.

Action-dispatched per FAC0012. Every action is idempotent.

Schema-side verb family:

  • adopt — bulk import from the Pydantic seed catalog.
  • define_content_type / undefine_content_type — CRUD on tree nodes.
  • define_attribute / undefine_attribute — CRUD on attribute columns.

Fields are validated per action in validate_fields_for_action — top-level optionality mirrors the union of action shapes, so consumers only need a single Pydantic class (friendly to drf-spectacular), but the validator enforces the narrow contract per action, the same pattern used by FileFacetActionRequest.

action
enum<string>
required
Available options:
adopt,
define_content_type,
undefine_content_type,
define_attribute,
undefine_attribute
content_types
string[]
parent_path
string | null
code
string | null
content_type_path
string | null

Colon-separated content type path.

label
string | null

Human-readable label for the node or attribute.

description
string | null

Optional descriptive text for the node or attribute.

inherit_attributes
boolean | null

Whether child content types inherit attributes from ancestors. Defaults to true on create.

name
string | null

Attribute identifier in snake_case.

attribute_type
string | null

Public attribute type. Supported values: text, number, date, boolean, select, multi-select, rich-text. Accepted aliases: multi_select, multiselect, rich_text, richtext.

required
boolean | null

Whether the attribute is required. Defaults to false.

choices
string[] | null

Required for select and multi-select attributes. Must be omitted for all other types.

Response

Action completed: existing node updated or already-present attribute replaced

content_types
ContentTypeNodeResponse · object[]
required
can_edit
boolean | null