> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/knowledge-base/create-node.md).

# Create Node

Create a knowledge-base node (folder or document) in the caller's org.

A `document` may carry inline `markdown` or reference an uploaded file via `source_file_id`; a `folder` is a structural container. `parent_id` must reference a live folder in the caller's organisation (root when null). `summary` is an optional free-text summary and `metadata` an optional caller-composed JSON object; both may be set on either type.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"CreateNodePayloadSchema":{"properties":{"node_type":{"$ref":"#/components/schemas/NodeType"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"markdown":{"type":"string","title":"Markdown","default":""},"source_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source File Id"},"summary":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Summary","description":"Optional free-text summary of the node. Applies to folders and documents; a blank value is stored as no summary."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form JSON object of the caller's own keys and values — anything the organisation wants to record against the node (owner, department, retention class, external ids). Must be an object, not an array or a scalar; at most 64 top-level keys and 16384 bytes once serialized. An empty object is stored as no metadata."}},"type":"object","required":["node_type","name"],"title":"CreateNodePayloadSchema","description":"Request schema for creating a knowledge-base node.\n\n`markdown` / `source_file_id` apply to `document` nodes; for a `folder` they\nmust be omitted (validation fails if provided). `summary` and `metadata` apply\nto both node types. Tenancy comes from the authenticated caller, not the\npayload."},"NodeType":{"type":"string","enum":["folder","document"],"title":"NodeType","description":"The node-type discriminator — the single extension point for new types.\n\nOnly the local types exist today (`folder`, `document`); the CTI design\nkeeps adding types additive."},"KnowledgeNodeResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"organisation_id":{"type":"integer","title":"Organisation Id"},"node_type":{"$ref":"#/components/schemas/NodeType"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"citation_count":{"type":"integer","title":"Citation Count"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeNodeUserSchema"},{"type":"null"}]},"updated_by":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeNodeUserSchema"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"name_translations":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Name Translations","description":"Per-language display-name overrides (ISO 639-1 keys), for the two system-managed root folders only — null for every other node. `name` always stays the canonical English string; the caller decides which (if any) of these to show."}},"type":"object","required":["id","organisation_id","node_type","name","slug","parent_id","path","summary","citation_count","metadata","created_by","updated_by","created_at","updated_at"],"title":"KnowledgeNodeResponseSchema","description":"Response schema for a knowledge-base node (tree view, no document body)."},"KnowledgeNodeUserSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","email","full_name"],"title":"KnowledgeNodeUserSchema","description":"Basic info about a node's creator/updater."}}},"paths":{"/api/v1/knowledge-base/nodes":{"post":{"tags":["knowledge-base","public"],"summary":"Create Node","description":"Create a knowledge-base node (folder or document) in the caller's org.\n\nA `document` may carry inline `markdown` or reference an uploaded file\nvia `source_file_id`; a `folder` is a structural container. `parent_id`\nmust reference a live folder in the caller's organisation (root when null).\n`summary` is an optional free-text summary and `metadata` an optional\ncaller-composed JSON object; both may be set on either type.","operationId":"knowledge-base-create_node","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNodePayloadSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeNodeResponseSchema"}}}},"400":{"description":"Invalid request payload or parameters","content":{"application/json":{}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}}}}}}}
```
