Skip to main content
POST
/
api
/
v3
/
files
/
{file_id}
/
facets
curl --request POST \
  --url https://api.lighton.ai/api/v3/files/{file_id}/facets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "classify",
  "content_type_path": "legal:contract:nda"
}
'
{
  "name": "<string>",
  "value": "<string>",
  "content_type_path": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

file_id
integer
required

Body

application/json

Write operation for a file's facets (classifications + attribute values).

Explicit verb-noun actions per FAC0012:

  • classify / unclassify: T2 (file ↔ content type)
  • set_value / clear_value: T3 (attribute value under an assigned content type)

Value actions require attribute_name; classification actions require only content_type_path.

action
enum<string>
required
Available options:
classify,
unclassify,
set_value,
clear_value
content_type_path
string
required

Assigned content type path, e.g. legal:contract:nda.

attribute_name
string | null

Attribute identifier in snake_case.

value
any

Attribute value for set_value. Shape depends on attribute type: text/rich-text=string, number=number, date=date string (YYYY-MM-DD), boolean=true/false, select=string from choices, multi-select=array of strings from choices.

Response

Content type already classified, or attribute value updated

name
string
required
value
required

Attribute value. Shape depends on type: string, number, boolean, date string, or array of strings for multi-select.

content_type_path
string
required