Execute multiple content-type actions in a single request.
All actions are validated upfront before any execution begins. If any
action has invalid fields, the entire batch is rejected with a 422 response
and no actions are executed.
On domain errors (e.g., content type not found, permission denied), the
batch fails fast at the failing action. The error response includes an
"index" field (0-based) indicating which action caused the failure.
Actions before the failing index are committed; their results are not
returned. All verbs are idempotent — it is safe to re-send the entire
batch after fixing the error.
Request:{"actions": [<action>, <action>, ...]}
Each action object follows the same schema as the single-action
POST /api/v3/content-types endpoint. Maximum 50 actions per batch.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LightOn Developers","colors":{"primary":"#1f99bb","light":"#1f99bb","dark":"#1f99bb"},"logo":{"light":"https://mintcdn.com/lighton-developers/dojq_qF_vSGGGm4-/logo/light.svg?fit=max\u0026auto=format\u0026n=dojq_qF_vSGGGm4-\u0026q=85\u0026s=345d3b10124f99971a7737a9f06f2886","dark":"https://mintcdn.com/lighton-developers/dojq_qF_vSGGGm4-/logo/dark.svg?fit=max\u0026auto=format\u0026n=dojq_qF_vSGGGm4-\u0026q=85\u0026s=d1c2d4800c07667359bb3abf2437e7aa"},"favicon":"https://mintcdn.com/lighton-developers/p54dDELPycbNT9ym/favicon.svg?fit=max\u0026auto=format\u0026n=p54dDELPycbNT9ym\u0026q=85\u0026s=c9a4897b47f6d0e0d035509f82d5c847","navbar":{"primary":{"type":"button","label":"Console","href":"https://console.lighton.ai"}},"footer":{"socials":{"x":"https://x.com/lightonio","linkedin":"https://www.linkedin.com/company/lighton","bluesky":"https://bsky.app/profile/lightonai.bsky.social","youtube":"https://www.youtube.com/@lighton4013","website":"https://lighton.ai/newsletter"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Playground","icon":"circle-play","href":"https://console.lighton.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lighton-developers","hasAudioNarration":false,"actualSubdomain":"lighton-developers","customDomains":["developers.lighton.ai"],"gitSource":{"type":"github","owner":"lightonai","repo":"lighton-developers-documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae0d933663d8e17af01bd02","collectionId":"33d6668b-f92a-409f-9b5b-7f9039646113","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae0d933663d8e17af01bd02"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae0d933663d8e17af01bd02","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"API Reference","count":50},{"language":"default","tag":"Intelligence","count":30},{"language":"default","tag":"Tutorials","count":15},{"language":"default","tag":"Facets","count":14},{"language":"default","tag":"Administration","count":13},{"language":"default","tag":"MCP Server","count":9},{"language":"default","tag":"Integrations","count":8},{"language":"default","tag":"Classify and organise documents","count":8},{"language":"default","tag":"Workspaces","count":8},{"language":"default","tag":"Budget","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@lighton.ai"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/facets/batch-define-content-types-and-attributes","slug":"/api-reference/facets/batch-define-content-types-and-attributes","pageMetadata":{"title":"Batch define content types and attributes","description":"Execute multiple content-type actions in a single request.\n\nAll actions are **validated upfront** before any execution begins. If any\naction has invalid fields, the entire batch is rejected with a 422 response\nand no actions are executed.\n\nOn **domain errors** (e.g., content type not found, permission denied), the\nbatch fails fast at the failing action. The error response includes an\n`\"index\"` field (0-based) indicating which action caused the failure.\nActions before the failing index are committed; their results are not\nreturned. All verbs are idempotent — it is safe to re-send the entire\nbatch after fixing the error.\n\n**Request:** `{\"actions\": [\u003caction>, \u003caction>, ...]}`\n\nEach action object follows the same schema as the single-action\n`POST /api/v3/content-types` endpoint. Maximum 50 actions per batch.\n\n**Response:** `{\"results\": [{\"status\": \u003ccode>, \"data\": \u003cbody|null>}, ...]}`\n\nResults are in the same order as the input actions. The `data` key is\n`null` for 204 actions (deletes).\n\nSee `POST /api/v3/content-types` for available actions and their fields.","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/batch","href":"/api-reference/facets/batch-define-content-types-and-attributes","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Execute multiple content-type actions in a single request.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"All actions are \", _jsx(_components.strong, {\n children: \"validated upfront\"\n }), \" before any execution begins. If any\\naction has invalid fields, the entire batch is rejected with a 422 response\\nand no actions are executed.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"On \", _jsx(_components.strong, {\n children: \"domain errors\"\n }), \" (e.g., content type not found, permission denied), the\\nbatch fails fast at the failing action. The error response includes an\\n\", _jsx(_components.code, {\n children: \"\\\"index\\\"\"\n }), \" field (0-based) indicating which action caused the failure.\\nActions before the failing index are committed; their results are not\\nreturned. All verbs are idempotent — it is safe to re-send the entire\\nbatch after fixing the error.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Request:\"\n }), \" \", _jsx(_components.code, {\n children: \"{\\\"actions\\\": [\u003caction>, \u003caction>, ...]}\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Each action object follows the same schema as the single-action\\n\", _jsx(_components.code, {\n children: \"POST /api/v3/content-types\"\n }), \" endpoint. Maximum 50 actions per batch.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Response:\"\n }), \" \", _jsx(_components.code, {\n children: \"{\\\"results\\\": [{\\\"status\\\": \u003ccode>, \\\"data\\\": \u003cbody|null>}, ...]}\"\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Results are in the same order as the input actions. The \", _jsx(_components.code, {\n children: \"data\"\n }), \" key is\\n\", _jsx(_components.code, {\n children: \"null\"\n }), \" for 204 actions (deletes).\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"See \", _jsx(_components.code, {\n children: \"POST /api/v3/content-types\"\n }), \" for available actions and their fields.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Batch define content types and attributes","description":"Execute multiple content-type actions in a single request.\n\nAll actions are **validated upfront** before any execution begins. If any\naction has invalid fields, the entire batch is rejected with a 422 response\nand no actions are executed.\n\nOn **domain errors** (e.g., content type not found, permission denied), the\nbatch fails fast at the failing action. The error response includes an\n`\"index\"` field (0-based) indicating which action caused the failure.\nActions before the failing index are committed; their results are not\nreturned. All verbs are idempotent — it is safe to re-send the entire\nbatch after fixing the error.\n\n**Request:** `{\"actions\": [\u003caction>, \u003caction>, ...]}`\n\nEach action object follows the same schema as the single-action\n`POST /api/v3/content-types` endpoint. Maximum 50 actions per batch.\n\n**Response:** `{\"results\": [{\"status\": \u003ccode>, \"data\": \u003cbody|null>}, ...]}`\n\nResults are in the same order as the input actions. The `data` key is\n`null` for 204 actions (deletes).\n\nSee `POST /api/v3/content-types` for available actions and their fields.","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/batch","href":"/api-reference/facets/batch-define-content-types-and-attributes","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"api_v3_content_types_batch_create","description":"Execute multiple content-type actions in a single request.\n\nAll actions are **validated upfront** before any execution begins. If any\naction has invalid fields, the entire batch is rejected with a 422 response\nand no actions are executed.\n\nOn **domain errors** (e.g., content type not found, permission denied), the\nbatch fails fast at the failing action. The error response includes an\n`\"index\"` field (0-based) indicating which action caused the failure.\nActions before the failing index are committed; their results are not\nreturned. All verbs are idempotent — it is safe to re-send the entire\nbatch after fixing the error.\n\n**Request:** `{\"actions\": [\u003caction>, \u003caction>, ...]}`\n\nEach action object follows the same schema as the single-action\n`POST /api/v3/content-types` endpoint. Maximum 50 actions per batch.\n\n**Response:** `{\"results\": [{\"status\": \u003ccode>, \"data\": \u003cbody|null>}, ...]}`\n\nResults are in the same order as the input actions. The `data` key is\n`null` for 204 actions (deletes).\n\nSee `POST /api/v3/content-types` for available actions and their fields.","summary":"Batch define content types and attributes","tags":["Facets"],"requestBody":"2ab35409-b015-4ffc-a036-0370027d89ed","security":["79b773a6-1e34-4e74-903f-8960f501d652"],"responses":{"200":"5bbdd6b4-f44a-46d9-87d3-0a53fab45b5c","400":"0e28e803-f125-4a1b-9528-301e1d6d16f6","401":"2627b08a-abd5-4e6e-bced-8120ca8e8192","403":"8067c3a6-2875-445c-940f-4f910b07c9dd","422":"b1f12753-0c75-4275-8498-0d1f9e2e8b0c","503":"5f1564a4-7d50-42fb-b1cf-9c209075a93a"},"method":"post","type":"path","servers":["48c3fa0c-537e-4ab8-b62c-fc02ab11f431"],"path":"/api/v3/content-types/batch","baseUrlOptions":["https://api.lighton.ai"],"title":"Batch define content types and attributes","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"description":"Batch request for content-type schema operations.\n\nAll actions are validated upfront before any execution begins.","properties":{"actions":{"items":{"description":"Request body for POST /api/v3/content-types.\n\nAction-dispatched per FAC0012. Every action is idempotent.\n\nSchema-side verb family:\n - ``adopt`` — bulk import from the Pydantic seed catalog.\n - ``define_content_type`` / ``undefine_content_type`` — CRUD on tree nodes.\n - ``define_attribute`` / ``undefine_attribute`` — CRUD on attribute columns.\n\nFields are validated per action in ``validate_fields_for_action`` — top-level\noptionality mirrors the union of action shapes, so consumers only need a\nsingle Pydantic class (friendly to drf-spectacular), but the validator\nenforces the narrow contract per action, the same pattern used by\n``FileFacetActionRequest``.","properties":{"action":{"type":"string","title":"Action","enum":["adopt","define_content_type","undefine_content_type","define_attribute","undefine_attribute"],"isRequired":true,"uniqueKey":"actions.items.[INDEX].action","typeLabel":"enum\u003cstring>"},"content_types":{"default":[],"items":{"type":"string","uniqueKey":"actions.items.[INDEX].content_types.items.[INDEX]","typeLabel":"string"},"title":"Content Types","type":"array","uniqueKey":"actions.items.[INDEX].content_types","typeLabel":"string[]"},"parent_path":{"oneOf":[{"type":"string","title":"Parent Path","uniqueKey":"actions.items.[INDEX].parent_path.oneOf.0","typeLabel":"string"},{"type":"null","title":"Parent Path","uniqueKey":"actions.items.[INDEX].parent_path.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].parent_path","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","uniqueKey":"actions.items.[INDEX].code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","uniqueKey":"actions.items.[INDEX].code.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].code","typeLabel":"string | null"},"content_type_path":{"oneOf":[{"type":"string","title":"Content Type Path","description":"Colon-separated content type path.","uniqueKey":"actions.items.[INDEX].content_type_path.oneOf.0","typeLabel":"string"},{"type":"null","title":"Content Type Path","description":"Colon-separated content type path.","uniqueKey":"actions.items.[INDEX].content_type_path.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].content_type_path","typeLabel":"string | null"},"label":{"oneOf":[{"type":"string","title":"Label","description":"Human-readable label for the node or attribute.","uniqueKey":"actions.items.[INDEX].label.oneOf.0","typeLabel":"string"},{"type":"null","title":"Label","description":"Human-readable label for the node or attribute.","uniqueKey":"actions.items.[INDEX].label.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].label","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","title":"Description","description":"Optional descriptive text for the node or attribute.","uniqueKey":"actions.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","title":"Description","description":"Optional descriptive text for the node or attribute.","uniqueKey":"actions.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].description","typeLabel":"string | null"},"inherit_attributes":{"oneOf":[{"type":"boolean","title":"Inherit Attributes","description":"Whether child content types inherit attributes from ancestors. Defaults to true on create.","uniqueKey":"actions.items.[INDEX].inherit_attributes.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Inherit Attributes","description":"Whether child content types inherit attributes from ancestors. Defaults to true on create.","uniqueKey":"actions.items.[INDEX].inherit_attributes.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].inherit_attributes","typeLabel":"boolean | null"},"name":{"oneOf":[{"type":"string","title":"Name","description":"Attribute identifier in snake_case.","uniqueKey":"actions.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","description":"Attribute identifier in snake_case.","uniqueKey":"actions.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].name","typeLabel":"string | null"},"attribute_type":{"oneOf":[{"type":"string","title":"Attribute Type","description":"Public attribute type. Supported values: text, number, date, boolean, select, multi-select, rich-text. Accepted aliases: multi_select, multiselect, rich_text, richtext.","uniqueKey":"actions.items.[INDEX].attribute_type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Attribute Type","description":"Public attribute type. Supported values: text, number, date, boolean, select, multi-select, rich-text. Accepted aliases: multi_select, multiselect, rich_text, richtext.","uniqueKey":"actions.items.[INDEX].attribute_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].attribute_type","typeLabel":"string | null"},"required":{"oneOf":[{"type":"boolean","title":"Required","description":"Whether the attribute is required. Defaults to false.","uniqueKey":"actions.items.[INDEX].required.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Required","description":"Whether the attribute is required. Defaults to false.","uniqueKey":"actions.items.[INDEX].required.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].required","typeLabel":"boolean | null"},"choices":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"actions.items.[INDEX].choices.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Choices","description":"Required for select and multi-select attributes. Must be omitted for all other types.","uniqueKey":"actions.items.[INDEX].choices.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Choices","description":"Required for select and multi-select attributes. Must be omitted for all other types.","uniqueKey":"actions.items.[INDEX].choices.oneOf.1","typeLabel":"null"}],"uniqueKey":"actions.items.[INDEX].choices","typeLabel":"string[] | null"}},"required":["action"],"title":"ContentTypeActionRequest","type":"object","uniqueKey":"actions.items.[INDEX]","typeLabel":"ContentTypeActionRequest · object"},"maxItems":50,"minItems":1,"title":"Actions","type":"array","isRequired":true,"uniqueKey":"actions","typeLabel":"ContentTypeActionRequest · object[]"}},"required":["actions"],"title":"ContentTypeBatchRequest","type":"object","uniqueKey":"","typeLabel":"ContentTypeBatchRequest · object"},"examples":{"AdoptAndDefineAttribute":{"title":"AdoptAndDefineAttribute","value":{"actions":[{"action":"adopt","content_types":["legal"]},{"action":"define_attribute","content_type_path":"legal","name":"owner","attribute_type":"text"}]}},"BuildATreeFromScratch":{"title":"BuildATreeFromScratch","value":{"actions":[{"action":"define_content_type","code":"compliance","label":"Compliance"},{"action":"define_content_type","parent_path":"compliance","code":"audit-report","label":"Audit Report"},{"action":"define_attribute","content_type_path":"compliance","name":"auditor","attribute_type":"text"}]}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"5bbdd6b4-f44a-46d9-87d3-0a53fab45b5c":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"status":{"title":"Status","type":"integer","isRequired":true,"uniqueKey":"results.items.[INDEX].status","typeLabel":"integer"},"data":{"oneOf":[{"type":"object","title":"Data","additionalProperties":true,"uniqueKey":"results.items.[INDEX].data.oneOf.0","typeLabel":"Data · object"},{"type":"null","title":"Data","uniqueKey":"results.items.[INDEX].data.oneOf.1","typeLabel":"null"}],"uniqueKey":"results.items.[INDEX].data","typeLabel":"Data · object | null"}},"required":["status"],"title":"BatchResultItem","type":"object","uniqueKey":"results.items.[INDEX]","typeLabel":"BatchResultItem · object"},"title":"Results","type":"array","isRequired":true,"uniqueKey":"results","typeLabel":"BatchResultItem · object[]"}},"required":["results"],"title":"BatchResponse","type":"object","uniqueKey":"","typeLabel":"BatchResponse · object"},"examples":{"MixedStatuses":{"title":"MixedStatuses","value":{"results":[{"status":200,"data":{"content_types":[{"path":"legal","code":"legal","label":"Legal"}]}},{"status":201,"data":{"name":"owner","label":"Owner","type":"text","required":false,"description":"","choices":[]}}]}},"DeleteResult(nullData)":{"title":"DeleteResult(nullData)","value":{"results":[{"status":204,"data":null}]}}},"exampleType":"examples"}},"description":"All actions executed successfully","exampleType":"examples"},"0e28e803-f125-4a1b-9528-301e1d6d16f6":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"},"index":{"type":"integer","description":"0-based position of the failing action in the batch.","uniqueKey":"index","typeLabel":"integer"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"ContentTypeNotFound(withIndex)":{"title":"ContentTypeNotFound(withIndex)","value":{"id":null,"code":404,"error":"content_type_not_found","detail":"Content type 'nonexistent' not found for this company.","doc_url":"https://developers.lighton.ai/errors#content_type_not_found","index":1}}},"exampleType":"examples"}},"description":"Domain error with action index","exampleType":"examples"},"2627b08a-abd5-4e6e-bced-8120ca8e8192":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"Unauthorized":{"title":"Unauthorized","value":{"id":null,"code":401,"error":"unauthorized","detail":"Authentication credentials were not provided or are invalid.","doc_url":"https://developers.lighton.ai/errors#unauthorized"}}},"exampleType":"examples"}},"description":"Authentication credentials were not provided or are invalid","exampleType":"examples"},"8067c3a6-2875-445c-940f-4f910b07c9dd":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"},"index":{"type":"integer","description":"0-based position of the failing action in the batch.","uniqueKey":"index","typeLabel":"integer"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"PermissionDenied(withIndex)":{"title":"PermissionDenied(withIndex)","value":{"id":null,"code":403,"error":"insufficient_permissions","detail":"Permission denied for action 'undefine_content_type'.","doc_url":"https://developers.lighton.ai/errors#insufficient_permissions","index":1}}},"exampleType":"examples"}},"description":"Permission denied for action","exampleType":"examples"},"b1f12753-0c75-4275-8498-0d1f9e2e8b0c":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"},"fields":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"error":{"type":"string","description":"Error code / translation key","isRequired":true,"uniqueKey":"fields.additionalProperties.items.[INDEX].error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable description of the field error","isRequired":true,"uniqueKey":"fields.additionalProperties.items.[INDEX].detail","typeLabel":"string"}},"required":["detail","error"],"uniqueKey":"fields.additionalProperties.items.[INDEX]","typeLabel":"object"},"uniqueKey":"fields.additionalProperties","typeLabel":"object[]"},"description":"Field-level validation errors keyed by field name","uniqueKey":"fields","typeLabel":"object"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"ValidationError":{"title":"ValidationError","value":{"id":null,"code":422,"error":"validation_error","detail":"One or more fields failed validation.","doc_url":"https://developers.lighton.ai/errors#validation_error","fields":{"\u003cfield_name>":[{"error":"required","detail":"This field is required."}]}}}},"exampleType":"examples"}},"description":"Request body is valid JSON but one or more fields failed validation","exampleType":"examples"},"5f1564a4-7d50-42fb-b1cf-9c209075a93a":{"description":"API is under maintenance. Check `GET /api/v3/system/status` for active periods and retry.","content":{"application/json":{"schema":{"type":"object","description":"Returned by the maintenance middleware when the requested endpoint is blocked.","required":["detail","error","mode"],"properties":{"detail":{"type":"string","example":"System is under maintenance.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"error":{"type":"string","example":"service_maintenance","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"mode":{"type":"string","enum":["full_shutdown","warning_banner"],"description":"`full_shutdown` blocks all traffic; `warning_banner` also blocks and shows a dismissible toast.","isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","description":"Operator-supplied maintenance reason, if any.","uniqueKey":"reason","typeLabel":"string"},"started_at":{"type":"string","format":"date-time","uniqueKey":"started_at","typeLabel":"string\u003cdate-time>"},"endpoint_category_names":{"type":"array","items":{"type":"string","uniqueKey":"endpoint_category_names.items.[INDEX]","typeLabel":"string"},"description":"Non-empty only for category-scoped periods. Empty means all endpoints are affected.","uniqueKey":"endpoint_category_names","typeLabel":"string[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"detail":"System is under maintenance.","error":"service_maintenance","mode":"full_shutdown","reason":"\u003cstring>","started_at":"2023-11-07T05:31:56Z","endpoint_category_names":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"79b773a6-1e34-4e74-903f-8960f501d652":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","scopes":[]}}},"servers":{"48c3fa0c-537e-4ab8-b62c-fc02ab11f431":{"url":"https://api.lighton.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/api-console.yaml"},"subdomain":"lighton-developers","siteName":"LightOn Developers","title":"Batch define content types and attributes - LightOn Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-16T07:50:02.780Z","originalFileLocation":"api-reference/facets/batch-define-content-types-and-attributes.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Execute multiple content-type actions in a single request. All actions are validated upfront before any execution begins. If any action has invalid fields, the entire batch is rejected with a 422 response and no actions are executed. On domain errors (e.g., content type not found, permission denied), the batch fails fast at the failing action. The error response includes an \u0026quot;index\u0026quot; field (0-based) indicating which action caused the failure. Actions before the failing index are committed; their results are not returned. All verbs are idempotent — it is safe to re-send the entire batch after fixing the error. Request: {\u0026quot;actions\u0026quot;: [, , ...]} Each action object follows the same schema as the single-action POST /api/v3/content-types endpoint. Maximum 50 actions per batch. Response: {\u0026quot;results\u0026quot;: [{\u0026quot;status\u0026quot;: , \u0026quot;data\u0026quot;: }, ...]} Results are in the same order as the input actions. The data key is null for 204 actions (deletes). See POST /api/v3/content-types for available actions and their fields.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LightOn Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Batch define content types and attributes - LightOn Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Execute multiple content-type actions in a single request. All actions are validated upfront before any execution begins. If any action has invalid fields, the entire batch is rejected with a 422 response and no actions are executed. On domain errors (e.g., content type not found, permission denied), the batch fails fast at the failing action. The error response includes an \u0026quot;index\u0026quot; field (0-based) indicating which action caused the failure. Actions before the failing index are committed; their results are not returned. All verbs are idempotent — it is safe to re-send the entire batch after fixing the error. Request: {\u0026quot;actions\u0026quot;: [, , ...]} Each action object follows the same schema as the single-action POST /api/v3/content-types endpoint. Maximum 50 actions per batch. Response: {\u0026quot;results\u0026quot;: [{\u0026quot;status\u0026quot;: , \u0026quot;data\u0026quot;: }, ...]} Results are in the same order as the input actions. The data key is null for 204 actions (deletes). See POST /api/v3/content-types for available actions and their fields.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LightOn Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lighton-developers.mintlify.site/_mintlify/api/og/v2?division=Facets\u0026amp;title=Batch+define+content+types+and+attributes\u0026amp;description=Execute+multiple+content-type+actions+in+a+single+request.%0A%0AAll+actions+are+**validated+upfront**+before+any+execution+begins.+If+any%0Aaction+has+invalid+fields%2C\u0026amp;theme=f4a17457a3f509b4a9ccfb44\u0026amp;signature=4c14da15c4c2ea219208329d3af82bf4bef9ec6168cebfee748f4e40f76f1473\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Batch define content types and attributes - LightOn Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Execute multiple content-type actions in a single request. All actions are validated upfront before any execution begins. If any action has invalid fields, the entire batch is rejected with a 422 response and no actions are executed. On domain errors (e.g., content type not found, permission denied), the batch fails fast at the failing action. The error response includes an \u0026quot;index\u0026quot; field (0-based) indicating which action caused the failure. Actions before the failing index are committed; their results are not returned. All verbs are idempotent — it is safe to re-send the entire batch after fixing the error. Request: {\u0026quot;actions\u0026quot;: [, , ...]} Each action object follows the same schema as the single-action POST /api/v3/content-types endpoint. Maximum 50 actions per batch. Response: {\u0026quot;results\u0026quot;: [{\u0026quot;status\u0026quot;: , \u0026quot;data\u0026quot;: }, ...]} Results are in the same order as the input actions. The data key is null for 204 actions (deletes). See POST /api/v3/content-types for available actions and their fields.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lighton-developers.mintlify.site/_mintlify/api/og/v2?division=Facets\u0026amp;title=Batch+define+content+types+and+attributes\u0026amp;description=Execute+multiple+content-type+actions+in+a+single+request.%0A%0AAll+actions+are+**validated+upfront**+before+any+execution+begins.+If+any%0Aaction+has+invalid+fields%2C\u0026amp;theme=f4a17457a3f509b4a9ccfb44\u0026amp;signature=4c14da15c4c2ea219208329d3af82bf4bef9ec6168cebfee748f4e40f76f1473\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LightOn Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1f99bb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/facets/batch-define-content-types-and-attributes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.lighton.ai/#organization\",\"name\":\"LightOn Developers\",\"url\":\"https://developers.lighton.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lighton-developers/dojq_qF_vSGGGm4-/logo/light.svg?fit=max\u0026auto=format\u0026n=dojq_qF_vSGGGm4-\u0026q=85\u0026s=345d3b10124f99971a7737a9f06f2886\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.lighton.ai#website\",\"name\":\"LightOn Developers\",\"url\":\"https://developers.lighton.ai\",\"publisher\":{\"@id\":\"https://developers.lighton.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes#webpage\",\"url\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes\",\"name\":\"Batch define content types and attributes\",\"description\":\"Execute multiple content-type actions in a single request. All actions are validated upfront before any execution begins. If any action has invalid fields, the entire batch is rejected with a 422 response and no actions are executed. On domain errors (e.g., content type not found, permission denied), the batch fails fast at the failing action. The error response includes an \\\"index\\\" field (0-based) indicating which action caused the failure. Actions before the failing index are committed; their results are not returned. All verbs are idempotent — it is safe to re-send the entire batch after fixing the error. Request: {\\\"actions\\\": [, , ...]} Each action object follows the same schema as the single-action POST /api/v3/content-types endpoint. Maximum 50 actions per batch. Response: {\\\"results\\\": [{\\\"status\\\": , \\\"data\\\": }, ...]} Results are in the same order as the input actions. The data key is null for 204 actions (deletes). See POST /api/v3/content-types for available actions and their fields.\",\"dateModified\":\"2026-09-16T07:50:02.780Z\",\"isPartOf\":{\"@id\":\"https://developers.lighton.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Intelligence\",\"item\":\"https://developers.lighton.ai/api-reference/ask/ask-a-question-over-your-documents\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Facets\",\"item\":\"https://developers.lighton.ai/api-reference/facets/list-content-types\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Batch define content types and attributes\",\"item\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes#apireference\",\"headline\":\"Batch define content types and attributes\",\"name\":\"Batch define content types and attributes\",\"description\":\"Execute multiple content-type actions in a single request. All actions are validated upfront before any execution begins. If any action has invalid fields, the entire batch is rejected with a 422 response and no actions are executed. On domain errors (e.g., content type not found, permission denied), the batch fails fast at the failing action. The error response includes an \\\"index\\\" field (0-based) indicating which action caused the failure. Actions before the failing index are committed; their results are not returned. All verbs are idempotent — it is safe to re-send the entire batch after fixing the error. Request: {\\\"actions\\\": [, , ...]} Each action object follows the same schema as the single-action POST /api/v3/content-types endpoint. Maximum 50 actions per batch. Response: {\\\"results\\\": [{\\\"status\\\": , \\\"data\\\": }, ...]} Results are in the same order as the input actions. The data key is null for 204 actions (deletes). See POST /api/v3/content-types for available actions and their fields.\",\"url\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes\",\"mainEntityOfPage\":{\"@id\":\"https://developers.lighton.ai/api-reference/facets/batch-define-content-types-and-attributes#webpage\"},\"dateModified\":\"2026-09-16T07:50:02.780Z\",\"publisher\":{\"@id\":\"https://developers.lighton.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.lighton.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LightOn Developers\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"LightOn Developers","nav":{"global":{"anchors":[{"anchor":"Playground","icon":"circle-play","href":"https://console.lighton.ai"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"},{"title":"API Errors","href":"/api-reference/v3-error-codes"}]},{"group":"Intelligence","pages":[{"title":"Ask a question over your documents","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/ask","href":"/api-reference/ask/ask-a-question-over-your-documents"},{"title":"Search document chunks","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/search","href":"/api-reference/search/search-document-chunks"},{"group":"Files","pages":[{"title":"List files accessible to the authenticated user","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files","href":"/api-reference/files/list-files-accessible-to-the-authenticated-user"},{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files","href":"/api-reference/files/upload-a-file"},{"title":"Delete multiple files in a single request","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/bulk-delete","href":"/api-reference/files/delete-multiple-files-in-a-single-request"},{"title":"Retrieve a single file by ID","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{id}","href":"/api-reference/files/retrieve-a-single-file-by-id"},{"title":"Update file metadata or replace its file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/files/{id}","href":"/api-reference/files/update-file-metadata-or-replace-its-file"},{"title":"Delete a file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/files/{id}","href":"/api-reference/files/delete-a-file"},{"title":"Download a document file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{id}/download","href":"/api-reference/files/download-a-document-file"},{"title":"Get document thumbnail","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{id}/thumbnail","href":"/api-reference/files/get-document-thumbnail"}]},{"group":"Facets","pages":[{"title":"List content types","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/content-types","href":"/api-reference/facets/list-content-types"},{"title":"Define content types and attributes","description":"Create, modify, and organise your company's content-type trees and their\nattributes. Every action is idempotent, safe to re-run.\n\n**Two ways to build your schema:**\n\n1. **Adopt from starter templates**: import ready-made trees from the seed\n catalog (`GET /api/v3/content-types/templates`). Once adopted, they're\n yours to customize.\n2. **Build from scratch**: create your own trees, nodes, and attributes\n entirely with `define_content_type` and `define_attribute`.\n\nYou can mix both: adopt `legal` from the seeds, then add a custom\n`compliance` tree alongside it. Each tree is independent.\n\n**Actions:**\n- `adopt`: import trees from the seed catalog (starter templates)\n- `define_content_type`: create or update a tree node (root or child)\n- `undefine_content_type`: delete a node and its entire subtree\n- `define_attribute`: add or update a metadata field on a node\n- `undefine_attribute`: remove a metadata field\n\n**Building a tree from scratch, example flow:**\n\n1. Create a root:\n ```json\n {\"action\": \"define_content_type\", \"code\": \"compliance\", \"label\": \"Compliance\"}\n ```\n2. Add children:\n ```json\n {\"action\": \"define_content_type\", \"parent_path\": \"compliance\", \"code\": \"audit-report\", \"label\": \"Audit Report\"}\n ```\n3. Add attributes:\n ```json\n {\"action\": \"define_attribute\", \"content_type_path\": \"compliance\", \"name\": \"owner\", \"attribute_type\": \"text\"}\n ```\n4. Classify files via `POST /api/v3/files/{id}/facets`:\n ```json\n {\"action\": \"classify\", \"content_type_path\": \"compliance:audit-report\"}\n ```\n\n**Attributes** are metadata fields you define on each node. Types:\n`text`, `number`, `date`, `boolean`, `select`, `multi-select`, `rich-text`.\n`select` and `multi-select` require `choices`. Attributes inherit down the\ntree: define `jurisdiction` on `legal` and it's available on all children.\n\n**Description best practices:** The `description` field on attributes feeds\ninto the scope inference endpoint (`POST /api/v3/content-types/scope`),\nwhere it helps the LLM generate accurate search filters. Use keywords that\nsignal the attribute's nature:\n- **Person names**: include \"name\", \"examiner\", \"inventor\", or \"author\" →\n enables `*value*` wildcard syntax hints\n- **Codes/identifiers**: include \"code\", \"classification\", or \"identifier\" →\n enables exact-match hints (don't guess from topic keywords)\n\n**Multi-classification:** A single document can be classified under multiple\ncontent types from different trees (e.g., both `legal:contract:nda` and\n`compliance:audit-report`).\n\nAvailable seed roots for `adopt`: finance, healthcare, legal, manufacturing, tech\n\nRequires admin-level access to modify the company's schema.","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types","href":"/api-reference/facets/define-content-types-and-attributes"},{"title":"Batch define content types and attributes","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/batch","href":"/api-reference/facets/batch-define-content-types-and-attributes"},{"title":"Resolve search scope","description":"Resolves content type and attribute filters from a natural-language query.\nCall this **before** `/search`, `/ask`, or `/files` to narrow results by domain.\nPass the inferred `content_type` and `attribute` directly to those endpoints.\n\nReturns ranked content types grouped by root schema, each with a relevance score\nand the attribute definitions available for filtering.\n\n### Scores and decision signal\n\nEach content type in the response includes a `score` (relevance to your query).\nUse scores to decide how to scope your search — higher means stronger match.\n\n`has_signal` is a convenience shortcut: it's `true` when the top score meets a\ndefault confidence threshold. For custom logic, use `score` directly and apply\nyour own threshold via the `threshold` request parameter.\n\n### Three modes\n\n**1. Prompt mode** (default) — returns `prompt_context`, a self-contained LLM-ready\ntext block. Feed it to any LLM alongside the user query to infer `content_type`\nand `attribute` filters. The prompt includes ranked content types, attribute\ndefinitions with filter syntax, inference rules, date ranges, and few-shot examples.\n\n**2. Completion mode** — pass `model` (technical name) and the API calls the LLM\nfor you. Returns `scope_completion` with parsed, normalized filters:\n- Label-to-name mapping (e.g. \"Filing Date\" → `filing_date`)\n- Syntax validation against the attribute schema\n- Structured JSON output via guided decoding\n- `warnings` for any normalization applied or issues detected\n- If the LLM call fails, `scope_completion` is still returned with `warnings`\n explaining the failure — the rest of the response remains usable.\n \n**3. Catalog + completion mode** — set `relevance_scoring: \"none\"` with a `query`\nand `model` to get the full content type catalog AND an LLM-inferred\n`scope_completion`. Useful when you want the LLM to choose from ALL content types\nwithout retrieval pre-filtering. `max_results` and `threshold` are ignored.\n\n### Response fields\n\n| Field | Description |\n|-------|-------------|\n| `score` | Relevance score. Higher = better match. Comparable across requests. |\n| `max_score` | Highest score in a root group. Compare roots without iterating. |\n| `chunk_count` | Retrieval chunks matching this CT. More chunks = broader evidence. |\n| `doc_count` | Total corpus documents classified under this CT. |\n| `prompt_context` | LLM-ready prompt text. Pass to your LLM as-is. |\n| `prompt_version` | Fingerprint (`t:\u003chex>.d:\u003chex>`) for eval reproducibility. |\n| `scope_completion` | Parsed LLM output (only when `model` is provided). |\n\n### Schema context mode\n\nOmit `query` to get the full content type catalog — useful for system prompts,\ntool descriptions, or schema exploration. `groups` contains all content types with\ntheir attributes (`score=0`, `chunk_count=0` since there is no query to rank against).\n`prompt_context` contains the same catalog as LLM-ready text.\n\n### Integration notes\n\n- Content type paths use `:` as separator (e.g. `patent:electricity:h04`).\n- Attribute filter syntax is documented in `prompt_context` per attribute type.\n Date ranges use `>=` / `\u003c=` operators (e.g. `filing_date:>=2023-01-01`).\n- Writing meaningful attribute descriptions (especially for person-name and\n code/identifier fields) improves the quality of `prompt_context` hints.","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/scope","href":"/api-reference/facets/resolve-search-scope"},{"title":"List content type templates","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/content-types/templates","href":"/api-reference/facets/list-content-type-templates"},{"title":"Resolve search scope","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/scope","href":"/api-reference/facets/resolve-search-scope"},{"title":"List file classifications and attribute values","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{file_id}/facets","href":"/api-reference/facets/list-file-classifications-and-attribute-values"},{"title":"Classify file and set attribute values","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/{file_id}/facets","href":"/api-reference/facets/classify-file-and-set-attribute-values"},{"title":"Batch classify and set attribute values","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/{file_id}/facets/batch","href":"/api-reference/facets/batch-classify-and-set-attribute-values"}]},{"group":"Tags","pages":[{"title":"List all tags for the authenticated user's company","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/tags","href":"/api-reference/tags/list-all-tags-for-the-authenticated-users-company"},{"title":"Create a new tag for the company","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/tags","href":"/api-reference/tags/create-a-new-tag-for-the-company"},{"title":"Delete a company tag","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/tags/{id}","href":"/api-reference/tags/delete-a-company-tag"},{"title":"Add tags to a file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/{id}/tags","href":"/api-reference/files/add-tags-to-a-file"},{"title":"Remove a tag from a file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/files/{id}/tags/{tag_id}","href":"/api-reference/files/remove-a-tag-from-a-file"}]},{"group":"Workspaces","pages":[{"title":"List workspaces","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/workspaces","href":"/api-reference/workspaces/list-workspaces"},{"title":"Create a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/workspaces","href":"/api-reference/workspaces/create-a-workspace"},{"title":"Retrieve a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/workspaces/{id}","href":"/api-reference/workspaces/retrieve-a-workspace"},{"title":"Update a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/workspaces/{id}","href":"/api-reference/workspaces/update-a-workspace"},{"title":"Delete a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/workspaces/{id}","href":"/api-reference/workspaces/delete-a-workspace"},{"title":"Browse datasource folders","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/workspaces/datasource/browse","href":"/api-reference/workspaces/browse-datasource-folders"},{"title":"Test datasource credentials","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/workspaces/datasource/test","href":"/api-reference/workspaces/test-datasource-credentials"}]}]},{"group":"Document Processing","pages":[{"group":"Parse","pages":[{"title":"Parse a document to Markdown","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/parse","href":"/api-reference/parse/parse-a-document-to-markdown"},{"title":"Get the status and result of an async parse job","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/parse/{id}","href":"/api-reference/parse/get-the-status-and-result-of-an-async-parse-job"},{"title":"Render a document as PDF","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/preview","href":"/api-reference/parse/render-a-document-as-pdf"}]},{"group":"Extract","pages":[{"title":"Extract structured data from a document","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/extract","href":"/api-reference/extract/extract-structured-data-from-a-document"},{"title":"Get the status and result of an async extract job","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/extract/{job_id}","href":"/api-reference/extract/get-the-status-and-result-of-an-async-extract-job"}]}]},{"group":"Administration","pages":[{"group":"API Keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/keys","href":"/api-reference/api-keys/create-api-key"},{"title":"Retrieve API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/keys/{id}","href":"/api-reference/api-keys/retrieve-api-key"},{"title":"Update API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/keys/{id}","href":"/api-reference/api-keys/update-api-key"},{"title":"Revoke API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/keys/{id}","href":"/api-reference/api-keys/revoke-api-key"}]},{"group":"Budget","pages":[{"title":"Get company budget","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/billing/budget","href":"/api-reference/budget/get-company-budget"},{"title":"Create or update company budget","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml put /api/v3/billing/budget","href":"/api-reference/budget/create-or-update-company-budget"},{"title":"Delete company budget","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/billing/budget","href":"/api-reference/budget/delete-company-budget"},{"title":"List budget alerts","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/billing/budget/alerts","href":"/api-reference/budget/list-budget-alerts"},{"title":"Create budget alert","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/billing/budget/alerts","href":"/api-reference/budget/create-budget-alert"},{"title":"Toggle all budget alerts","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/billing/budget/alerts","href":"/api-reference/budget/toggle-all-budget-alerts"},{"title":"Update budget alert","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/billing/budget/alerts/{id}","href":"/api-reference/budget/update-budget-alert"},{"title":"Delete budget alert","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/billing/budget/alerts/{id}","href":"/api-reference/budget/delete-budget-alert"}]}]}]},{"tab":"Tutorials","pages":[{"title":"Tutorials","href":"/tutorials"}]},{"tab":"Settings","pages":[{"title":"Settings","href":"/untitled-page"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations"}]},{"tab":"MCP Server","pages":[{"title":"MCP Server","href":"/mcp-server/quickstart"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks"}]},{"tab":"Use Cases","pages":[{"title":"Use Cases","href":"/use-cases"}]},{"tab":"Legal","pages":[{"title":"Legal","href":"/legal/terms-of-use"}]},{"tab":"Support","pages":[{"title":"Support","href":"/support"}]}]},"basePath":"","title":"Batch define content types and attributes - LightOn Developers","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}