Skip to main content
GET
/
api
/
v3
/
content-types
List content types
curl --request GET \
  --url https://api.lighton.ai/api/v3/content-types \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.lighton.ai/api/v3/content-types"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.lighton.ai/api/v3/content-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lighton.ai/api/v3/content-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.lighton.ai/api/v3/content-types"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.lighton.ai/api/v3/content-types")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.lighton.ai/api/v3/content-types")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "content_types": [
    {
      "path": "legal",
      "code": "legal",
      "label": "Legal",
      "description": "Legal documents: contracts, litigation, compliance.",
      "inherit_attributes": true,
      "attributes": [
        {
          "name": "jurisdiction",
          "label": "Jurisdiction",
          "type": "multi-select",
          "required": false,
          "description": "Legal jurisdiction(s) governing the document",
          "choices": [
            "FR",
            "US",
            "UK",
            "DE"
          ]
        },
        {
          "name": "confidentiality_level",
          "label": "Confidentiality Level",
          "type": "select",
          "required": false,
          "description": "",
          "choices": [
            "Public",
            "Internal",
            "Confidential",
            "Strictly Confidential"
          ]
        }
      ],
      "children": [
        {
          "path": "legal:contract",
          "code": "contract",
          "label": "Contract",
          "description": "Binding agreements between parties.",
          "inherit_attributes": true,
          "attributes": [
            {
              "name": "jurisdiction",
              "label": "Jurisdiction",
              "type": "multi-select",
              "required": false,
              "description": "Legal jurisdiction(s) governing the document",
              "choices": [
                "FR",
                "US",
                "UK",
                "DE"
              ],
              "inherited": true
            },
            {
              "name": "effective_date",
              "label": "Effective Date",
              "type": "date",
              "required": false,
              "description": "",
              "choices": []
            }
          ],
          "children": [
            {
              "path": "legal:contract:nda",
              "code": "nda",
              "label": "Non-Disclosure Agreement",
              "description": "",
              "inherit_attributes": true,
              "attributes": [
                {
                  "name": "jurisdiction",
                  "label": "Jurisdiction",
                  "type": "multi-select",
                  "required": false,
                  "description": "Legal jurisdiction(s) governing the document",
                  "choices": [
                    "FR",
                    "US",
                    "UK",
                    "DE"
                  ],
                  "inherited": true
                },
                {
                  "name": "effective_date",
                  "label": "Effective Date",
                  "type": "date",
                  "required": false,
                  "description": "",
                  "choices": [],
                  "inherited": true
                },
                {
                  "name": "counterparty",
                  "label": "Counterparty",
                  "type": "text",
                  "required": true,
                  "description": "Name of the other party",
                  "choices": []
                },
                {
                  "name": "is_mutual",
                  "label": "Is Mutual",
                  "type": "boolean",
                  "required": false,
                  "description": "",
                  "choices": []
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "can_edit": true
}

Authorizations

Authorization
string
header
required

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

Query Parameters

depth
integer

Tree depth limit. Omitted = full tree. 0 = roots only.

include_attributes
boolean

Include attribute definitions per content type node. Default: true.

path
string

Content type path(s) to filter (comma-separated).

query
string

When provided, filter the catalog to content types found in a first-pass retrieval for this query. Without this parameter, the full company catalog is returned (existing behavior).

Response

Company content type tree with optional attribute definitions.

content_types
ContentTypeNodeResponse · object[]
required
can_edit
boolean | null