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

# Knowledge Base

Knowledge base, folder, and node related APIs

## Move Knowledge Base Nodes

> This API allows you to move multiple knowledge base documents and/or folders to a target folder in bulk.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- targetFolderId (string, required): The target folder ID to move nodes to.\
> \- nodeIds (array\[string], required): List of node IDs (KnowledgeBase or Folder) to move.\
> \- keepCurrentPermission (boolean, required): Whether to keep the current permissions of the moved nodes.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"MoveKnowledgeBaseNodesResponse":{"properties":{"moved_kb_node_ids":{"description":"Moved knowledge base node IDs","items":{"type":"string"},"title":"Moved Kb Node Ids","type":"array"},"failed_kb_node_ids":{"description":"Failed knowledge base node IDs","items":{"type":"string"},"title":"Failed Kb Node Ids","type":"array"}},"required":["moved_kb_node_ids","failed_kb_node_ids"],"title":"MoveKnowledgeBaseNodesResponse","type":"object"},"MoveKnowledgeBaseNodesRequest":{"properties":{"targetFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The target folder ID of the knowledge base node","title":"Targetfolderid"},"nodeIds":{"description":"The node IDs of the knowledge base node","items":{"type":"string"},"title":"Nodeids","type":"array"},"keepCurrentPermission":{"description":"The keep current permission of the knowledge base node","title":"Keepcurrentpermission","type":"boolean"}},"required":["targetFolderId","nodeIds","keepCurrentPermission"],"title":"MoveKnowledgeBaseNodesRequest","type":"object"}}},"paths":{"/webapi/v2/knowledge_base_nodes/move/bulk":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_move_knowledge_base_nodes","summary":"Move Knowledge Base Nodes","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveKnowledgeBaseNodesResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to move multiple knowledge base documents and/or folders to a target folder in bulk.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- targetFolderId (string, required): The target folder ID to move nodes to.\n- nodeIds (array[string], required): List of node IDs (KnowledgeBase or Folder) to move.\n- keepCurrentPermission (boolean, required): Whether to keep the current permissions of the moved nodes.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveKnowledgeBaseNodesRequest"}}},"required":true}}}}}
```

## Upload Document

> This API allows you to upload a file to the knowledge base. Supports access control, hashtag tagging, folder targeting, and ingestion options.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body (multipart/form-data)\
> \
> \- file (binary, required): The file to upload.\
> \- fileName (string, required): The file name.\
> \- hashtags (array\[string], optional): Hashtags for the document.\
> \- targetFolderId (string, optional): Target folder ID.\
> \- useLayout (boolean, optional): Whether to use layout processing. Defaults to \*\*true\*\*.\
> \- useImageDescription (boolean, optional): Whether to use image description. Defaults to \*\*true\*\*.\
> \- useOcr (boolean, optional): Whether to use OCR. Defaults to \*\*false\*\*.\
> \- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access settings. Defaults to \*\*false\*\*.\
> \- accessPermissionGroups (array\[object], optional): Permission group access settings.\
> \- accessAgents (array\[object], optional): Agent access settings with \`agentId\` and \`accessType\`.\
> \- accessUserFilters (array\[object], optional): User access filters with \`variableName\` and \`value\`.\
> \- viewAccessToAgent (boolean, optional): Whether other agents can view. Defaults to \*\*false\*\*.\
> \- viewAccessToUser (boolean, optional): Whether other users can view. Defaults to \*\*false\*\*.\
> \- properties (array\[object], optional): Custom properties with \`key\` and \`value\`.\
> \- notificationHooks (array\[string], optional): Notification hooks to trigger on ingestion events.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodeResponse":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}],"description":"Knowledge base node","title":"Result"}},"required":["result"],"title":"KnowledgeBaseNodeResponse","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"},"AccessPermissionGroup":{"properties":{"permissionGroupId":{"description":"The permission group ID of the access permission group","title":"Permissiongroupid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access permission group"}},"required":["permissionGroupId","accessType"],"title":"AccessPermissionGroup","type":"object"},"AccessUserFilter":{"properties":{"variableName":{"$ref":"#/components/schemas/AccessUserFilterEnum","description":"The variable name of the access user filter"},"value":{"description":"The value of the access user filter","title":"Value","type":"string"}},"required":["variableName","value"],"title":"AccessUserFilter","type":"object"},"AccessUserFilterEnum":{"description":"If variables other than system variables are added, it need to be redesigned.","enum":["CUSTOMER_ID","CUSTOMER_GROUP"],"title":"AccessUserFilterEnum","type":"string"},"KnowledgeBaseNotificationHookEnum":{"description":"Notification hooks that can be triggered on document ingestion events.","enum":["email_on_ingestion_complete"],"title":"KnowledgeBaseNotificationHookEnum","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/upload":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_upload_knowledge_base_node","summary":"Upload Document","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KnowledgeBaseNodeResponse"},"title":"Response","type":"array"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to upload a file to the knowledge base. Supports access control, hashtag tagging, folder targeting, and ingestion options.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body (multipart/form-data)\n\n- file (binary, required): The file to upload.\n- fileName (string, required): The file name.\n- hashtags (array[string], optional): Hashtags for the document.\n- targetFolderId (string, optional): Target folder ID.\n- useLayout (boolean, optional): Whether to use layout processing. Defaults to **true**.\n- useImageDescription (boolean, optional): Whether to use image description. Defaults to **true**.\n- useOcr (boolean, optional): Whether to use OCR. Defaults to **false**.\n- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access settings. Defaults to **false**.\n- accessPermissionGroups (array[object], optional): Permission group access settings.\n- accessAgents (array[object], optional): Agent access settings with `agentId` and `accessType`.\n- accessUserFilters (array[object], optional): User access filters with `variableName` and `value`.\n- viewAccessToAgent (boolean, optional): Whether other agents can view. Defaults to **false**.\n- viewAccessToUser (boolean, optional): Whether other users can view. Defaults to **false**.\n- properties (array[object], optional): Custom properties with `key` and `value`.\n- notificationHooks (array[string], optional): Notification hooks to trigger on ingestion events.","tags":["KnowledgeBase"],"requestBody":{"content":{"multipart/form-data":{"schema":{"title":"MultiPartBodyParams","type":"object","properties":{"fileName":{"description":"The file name of the knowledge base","title":"Filename","type":"string"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The hashtags of the knowledge base","title":"Hashtags"},"targetFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The target folder ID of the knowledge base","title":"Targetfolderid"},"isOverwriteFolderAccess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The overwrite folder access flag of the knowledge base","title":"Isoverwritefolderaccess"},"isOverwrite":{"default":false,"description":"If true and a document with the same file name already exists in the target folder, overwrite it with the uploaded file instead of creating a suffixed copy. Identical files (same name, size, and content) are always skipped regardless of this flag. Not applied to ZIP uploads: each extracted entry is always created fresh under a new folder.","title":"Isoverwrite","type":"boolean"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroup"},"type":"array"},{"type":"null"}],"description":"The access permission groups of the knowledge base","title":"Accesspermissiongroups"},"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"description":"The access agents of the knowledge base","title":"Accessagents"},"accessUserFilters":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessUserFilter"},"type":"array"},{"type":"null"}],"description":"The access user filters of the knowledge base","title":"Accessuserfilters"},"viewAccessToAgent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The view access to agent flag of the knowledge base","title":"Viewaccesstoagent"},"viewAccessToUser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The view access to user flag of the knowledge base","title":"Viewaccesstouser"},"useLayout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Whether to use layout processing for improved document ingestion. Only used if project allows this feature.","title":"Uselayout"},"useImageDescription":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Whether to use image description for improved document ingestion. Only used if project allows this feature.","title":"Useimagedescription"},"useOcr":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Whether to use OCR for document processing","title":"Useocr"},"properties":{"type":"array","items":{"properties":{"key":{"title":"Key","type":"string"},"value":{"title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"description":"Properties for the knowledge base","title":"Properties"},"notificationHooks":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseNotificationHookEnum"},"type":"array"},{"type":"null"}],"description":"List of notification hooks to trigger on document ingestion events","title":"Notificationhooks"},"file":{"format":"binary","title":"File","type":"string"}},"required":["fileName","file"]}}},"required":true}}}}}
```

## Replace Document File

> This API allows you to replace the file of an existing document while keeping its metadata (hashtags, permissions, etc.).\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Path Parameters\
> \
> \- nodeId (string, required): The global ID of the document to replace.\
> \
> \## Request Body (multipart/form-data)\
> \
> \- file (binary, required): The new file to upload.\
> \- resetClueFeedbacks (boolean, optional): Whether to reset answer feedbacks for this document. Defaults to \*\*false\*\*.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodeResponse":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}],"description":"Knowledge base node","title":"Result"}},"required":["result"],"title":"KnowledgeBaseNodeResponse","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/{node_id}/replace":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_replace_knowledge_base_node","summary":"Replace Document File","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"node_id","schema":{"title":"Node Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodeResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to replace the file of an existing document while keeping its metadata (hashtags, permissions, etc.).\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Path Parameters\n\n- nodeId (string, required): The global ID of the document to replace.\n\n## Request Body (multipart/form-data)\n\n- file (binary, required): The new file to upload.\n- resetClueFeedbacks (boolean, optional): Whether to reset answer feedbacks for this document. Defaults to **false**.","tags":["KnowledgeBase"],"requestBody":{"content":{"multipart/form-data":{"schema":{"title":"MultiPartBodyParams","type":"object","properties":{"resetClueFeedbacks":{"default":false,"description":"Whether to reset answer feedbacks for this document.","title":"Resetcluefeedbacks","type":"boolean"},"file":{"format":"binary","title":"File","type":"string"}},"required":["file"]}}},"required":true}}}}}
```

## Upload Document from S3

> This API allows you to upload documents from Amazon S3 to the knowledge base.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- bucketObjectPath (string, required): The S3 bucket object path of the file.\
> \- awsAccessKey (string, optional): Your S3 Access Key.\
> \- awsSecretKey (string, optional): Your S3 Secret Key.\
> \- awsIamRoleArn (string, optional): AWS IAM Role ARN for access.\
> \- awsExternalId (string, optional): External ID for AWS IAM Role.\
> \- fileName (string, required): The file name.\
> \- hashtags (array\[string], optional): Hashtags for the document.\
> \- targetFolderId (string, optional): Target folder ID.\
> \- useLayout (boolean, optional): Whether to use layout processing. Defaults to \*\*true\*\*.\
> \- useImageDescription (boolean, optional): Whether to use image description. Defaults to \*\*true\*\*.\
> \- useOcr (boolean, optional): Whether to use OCR. Defaults to \*\*false\*\*.\
> \- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access. Defaults to \*\*false\*\*.\
> \- accessPermissionGroups (array\[object], optional): Permission group access settings.\
> \- accessAgents (array\[object], optional): Agent access settings with \`agentId\` and \`accessType\`.\
> \- accessUserFilters (array\[object], optional): User access filters with \`variableName\` and \`value\`.\
> \- viewAccessToAgent (boolean, optional): Whether other agents can view. Defaults to \*\*false\*\*.\
> \- viewAccessToUser (boolean, optional): Whether other users can view. Defaults to \*\*false\*\*.\
> \- properties (array\[object], optional): Custom properties with \`key\` and \`value\`.\
> \- notificationHooks (array\[string], optional): Notification hooks to trigger on ingestion events.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodeResponse":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}],"description":"Knowledge base node","title":"Result"}},"required":["result"],"title":"KnowledgeBaseNodeResponse","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"},"UploadFromAWSS3Request":{"description":"Request model for uploading files from S3.","properties":{"fileName":{"description":"The file name of the knowledge base","title":"Filename","type":"string"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The hashtags of the knowledge base","title":"Hashtags"},"targetFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The target folder ID of the knowledge base","title":"Targetfolderid"},"isOverwriteFolderAccess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The overwrite folder access flag of the knowledge base","title":"Isoverwritefolderaccess"},"isOverwrite":{"default":false,"description":"If true and a document with the same file name already exists in the target folder, overwrite it with the uploaded file instead of creating a suffixed copy. Identical files (same name, size, and content) are always skipped regardless of this flag. Not applied to ZIP uploads: each extracted entry is always created fresh under a new folder.","title":"Isoverwrite","type":"boolean"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroup"},"type":"array"},{"type":"null"}],"description":"The access permission groups of the knowledge base","title":"Accesspermissiongroups"},"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"description":"The access agents of the knowledge base","title":"Accessagents"},"accessUserFilters":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessUserFilter"},"type":"array"},{"type":"null"}],"description":"The access user filters of the knowledge base","title":"Accessuserfilters"},"viewAccessToAgent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The view access to agent flag of the knowledge base","title":"Viewaccesstoagent"},"viewAccessToUser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The view access to user flag of the knowledge base","title":"Viewaccesstouser"},"useLayout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Whether to use layout processing for improved document ingestion. Only used if project allows this feature.","title":"Uselayout"},"useImageDescription":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Whether to use image description for improved document ingestion. Only used if project allows this feature.","title":"Useimagedescription"},"useOcr":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Whether to use OCR for document processing","title":"Useocr"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"description":"Properties for the knowledge base","title":"Properties"},"notificationHooks":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseNotificationHookEnum"},"type":"array"},{"type":"null"}],"description":"List of notification hooks to trigger on document ingestion events","title":"Notificationhooks"},"bucketObjectPath":{"description":"The bucket object path of the file","title":"Bucketobjectpath","type":"string"},"awsSecretKey":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your S3 Secret Key.","title":"Awssecretkey"},"awsAccessKey":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your S3 Access Key.","title":"Awsaccesskey"},"awsIamRoleArn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"AWS IAM Role ARN for access","title":"Awsiamrolearn"},"awsExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"External ID for AWS IAM Role","title":"Awsexternalid"}},"required":["fileName","bucketObjectPath"],"title":"UploadFromAWSS3Request","type":"object"},"AccessPermissionGroup":{"properties":{"permissionGroupId":{"description":"The permission group ID of the access permission group","title":"Permissiongroupid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access permission group"}},"required":["permissionGroupId","accessType"],"title":"AccessPermissionGroup","type":"object"},"AccessUserFilter":{"properties":{"variableName":{"$ref":"#/components/schemas/AccessUserFilterEnum","description":"The variable name of the access user filter"},"value":{"description":"The value of the access user filter","title":"Value","type":"string"}},"required":["variableName","value"],"title":"AccessUserFilter","type":"object"},"AccessUserFilterEnum":{"description":"If variables other than system variables are added, it need to be redesigned.","enum":["CUSTOMER_ID","CUSTOMER_GROUP"],"title":"AccessUserFilterEnum","type":"string"},"KnowledgeBaseNotificationHookEnum":{"description":"Notification hooks that can be triggered on document ingestion events.","enum":["email_on_ingestion_complete"],"title":"KnowledgeBaseNotificationHookEnum","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/upload_from_aws_s3":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_upload_from_aws_s3","summary":"Upload Document from S3","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodeResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to upload documents from Amazon S3 to the knowledge base.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- bucketObjectPath (string, required): The S3 bucket object path of the file.\n- awsAccessKey (string, optional): Your S3 Access Key.\n- awsSecretKey (string, optional): Your S3 Secret Key.\n- awsIamRoleArn (string, optional): AWS IAM Role ARN for access.\n- awsExternalId (string, optional): External ID for AWS IAM Role.\n- fileName (string, required): The file name.\n- hashtags (array[string], optional): Hashtags for the document.\n- targetFolderId (string, optional): Target folder ID.\n- useLayout (boolean, optional): Whether to use layout processing. Defaults to **true**.\n- useImageDescription (boolean, optional): Whether to use image description. Defaults to **true**.\n- useOcr (boolean, optional): Whether to use OCR. Defaults to **false**.\n- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access. Defaults to **false**.\n- accessPermissionGroups (array[object], optional): Permission group access settings.\n- accessAgents (array[object], optional): Agent access settings with `agentId` and `accessType`.\n- accessUserFilters (array[object], optional): User access filters with `variableName` and `value`.\n- viewAccessToAgent (boolean, optional): Whether other agents can view. Defaults to **false**.\n- viewAccessToUser (boolean, optional): Whether other users can view. Defaults to **false**.\n- properties (array[object], optional): Custom properties with `key` and `value`.\n- notificationHooks (array[string], optional): Notification hooks to trigger on ingestion events.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFromAWSS3Request"}}},"required":true}}}}}
```

## Upload Document from Azure Blob

> This API allows you to upload documents from Azure Blob Storage to the knowledge base.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- containerBlobPath (string, required): The Azure container blob path of the file.\
> \- azureConnectionString (string, required): Your Azure Blob Storage connection string.\
> \- fileName (string, required): The file name.\
> \- hashtags (array\[string], optional): Hashtags for the document.\
> \- targetFolderId (string, optional): Target folder ID.\
> \- useLayout (boolean, optional): Whether to use layout processing. Defaults to \*\*true\*\*.\
> \- useImageDescription (boolean, optional): Whether to use image description. Defaults to \*\*true\*\*.\
> \- useOcr (boolean, optional): Whether to use OCR. Defaults to \*\*false\*\*.\
> \- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access. Defaults to \*\*false\*\*.\
> \- accessPermissionGroups (array\[object], optional): Permission group access settings.\
> \- accessAgents (array\[object], optional): Agent access settings with \`agentId\` and \`accessType\`.\
> \- accessUserFilters (array\[object], optional): User access filters with \`variableName\` and \`value\`.\
> \- viewAccessToAgent (boolean, optional): Whether other agents can view. Defaults to \*\*false\*\*.\
> \- viewAccessToUser (boolean, optional): Whether other users can view. Defaults to \*\*false\*\*.\
> \- properties (array\[object], optional): Custom properties with \`key\` and \`value\`.\
> \- notificationHooks (array\[string], optional): Notification hooks to trigger on ingestion events.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodeResponse":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}],"description":"Knowledge base node","title":"Result"}},"required":["result"],"title":"KnowledgeBaseNodeResponse","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"},"UploadFromAzureBlobRequest":{"description":"Request model for uploading files from Azure Blob Storage.","properties":{"fileName":{"description":"The file name of the knowledge base","title":"Filename","type":"string"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The hashtags of the knowledge base","title":"Hashtags"},"targetFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The target folder ID of the knowledge base","title":"Targetfolderid"},"isOverwriteFolderAccess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The overwrite folder access flag of the knowledge base","title":"Isoverwritefolderaccess"},"isOverwrite":{"default":false,"description":"If true and a document with the same file name already exists in the target folder, overwrite it with the uploaded file instead of creating a suffixed copy. Identical files (same name, size, and content) are always skipped regardless of this flag. Not applied to ZIP uploads: each extracted entry is always created fresh under a new folder.","title":"Isoverwrite","type":"boolean"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroup"},"type":"array"},{"type":"null"}],"description":"The access permission groups of the knowledge base","title":"Accesspermissiongroups"},"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"description":"The access agents of the knowledge base","title":"Accessagents"},"accessUserFilters":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessUserFilter"},"type":"array"},{"type":"null"}],"description":"The access user filters of the knowledge base","title":"Accessuserfilters"},"viewAccessToAgent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The view access to agent flag of the knowledge base","title":"Viewaccesstoagent"},"viewAccessToUser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"The view access to user flag of the knowledge base","title":"Viewaccesstouser"},"useLayout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Whether to use layout processing for improved document ingestion. Only used if project allows this feature.","title":"Uselayout"},"useImageDescription":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Whether to use image description for improved document ingestion. Only used if project allows this feature.","title":"Useimagedescription"},"useOcr":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Whether to use OCR for document processing","title":"Useocr"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"description":"Properties for the knowledge base","title":"Properties"},"notificationHooks":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseNotificationHookEnum"},"type":"array"},{"type":"null"}],"description":"List of notification hooks to trigger on document ingestion events","title":"Notificationhooks"},"containerBlobPath":{"description":"The container blob path of the file","title":"Containerblobpath","type":"string"},"azureConnectionString":{"description":"Your Azure Blob Storage connection string.","title":"Azureconnectionstring","type":"string"}},"required":["fileName","containerBlobPath"],"title":"UploadFromAzureBlobRequest","type":"object"},"AccessPermissionGroup":{"properties":{"permissionGroupId":{"description":"The permission group ID of the access permission group","title":"Permissiongroupid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access permission group"}},"required":["permissionGroupId","accessType"],"title":"AccessPermissionGroup","type":"object"},"AccessUserFilter":{"properties":{"variableName":{"$ref":"#/components/schemas/AccessUserFilterEnum","description":"The variable name of the access user filter"},"value":{"description":"The value of the access user filter","title":"Value","type":"string"}},"required":["variableName","value"],"title":"AccessUserFilter","type":"object"},"AccessUserFilterEnum":{"description":"If variables other than system variables are added, it need to be redesigned.","enum":["CUSTOMER_ID","CUSTOMER_GROUP"],"title":"AccessUserFilterEnum","type":"string"},"KnowledgeBaseNotificationHookEnum":{"description":"Notification hooks that can be triggered on document ingestion events.","enum":["email_on_ingestion_complete"],"title":"KnowledgeBaseNotificationHookEnum","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/upload_from_azure_blob":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_upload_from_azure_blob","summary":"Upload Document from Azure Blob","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodeResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to upload documents from Azure Blob Storage to the knowledge base.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- containerBlobPath (string, required): The Azure container blob path of the file.\n- azureConnectionString (string, required): Your Azure Blob Storage connection string.\n- fileName (string, required): The file name.\n- hashtags (array[string], optional): Hashtags for the document.\n- targetFolderId (string, optional): Target folder ID.\n- useLayout (boolean, optional): Whether to use layout processing. Defaults to **true**.\n- useImageDescription (boolean, optional): Whether to use image description. Defaults to **true**.\n- useOcr (boolean, optional): Whether to use OCR. Defaults to **false**.\n- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access. Defaults to **false**.\n- accessPermissionGroups (array[object], optional): Permission group access settings.\n- accessAgents (array[object], optional): Agent access settings with `agentId` and `accessType`.\n- accessUserFilters (array[object], optional): User access filters with `variableName` and `value`.\n- viewAccessToAgent (boolean, optional): Whether other agents can view. Defaults to **false**.\n- viewAccessToUser (boolean, optional): Whether other users can view. Defaults to **false**.\n- properties (array[object], optional): Custom properties with `key` and `value`.\n- notificationHooks (array[string], optional): Notification hooks to trigger on ingestion events.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFromAzureBlobRequest"}}},"required":true}}}}}
```

## Search Knowledge Base Nodes

> This API allows you to search and list knowledge base documents and folders with filtering, ordering, and cursor-based pagination.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- filter (object, optional): Filter criteria for searching nodes.\
> \- order (string, optional): Sort order. Defaults to \*\*UPDATED\_AT\_DESC\*\*.\
> \- limit (integer, optional): Maximum number of results. Defaults to \*\*10\*\*.\
> \- after (string, optional): Cursor for pagination.\
> \- offset (integer, optional): Offset for pagination.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodesResponse":{"properties":{"result":{"$ref":"#/components/schemas/KnowledgeBaseNodes","description":"Knowledge base nodes"}},"required":["result"],"title":"KnowledgeBaseNodesResponse","type":"object"},"KnowledgeBaseNodes":{"properties":{"nodes":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}]},"type":"array"},{"type":"null"}],"description":"knowledge base nodes","title":"Nodes"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base nodes cursor","title":"Cursor"},"totalFileCount":{"description":"total number of files","title":"Totalfilecount","type":"integer"},"totalFolderCount":{"description":"total number of folders","title":"Totalfoldercount","type":"integer"}},"required":["totalFileCount","totalFolderCount"],"title":"KnowledgeBaseNodes","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"},"KnowledgeBaseNodesRequest":{"properties":{"filter_":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFilter"},{"type":"null"}],"description":"The filter of the knowledge base node"},"filter":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFilter"},{"type":"null"}],"description":"The filter of the knowledge base node"},"order":{"allOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeOrder"}],"default":"updated_at_desc","description":"The order of the knowledge base node"},"limit":{"default":10,"description":"The limit of the knowledge base node","title":"Limit","type":"integer"},"after":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The after of the knowledge base node","title":"After"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The offset of the knowledge base node","title":"Offset"}},"title":"KnowledgeBaseNodesRequest","type":"object"},"KnowledgeBaseNodeFilter":{"properties":{"parentFolderIds":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Parentfolderids"},"searchTerm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Searchterm"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hashtags"},"hashtagsSearchOperator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hashtagssearchoperator"},"combinedHashtags":{"anyOf":[{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Combinedhashtags"},"combinedHashtagsOperator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Combinedhashtagsoperator"},"excludingHashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Excludinghashtags"},"excludingHashtagsSearchOperator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excludinghashtagssearchoperator"},"processState":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProcessStateEnum"},"type":"array"},{"type":"null"}],"title":"Processstate"},"status":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseNodeOnOffState"},"type":"array"},{"type":"null"}],"title":"Status"},"nodeType":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseNodeType"},"type":"array"},{"type":"null"}],"title":"Nodetype"},"knowledgeBaseIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Knowledgebaseids"},"folderIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Folderids"},"ownership":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseNodeOwnership"},"type":"array"},{"type":"null"}],"title":"Ownership"},"ancestorIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ancestorids"},"hasFaqCandidates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hasfaqcandidates"},"sourceTypes":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocSourceEnum"},"type":"array"},{"type":"null"}],"title":"Sourcetypes"},"facetConditions":{"anyOf":[{"items":{"$ref":"#/components/schemas/FacetCondition"},"type":"array"},{"type":"null"}],"title":"Facetconditions"},"latestVersionOnly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Latestversiononly"}},"title":"KnowledgeBaseNodeFilter","type":"object"},"ProcessStateEnum":{"enum":["initializing","parsing","parsing_fail","completed","retrying","post_parsing","post_parsing_fail","post_completed","post_retrying"],"title":"ProcessStateEnum","type":"string"},"KnowledgeBaseNodeOnOffState":{"enum":["on","off"],"title":"KnowledgeBaseNodeOnOffState","type":"string"},"KnowledgeBaseNodeType":{"enum":["file","folder"],"title":"KnowledgeBaseNodeType","type":"string"},"KnowledgeBaseNodeOwnership":{"enum":["personal","shared"],"title":"KnowledgeBaseNodeOwnership","type":"string"},"DocSourceEnum":{"enum":["onedrive","html","google-drive","confluence","sharepoint","notion","github","alli","data_integration_service","box","box_v2","google_drive_v2"],"title":"DocSourceEnum","type":"string"},"FacetCondition":{"description":"A single facet comparison the document corpus is narrowed by.\n\n`value` is the resolved comparison operand whose runtime type follows the facet's\nown value type (single string, number, or multi-select set). `None` carries the\n\"no operand\" case used by the EXISTS / NOT_EXISTS comparators.","properties":{"attribute":{"title":"Attribute","type":"string"},"comparator":{"$ref":"#/components/schemas/FacetComparator"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Value"}},"required":["attribute","comparator"],"title":"FacetCondition","type":"object"},"FacetComparator":{"description":"Comparison operators for a facet filter condition.\n\nMirrors Knowledge Refinery's `FacetComparator` wire values — the `.value`\nstring is sent verbatim to the KR document-id collection endpoint.","enum":["eq","ne","gt","gte","lt","lte","in","nin","contain","like","exists","not_exists"],"title":"FacetComparator","type":"string"},"KnowledgeBaseNodeOrder":{"enum":["name_asc","name_desc","updated_at_asc","updated_at_desc","created_at_asc","created_at_desc","file_and_name_asc","file_and_name_desc","folder_and_name_asc","folder_and_name_desc"],"title":"KnowledgeBaseNodeOrder","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/search":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_knowledge_base_nodes","summary":"Search Knowledge Base Nodes","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodesResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to search and list knowledge base documents and folders with filtering, ordering, and cursor-based pagination.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- filter (object, optional): Filter criteria for searching nodes.\n- order (string, optional): Sort order. Defaults to **UPDATED_AT_DESC**.\n- limit (integer, optional): Maximum number of results. Defaults to **10**.\n- after (string, optional): Cursor for pagination.\n- offset (integer, optional): Offset for pagination.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodesRequest"}],"default":{"filter_":null,"filter":null,"order":"updated_at_desc","limit":10,"after":null,"offset":null}}}},"required":false}}}}}
```

## Content Search

> This API allows you to perform full-text search across knowledge base document contents with cursor-based pagination.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- searchTerm (string, required): The text to search for.\
> \- limit (integer, optional): Maximum number of results. Defaults to \*\*10\*\*.\
> \- after (string, optional): Cursor for pagination.\
> \- folderIds (array\[string], optional): Folder IDs to search within.\
> \- searchScope (string, optional): Search scope. Must be \`both\`, \`title\`, or \`content\`. Defaults to \*\*both\*\*.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodesResponse":{"properties":{"result":{"$ref":"#/components/schemas/KnowledgeBaseNodes","description":"Knowledge base nodes"}},"required":["result"],"title":"KnowledgeBaseNodesResponse","type":"object"},"KnowledgeBaseNodes":{"properties":{"nodes":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}]},"type":"array"},{"type":"null"}],"description":"knowledge base nodes","title":"Nodes"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base nodes cursor","title":"Cursor"},"totalFileCount":{"description":"total number of files","title":"Totalfilecount","type":"integer"},"totalFolderCount":{"description":"total number of folders","title":"Totalfoldercount","type":"integer"}},"required":["totalFileCount","totalFolderCount"],"title":"KnowledgeBaseNodes","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"},"ContentSearchRequest":{"properties":{"searchTerm":{"description":"The search term of the knowledge base node","title":"Searchterm","type":"string"},"limit":{"default":10,"description":"The limit of the knowledge base node","exclusiveMinimum":0,"maximum":10000,"title":"Limit","type":"integer"},"after":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The after of the knowledge base node","title":"After"},"folderIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The folder IDs of the knowledge base node","title":"Folderids"},"searchScope":{"allOf":[{"$ref":"#/components/schemas/SearchScopeEnum"}],"default":"both","description":"The search scope of the knowledge base node"}},"required":["searchTerm"],"title":"ContentSearchRequest","type":"object"},"SearchScopeEnum":{"enum":["title_only","content_only","both"],"title":"SearchScopeEnum","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/content_search":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_content_search","summary":"Content Search","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodesResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to perform full-text search across knowledge base document contents with cursor-based pagination.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- searchTerm (string, required): The text to search for.\n- limit (integer, optional): Maximum number of results. Defaults to **10**.\n- after (string, optional): Cursor for pagination.\n- folderIds (array[string], optional): Folder IDs to search within.\n- searchScope (string, optional): Search scope. Must be `both`, `title`, or `content`. Defaults to **both**.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentSearchRequest"}}},"required":true}}}}}
```

## Page Content Search

> This API allows you to search within document pages and return matching text with page numbers.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- searchTerms (array\[string], required): The terms to search for.\
> \- folderIds (array\[string], optional): Folder IDs to search within.\
> \- knowledgeBaseIds (array\[string], optional): Knowledge base IDs to search within.\
> \- hashtags (array\[string], optional): Hashtags to filter by.\
> \- hashtagsOperator (string, optional): Operator for hashtag filter. Defaults to \*\*OR\*\*.\
> \- excludeHashtags (array\[string], optional): Hashtags to exclude from results.\
> \- excludeHashtagsOperator (string, optional): Operator for exclude hashtag filter. Defaults to \*\*OR\*\*.\
> \- topN (integer, optional): Number of top results per document. Defaults to \*\*1\*\*.\
> \- mergeSamePage (boolean, optional): Whether to merge content from the same page. Defaults to \*\*false\*\*.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"PageContentSearchResponse":{"description":"Response model for page content search containing list of page content items with metadata.","properties":{"results":{"description":"List of page content items with metadata","items":{"$ref":"#/components/schemas/PageContentItem"},"title":"Results","type":"array"}},"required":["results"],"title":"PageContentSearchResponse","type":"object"},"PageContentItem":{"description":"Individual page content item with metadata.","properties":{"kbId":{"description":"Knowledge base ID","title":"Kbid","type":"string"},"title":{"description":"Document title","title":"Title","type":"string"},"text":{"description":"Page text content","title":"Text","type":"string"},"pageNo":{"description":"Page number","title":"Pageno","type":"integer"}},"required":["kbId","title","text","pageNo"],"title":"PageContentItem","type":"object"},"PageContentSearchRequest":{"properties":{"searchTerms":{"description":"The search terms for page content search","items":{"type":"string"},"title":"Searchterms","type":"array"},"folderIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The folder IDs to search within","title":"Folderids"},"knowledgeBaseIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The knowledge base IDs to search within","title":"Knowledgebaseids"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The hashtags to filter by","title":"Hashtags"},"hashtagsOperator":{"default":"OR","description":"The hashtags operator (AND/OR)","title":"Hashtagsoperator","type":"string"},"excludeHashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The hashtags to exclude","title":"Excludehashtags"},"excludeHashtagsOperator":{"default":"OR","description":"The exclude hashtags operator (AND/OR)","title":"Excludehashtagsoperator","type":"string"},"topN":{"default":1,"description":"The number of top results to return","exclusiveMinimum":0,"maximum":100,"title":"Topn","type":"integer"},"mergeSamePage":{"default":false,"description":"Whether to merge content from the same page","title":"Mergesamepage","type":"boolean"}},"required":["searchTerms"],"title":"PageContentSearchRequest","type":"object"}}},"paths":{"/webapi/v2/knowledge_base_nodes/page_content_search":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_page_content_search","summary":"Page Content Search","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageContentSearchResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to search within document pages and return matching text with page numbers.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- searchTerms (array[string], required): The terms to search for.\n- folderIds (array[string], optional): Folder IDs to search within.\n- knowledgeBaseIds (array[string], optional): Knowledge base IDs to search within.\n- hashtags (array[string], optional): Hashtags to filter by.\n- hashtagsOperator (string, optional): Operator for hashtag filter. Defaults to **OR**.\n- excludeHashtags (array[string], optional): Hashtags to exclude from results.\n- excludeHashtagsOperator (string, optional): Operator for exclude hashtag filter. Defaults to **OR**.\n- topN (integer, optional): Number of top results per document. Defaults to **1**.\n- mergeSamePage (boolean, optional): Whether to merge content from the same page. Defaults to **false**.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageContentSearchRequest"}}},"required":true}}}}}
```

## Get Knowledge Base Node

> This API allows you to retrieve a single knowledge base document or folder by its global ID.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodeResponse":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}],"description":"Knowledge base node","title":"Result"}},"required":["result"],"title":"KnowledgeBaseNodeResponse","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/{node_id}":{"get":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_knowledge_base_node","summary":"Get Knowledge Base Node","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"node_id","schema":{"title":"Node Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodeResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to retrieve a single knowledge base document or folder by its global ID.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.","tags":["KnowledgeBase"]}}}}
```

## Update Knowledge Base Node

> This API allows you to update a knowledge base document or folder. Supports title, hashtags, access control, and custom properties.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- title (string, optional): New title for the node.\
> \- hashtags (array\[string], optional): Hashtags for the node.\
> \- properties (array\[object], optional): Custom key-value properties with \`key\` and \`value\`.\
> \- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access settings.\
> \- accessPermissionGroups (array\[object], optional): Permission group access settings with \`permissionGroupId\` and \`accessType\`.\
> \- accessAgents (array\[object], optional): Agent access settings with \`agentId\` and \`accessType\`.\
> \- accessUserFilters (array\[object], optional): User access filters with \`variableName\` and \`value\`.\
> \- viewAccessToAgent (boolean, optional): Whether other agents can view.\
> \- viewAccessToUser (boolean, optional): Whether other users can view.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodeResponse":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}],"description":"Knowledge base node","title":"Result"}},"required":["result"],"title":"KnowledgeBaseNodeResponse","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"},"UpdateKnowledgeBaseNodeRequest":{"additionalProperties":false,"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title of the knowledge base node","title":"Title"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"The hashtags of the knowledge base node","title":"Hashtags"},"isOverwriteFolderAccess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The overwrite folder access flag of the knowledge base node","title":"Isoverwritefolderaccess"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroup"},"type":"array"},{"type":"null"}],"description":"The access permission groups of the knowledge base node","title":"Accesspermissiongroups"},"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"description":"The access agents of the knowledge base node","title":"Accessagents"},"accessUserFilters":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessUserFilter"},"type":"array"},{"type":"null"}],"description":"The access user filters of the knowledge base node","title":"Accessuserfilters"},"viewAccessToAgent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The view access to agent flag of the knowledge base node","title":"Viewaccesstoagent"},"viewAccessToUser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The view access to user flag of the knowledge base node","title":"Viewaccesstouser"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"description":"Properties for the knowledge base node","title":"Properties"}},"title":"UpdateKnowledgeBaseNodeRequest","type":"object"},"AccessPermissionGroup":{"properties":{"permissionGroupId":{"description":"The permission group ID of the access permission group","title":"Permissiongroupid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access permission group"}},"required":["permissionGroupId","accessType"],"title":"AccessPermissionGroup","type":"object"},"AccessUserFilter":{"properties":{"variableName":{"$ref":"#/components/schemas/AccessUserFilterEnum","description":"The variable name of the access user filter"},"value":{"description":"The value of the access user filter","title":"Value","type":"string"}},"required":["variableName","value"],"title":"AccessUserFilter","type":"object"},"AccessUserFilterEnum":{"description":"If variables other than system variables are added, it need to be redesigned.","enum":["CUSTOMER_ID","CUSTOMER_GROUP"],"title":"AccessUserFilterEnum","type":"string"}}},"paths":{"/webapi/v2/knowledge_base_nodes/{node_id}":{"put":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_update_knowledge_base_node","summary":"Update Knowledge Base Node","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"node_id","schema":{"title":"Node Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodeResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to update a knowledge base document or folder. Supports title, hashtags, access control, and custom properties.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- title (string, optional): New title for the node.\n- hashtags (array[string], optional): Hashtags for the node.\n- properties (array[object], optional): Custom key-value properties with `key` and `value`.\n- isOverwriteFolderAccess (boolean, optional): Whether to overwrite folder access settings.\n- accessPermissionGroups (array[object], optional): Permission group access settings with `permissionGroupId` and `accessType`.\n- accessAgents (array[object], optional): Agent access settings with `agentId` and `accessType`.\n- accessUserFilters (array[object], optional): User access filters with `variableName` and `value`.\n- viewAccessToAgent (boolean, optional): Whether other agents can view.\n- viewAccessToUser (boolean, optional): Whether other users can view.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKnowledgeBaseNodeRequest"}}},"required":true}}}}}
```

## Delete Knowledge Base Node

> This API allows you to delete a knowledge base document or folder by its global ID.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/knowledge_base_nodes/{node_id}":{"delete":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_delete_knowledge_base_nodes","summary":"Delete Knowledge Base Node","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"node_id","schema":{"title":"Node Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to delete a knowledge base document or folder by its global ID.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.","tags":["KnowledgeBase"]}}}}
```

## Preview Knowledge Base Node

> This API allows you to get a preview of a knowledge base node with HTML and PDF information.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Query Parameters\
> \
> \- page\_no (integer, optional): The page number to preview.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBasePreviewResponse":{"description":"Response model for knowledge base preview containing HTML and PDF information.","properties":{"html":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML preview of the knowledge base","title":"Html"},"pdfUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PDF preview of the knowledge base","title":"Pdfurl"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Image preview of the knowledge base","title":"Imageurl"},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Preview URL of the knowledge base","title":"Previewurl"},"totalPreviewCount":{"default":0,"description":"Total preview count of the knowledge base","title":"Totalpreviewcount","type":"integer"},"piiMasked":{"default":false,"description":"Whether the preview is hidden due to PII masking","title":"Piimasked","type":"boolean"}},"title":"KnowledgeBasePreviewResponse","type":"object"}}},"paths":{"/webapi/v2/knowledge_base_nodes/{node_id}/preview":{"get":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_knowledge_base_node_preview","summary":"Preview Knowledge Base Node","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"node_id","schema":{"title":"Node Id","type":"string"},"required":true},{"in":"query","name":"page_no","schema":{"default":1,"title":"Page No","type":"integer"},"required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBasePreviewResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to get a preview of a knowledge base node with HTML and PDF information.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Query Parameters\n\n- page_no (integer, optional): The page number to preview.","tags":["KnowledgeBase"]}}}}
```

## Get Knowledge Base Node Text

> This API allows you to get text content of a knowledge base node from parsed pages.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Query Parameters\
> \
> \- limit (integer, optional): Maximum number of pages to return.\
> \- offset (integer, optional): Number of pages to skip.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/knowledge_base_nodes/{node_id}/text":{"get":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_knowledge_base_node_text","summary":"Get Knowledge Base Node Text","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"node_id","schema":{"title":"Node Id","type":"string"},"required":true},{"in":"query","name":"limit","schema":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"title":"Limit"},"required":false},{"in":"query","name":"offset","schema":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"title":"Offset"},"required":false}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to get text content of a knowledge base node from parsed pages.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Query Parameters\n\n- limit (integer, optional): Maximum number of pages to return.\n- offset (integer, optional): Number of pages to skip.","tags":["KnowledgeBase"]}}}}
```

## Download Knowledge Base Node

> This API allows you to download the original file of a knowledge base node.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/knowledge_base_nodes/{node_id}/download":{"get":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_node_api_knowledge_base_node_download","summary":"Download Knowledge Base Node","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"node_id","schema":{"title":"Node Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to download the original file of a knowledge base node.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.","tags":["KnowledgeBase"]}}}}
```

## Create Folder

> This API allows you to create a new folder with optional parent folder, access control, and permission settings.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- name (string, required): The name of the folder. Maximum 50 characters.\
> \- parentFolderId (string, optional): The ID of the parent folder. Null to create at root level.\
> \- permissionGroupEditors (array\[string], optional): Permission group IDs to grant editor access.\
> \- permissionGroupViewers (array\[string], optional): Permission group IDs to grant viewer access.\
> \- agentEditors (array\[string], optional): Agent IDs to grant editor access.\
> \- agentViewers (array\[string], optional): Agent IDs to grant viewer access.\
> \- userViewers (object, optional): User access filters with \`customerIds\` and \`customerGroupIds\` arrays.\
> \- allowOtherAgentsView (boolean, optional): Whether other agents can view. Defaults to \*\*true\*\*.\
> \- allowOtherUsersView (boolean, optional): Whether other users can view. Defaults to \*\*true\*\*.\
> \- followParentFolderPermission (boolean, optional): Whether to inherit parent folder permissions. Defaults to \*\*false\*\*.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"},"CreateFolderRequest":{"properties":{"name":{"maxLength":50,"title":"Name","type":"string"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"followParentFolderPermission":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Followparentfolderpermission"},"permissionGroupEditors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissiongroupeditors"},"permissionGroupViewers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissiongroupviewers"},"agentEditors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agenteditors"},"agentViewers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentviewers"},"userViewers":{"anyOf":[{"$ref":"#/components/schemas/UserAccessPermissionRequest"},{"type":"null"}]},"allowOtherAgentsView":{"default":true,"title":"Allowotheragentsview","type":"boolean"},"allowOtherUsersView":{"default":true,"title":"Allowotherusersview","type":"boolean"}},"required":["name"],"title":"CreateFolderRequest","type":"object"},"UserAccessPermissionRequest":{"properties":{"customerIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customerids"},"customerGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroupids"}},"title":"UserAccessPermissionRequest","type":"object"}}},"paths":{"/webapi/v2/folders":{"post":{"operationId":"django_server_knowledge_base_views_rest_folder_api_create_folder","summary":"Create Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to create a new folder with optional parent folder, access control, and permission settings.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- name (string, required): The name of the folder. Maximum 50 characters.\n- parentFolderId (string, optional): The ID of the parent folder. Null to create at root level.\n- permissionGroupEditors (array[string], optional): Permission group IDs to grant editor access.\n- permissionGroupViewers (array[string], optional): Permission group IDs to grant viewer access.\n- agentEditors (array[string], optional): Agent IDs to grant editor access.\n- agentViewers (array[string], optional): Agent IDs to grant viewer access.\n- userViewers (object, optional): User access filters with `customerIds` and `customerGroupIds` arrays.\n- allowOtherAgentsView (boolean, optional): Whether other agents can view. Defaults to **true**.\n- allowOtherUsersView (boolean, optional): Whether other users can view. Defaults to **true**.\n- followParentFolderPermission (boolean, optional): Whether to inherit parent folder permissions. Defaults to **false**.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolderRequest"}}},"required":true}}}}}
```

## Get Folder

> This API allows you to retrieve a single folder by ID with folder size information.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"}}},"paths":{"/webapi/v2/folders/{folder_id}":{"get":{"operationId":"django_server_knowledge_base_views_rest_folder_api_get_folder","summary":"Get Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to retrieve a single folder by ID with folder size information.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.","tags":["KnowledgeBase"]}}}}
```

## Update Folder

> This API allows you to update a folder's name, access control, and permission settings.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- name (string, required): The new name for the folder. Maximum 50 characters.\
> \- permissionGroupEditors (array\[string], optional): Permission group IDs to grant editor access.\
> \- permissionGroupViewers (array\[string], optional): Permission group IDs to grant viewer access.\
> \- agentEditors (array\[string], optional): Agent IDs to grant editor access.\
> \- agentViewers (array\[string], optional): Agent IDs to grant viewer access.\
> \- userViewers (object, optional): User access filters with \`customerIds\` and \`customerGroupIds\` arrays.\
> \- allowOtherAgentsView (boolean, optional): Whether other agents can view.\
> \- allowOtherUsersView (boolean, optional): Whether other users can view.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"},"UpdateFolderRequest":{"properties":{"name":{"maxLength":50,"title":"Name","type":"string"},"permissionGroupEditors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissiongroupeditors"},"permissionGroupViewers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissiongroupviewers"},"agentEditors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agenteditors"},"agentViewers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentviewers"},"userViewers":{"anyOf":[{"$ref":"#/components/schemas/UserAccessPermissionRequest"},{"type":"null"}]},"allowOtherAgentsView":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowotheragentsview"},"allowOtherUsersView":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowotherusersview"}},"required":["name"],"title":"UpdateFolderRequest","type":"object"},"UserAccessPermissionRequest":{"properties":{"customerIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customerids"},"customerGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroupids"}},"title":"UserAccessPermissionRequest","type":"object"}}},"paths":{"/webapi/v2/folders/{folder_id}":{"put":{"operationId":"django_server_knowledge_base_views_rest_folder_api_update_folder","summary":"Update Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to update a folder's name, access control, and permission settings.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- name (string, required): The new name for the folder. Maximum 50 characters.\n- permissionGroupEditors (array[string], optional): Permission group IDs to grant editor access.\n- permissionGroupViewers (array[string], optional): Permission group IDs to grant viewer access.\n- agentEditors (array[string], optional): Agent IDs to grant editor access.\n- agentViewers (array[string], optional): Agent IDs to grant viewer access.\n- userViewers (object, optional): User access filters with `customerIds` and `customerGroupIds` arrays.\n- allowOtherAgentsView (boolean, optional): Whether other agents can view.\n- allowOtherUsersView (boolean, optional): Whether other users can view.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFolderRequest"}}},"required":true}}}}}
```

## Delete Folder

> This API allows you to delete a folder. Optionally move contained documents to the root folder instead of deleting them.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Query Parameters\
> \
> \- move\_docs\_out\_of\_folder (boolean, optional): If true, moves documents to the root folder instead of deleting them. Defaults to \*\*false\*\*.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/folders/{folder_id}":{"delete":{"operationId":"django_server_knowledge_base_views_rest_folder_api_delete_folder","summary":"Delete Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true},{"in":"query","name":"move_docs_out_of_folder","schema":{"default":false,"title":"Move Docs Out Of Folder","type":"boolean"},"required":false}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to delete a folder. Optionally move contained documents to the root folder instead of deleting them.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Query Parameters\n\n- move_docs_out_of_folder (boolean, optional): If true, moves documents to the root folder instead of deleting them. Defaults to **false**.","tags":["KnowledgeBase"]}}}}
```

## Create Personal Folder

> This API allows you to create a folder in the requesting user's personal document box.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\
> &#x20; opened. \*\*Required on Works projects\*\*, where it is what names the box; omitting it there is\
> &#x20; rejected rather than resolved to the project owner.\
> \- USER-EMAIL (string): The email address to associate with the user. \*\*Required on Works projects\*\*,\
> &#x20; where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\
> \- OWN-USER-ID (string): The user ID to identify or create a user. \*\*Required on other project types\*\*,\
> &#x20; where it names the acting user. On Works it is accepted in place of USER-EMAIL.\
> \
> So a Works call sends \*\*AGENT-EMAIL and USER-EMAIL together\*\*, and any other project sends\
> \*\*OWN-USER-ID\*\*. Every endpoint acts on the resolved user's own document box; a request that\
> resolves no user is rejected — never redirected to the shared box, nor to the project owner's.\
> \
> \## Request Body\
> \
> \- name (string, required): The name of the folder. Maximum 50 characters. Must be unique among the\
> &#x20; caller's own folders under the same parent.\
> \- parentFolderId (string, optional): The parent folder ID. Null creates the folder at the personal\
> &#x20; document box root. When given, it must be one of the caller's own personal folders — a shared\
> &#x20; folder is rejected.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"},"CreatePersonalFolderRequest":{"properties":{"name":{"description":"The name of the folder. Maximum 50 characters.","maxLength":50,"title":"Name","type":"string"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The parent folder ID. Null creates the folder at the personal document box root.","title":"Parentfolderid"}},"required":["name"],"title":"CreatePersonalFolderRequest","type":"object"}}},"paths":{"/webapi/v2/personal_folders":{"post":{"operationId":"django_server_knowledge_base_views_rest_personal_folder_api_create_personal_folder","summary":"Create Personal Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to create a folder in the requesting user's personal document box.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\n  opened. **Required on Works projects**, where it is what names the box; omitting it there is\n  rejected rather than resolved to the project owner.\n- USER-EMAIL (string): The email address to associate with the user. **Required on Works projects**,\n  where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\n- OWN-USER-ID (string): The user ID to identify or create a user. **Required on other project types**,\n  where it names the acting user. On Works it is accepted in place of USER-EMAIL.\n\nSo a Works call sends **AGENT-EMAIL and USER-EMAIL together**, and any other project sends\n**OWN-USER-ID**. Every endpoint acts on the resolved user's own document box; a request that\nresolves no user is rejected — never redirected to the shared box, nor to the project owner's.\n\n## Request Body\n\n- name (string, required): The name of the folder. Maximum 50 characters. Must be unique among the\n  caller's own folders under the same parent.\n- parentFolderId (string, optional): The parent folder ID. Null creates the folder at the personal\n  document box root. When given, it must be one of the caller's own personal folders — a shared\n  folder is rejected.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonalFolderRequest"}}},"required":true}}}}}
```

## Rename Personal Folder

> This API allows you to rename a folder in the requesting user's personal document box.\
> \
> Only a folder the caller owns can be renamed; a shared folder or another user's personal folder is\
> rejected. Use the move API to relocate a folder — the parent cannot be changed here.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\
> &#x20; opened. \*\*Required on Works projects\*\*, where it is what names the box; omitting it there is\
> &#x20; rejected rather than resolved to the project owner.\
> \- USER-EMAIL (string): The email address to associate with the user. \*\*Required on Works projects\*\*,\
> &#x20; where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\
> \- OWN-USER-ID (string): The user ID to identify or create a user. \*\*Required on other project types\*\*,\
> &#x20; where it names the acting user. On Works it is accepted in place of USER-EMAIL.\
> \
> So a Works call sends \*\*AGENT-EMAIL and USER-EMAIL together\*\*, and any other project sends\
> \*\*OWN-USER-ID\*\*. Every endpoint acts on the resolved user's own document box; a request that\
> resolves no user is rejected — never redirected to the shared box, nor to the project owner's.\
> \
> \## Request Body\
> \
> \- name (string, required): The new name for the folder. Maximum 50 characters. Must be unique among\
> &#x20; the caller's own folders under the same parent.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"},"UpdatePersonalFolderRequest":{"properties":{"name":{"description":"The new name for the folder. Maximum 50 characters.","maxLength":50,"title":"Name","type":"string"}},"required":["name"],"title":"UpdatePersonalFolderRequest","type":"object"}}},"paths":{"/webapi/v2/personal_folders/{folder_id}":{"put":{"operationId":"django_server_knowledge_base_views_rest_personal_folder_api_update_personal_folder","summary":"Rename Personal Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to rename a folder in the requesting user's personal document box.\n\nOnly a folder the caller owns can be renamed; a shared folder or another user's personal folder is\nrejected. Use the move API to relocate a folder — the parent cannot be changed here.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\n  opened. **Required on Works projects**, where it is what names the box; omitting it there is\n  rejected rather than resolved to the project owner.\n- USER-EMAIL (string): The email address to associate with the user. **Required on Works projects**,\n  where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\n- OWN-USER-ID (string): The user ID to identify or create a user. **Required on other project types**,\n  where it names the acting user. On Works it is accepted in place of USER-EMAIL.\n\nSo a Works call sends **AGENT-EMAIL and USER-EMAIL together**, and any other project sends\n**OWN-USER-ID**. Every endpoint acts on the resolved user's own document box; a request that\nresolves no user is rejected — never redirected to the shared box, nor to the project owner's.\n\n## Request Body\n\n- name (string, required): The new name for the folder. Maximum 50 characters. Must be unique among\n  the caller's own folders under the same parent.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonalFolderRequest"}}},"required":true}}}}}
```

## Delete Personal Folder

> This API allows you to delete a folder in the requesting user's personal document box.\
> \
> The folder and everything below it — subfolders and documents — are deleted. Only a folder the\
> caller owns can be deleted; a shared folder or another user's personal folder is rejected.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\
> &#x20; opened. \*\*Required on Works projects\*\*, where it is what names the box; omitting it there is\
> &#x20; rejected rather than resolved to the project owner.\
> \- USER-EMAIL (string): The email address to associate with the user. \*\*Required on Works projects\*\*,\
> &#x20; where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\
> \- OWN-USER-ID (string): The user ID to identify or create a user. \*\*Required on other project types\*\*,\
> &#x20; where it names the acting user. On Works it is accepted in place of USER-EMAIL.\
> \
> So a Works call sends \*\*AGENT-EMAIL and USER-EMAIL together\*\*, and any other project sends\
> \*\*OWN-USER-ID\*\*. Every endpoint acts on the resolved user's own document box; a request that\
> resolves no user is rejected — never redirected to the shared box, nor to the project owner's.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/personal_folders/{folder_id}":{"delete":{"operationId":"django_server_knowledge_base_views_rest_personal_folder_api_delete_personal_folder","summary":"Delete Personal Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to delete a folder in the requesting user's personal document box.\n\nThe folder and everything below it — subfolders and documents — are deleted. Only a folder the\ncaller owns can be deleted; a shared folder or another user's personal folder is rejected.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\n  opened. **Required on Works projects**, where it is what names the box; omitting it there is\n  rejected rather than resolved to the project owner.\n- USER-EMAIL (string): The email address to associate with the user. **Required on Works projects**,\n  where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\n- OWN-USER-ID (string): The user ID to identify or create a user. **Required on other project types**,\n  where it names the acting user. On Works it is accepted in place of USER-EMAIL.\n\nSo a Works call sends **AGENT-EMAIL and USER-EMAIL together**, and any other project sends\n**OWN-USER-ID**. Every endpoint acts on the resolved user's own document box; a request that\nresolves no user is rejected — never redirected to the shared box, nor to the project owner's.\n","tags":["KnowledgeBase"]}}}}
```

## Move Personal Folder

> This API allows you to move a folder within the requesting user's personal document box.\
> \
> Both the folder being moved and the destination must belong to the caller: a personal folder cannot\
> be moved into the shared document box, and a shared folder cannot be moved into the personal one.\
> A folder cannot be moved into itself or one of its own descendants. If the destination already holds\
> a folder with the same name, the moved folder is renamed with a numeric suffix.\
> \
> The move answers 409 when the folder already sits in the destination, matching the personal document\
> move rather than reporting success for a move that did not happen.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\
> &#x20; opened. \*\*Required on Works projects\*\*, where it is what names the box; omitting it there is\
> &#x20; rejected rather than resolved to the project owner.\
> \- USER-EMAIL (string): The email address to associate with the user. \*\*Required on Works projects\*\*,\
> &#x20; where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\
> \- OWN-USER-ID (string): The user ID to identify or create a user. \*\*Required on other project types\*\*,\
> &#x20; where it names the acting user. On Works it is accepted in place of USER-EMAIL.\
> \
> So a Works call sends \*\*AGENT-EMAIL and USER-EMAIL together\*\*, and any other project sends\
> \*\*OWN-USER-ID\*\*. Every endpoint acts on the resolved user's own document box; a request that\
> resolves no user is rejected — never redirected to the shared box, nor to the project owner's.\
> \
> \## Request Body\
> \
> \- parentFolderId (string, optional): The destination folder ID. Null moves the folder to the personal\
> &#x20; document box root.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"},"MovePersonalFolderRequest":{"properties":{"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The destination folder ID. Null moves the folder to the personal document box root.","title":"Parentfolderid"}},"title":"MovePersonalFolderRequest","type":"object"}}},"paths":{"/webapi/v2/personal_folders/{folder_id}/move":{"post":{"operationId":"django_server_knowledge_base_views_rest_personal_folder_api_move_personal_folder","summary":"Move Personal Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to move a folder within the requesting user's personal document box.\n\nBoth the folder being moved and the destination must belong to the caller: a personal folder cannot\nbe moved into the shared document box, and a shared folder cannot be moved into the personal one.\nA folder cannot be moved into itself or one of its own descendants. If the destination already holds\na folder with the same name, the moved folder is renamed with a numeric suffix.\n\nThe move answers 409 when the folder already sits in the destination, matching the personal document\nmove rather than reporting success for a move that did not happen.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\n  opened. **Required on Works projects**, where it is what names the box; omitting it there is\n  rejected rather than resolved to the project owner.\n- USER-EMAIL (string): The email address to associate with the user. **Required on Works projects**,\n  where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\n- OWN-USER-ID (string): The user ID to identify or create a user. **Required on other project types**,\n  where it names the acting user. On Works it is accepted in place of USER-EMAIL.\n\nSo a Works call sends **AGENT-EMAIL and USER-EMAIL together**, and any other project sends\n**OWN-USER-ID**. Every endpoint acts on the resolved user's own document box; a request that\nresolves no user is rejected — never redirected to the shared box, nor to the project owner's.\n\n## Request Body\n\n- parentFolderId (string, optional): The destination folder ID. Null moves the folder to the personal\n  document box root.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovePersonalFolderRequest"}}},"required":true}}}}}
```

## Move Personal Document

> This API allows you to move a document within the requesting user's personal document box.\
> \
> Both the document being moved and the destination must belong to the caller: a personal document\
> cannot be moved into the shared document box, and a shared document cannot be moved into the\
> personal one. If the destination already holds a document with the same name but different content,\
> the moved document is renamed with a numeric suffix.\
> \
> The move answers 409 when the destination cannot take the document: it already sits there, or the\
> destination already holds an identical copy of it. At the personal document box root that\
> identical-copy check spans the whole project rather than the caller's own box.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\
> &#x20; opened. \*\*Required on Works projects\*\*, where it is what names the box; omitting it there is\
> &#x20; rejected rather than resolved to the project owner.\
> \- USER-EMAIL (string): The email address to associate with the user. \*\*Required on Works projects\*\*,\
> &#x20; where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\
> \- OWN-USER-ID (string): The user ID to identify or create a user. \*\*Required on other project types\*\*,\
> &#x20; where it names the acting user. On Works it is accepted in place of USER-EMAIL.\
> \
> So a Works call sends \*\*AGENT-EMAIL and USER-EMAIL together\*\*, and any other project sends\
> \*\*OWN-USER-ID\*\*. Every endpoint acts on the resolved user's own document box; a request that\
> resolves no user is rejected — never redirected to the shared box, nor to the project owner's.\
> \
> \## Request Body\
> \
> \- parentFolderId (string, optional): The destination folder ID. Null moves the document to the\
> &#x20; personal document box root.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseNodeResponse":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseNodeFolder"},{"$ref":"#/components/schemas/KnowledgeBaseNodeFile"}],"description":"Knowledge base node","title":"Result"}},"required":["result"],"title":"KnowledgeBaseNodeResponse","type":"object"},"KnowledgeBaseNodeFolder":{"properties":{"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base folder external source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission"],"title":"KnowledgeBaseNodeFolder","type":"object"},"CreatedByAgent":{"properties":{"id":{"description":"agent id","title":"Id","type":"string"},"email":{"description":"agent email","title":"Email","type":"string"},"firstName":{"description":"agent first name","title":"Firstname","type":"string"},"lastName":{"description":"agent last name","title":"Lastname","type":"string"}},"required":["id","email","firstName","lastName"],"title":"CreatedByAgent","type":"object"},"Folder":{"properties":{"id":{"description":"folder id","title":"Id","type":"string"},"name":{"description":"folder name","title":"Name","type":"string"}},"required":["id","name"],"title":"Folder","type":"object"},"AgentPermissionResponse":{"description":"Response model for agent permission.","properties":{"accessAgents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessAgent"},"type":"array"},{"type":"null"}],"title":"Accessagents"},"accessPermissionGroups":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccessPermissionGroupResponse"},"type":"array"},{"type":"null"}],"title":"Accesspermissiongroups"},"viewAccessToAgent":{"title":"Viewaccesstoagent","type":"boolean"}},"required":["viewAccessToAgent"],"title":"AgentPermissionResponse","type":"object"},"AccessAgent":{"properties":{"agentId":{"description":"The agent ID of the access agent","title":"Agentid","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type of the access agent"}},"required":["agentId","accessType"],"title":"AccessAgent","type":"object"},"ObjectAccessType":{"enum":["order_1_editor","order_2_reader"],"title":"ObjectAccessType","type":"string"},"AccessPermissionGroupResponse":{"description":"Response model for access permission group with name included.","properties":{"permissionGroupId":{"description":"The permission group ID","title":"Permissiongroupid","type":"string"},"permissionGroupName":{"description":"The permission group name","title":"Permissiongroupname","type":"string"},"accessType":{"$ref":"#/components/schemas/ObjectAccessType","description":"The access type"}},"required":["permissionGroupId","permissionGroupName","accessType"],"title":"AccessPermissionGroupResponse","type":"object"},"UserPermissionResponse":{"properties":{"ownUserIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownuserids"},"customerGroups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroups"},"viewAccessToUser":{"title":"Viewaccesstouser","type":"boolean"}},"required":["viewAccessToUser"],"title":"UserPermissionResponse","type":"object"},"KnowledgeBaseNodeFile":{"properties":{"piiDetected":{"default":false,"description":"Whether the document has at least one PII masking entity. False also includes documents that have not been checked for PII.","title":"Piidetected","type":"boolean"},"id":{"description":"knowledge base node id","title":"Id","type":"string"},"name":{"description":"knowledge base node name","title":"Name","type":"string"},"createdAt":{"description":"knowledge base node created at","title":"Createdat","type":"number"},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/CreatedByAgent"},{"type":"null"}],"description":"agent who created this node"},"updatedAt":{"description":"knowledge base node updated at","title":"Updatedat","type":"number"},"nodeType":{"description":"knowledge base node type","title":"Nodetype","type":"string"},"parentFolder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"knowledge base node parent folder"},"breadcrumbs":{"description":"knowledge base node breadcrumbs","items":{"$ref":"#/components/schemas/Folder"},"title":"Breadcrumbs","type":"array"},"agentPermission":{"$ref":"#/components/schemas/AgentPermissionResponse","description":"Agent permission"},"userPermission":{"$ref":"#/components/schemas/UserPermissionResponse","description":"User permission"},"hashtags":{"description":"knowledge base hashtags","items":{"type":"string"},"title":"Hashtags","type":"array"},"status":{"description":"knowledge base status","title":"Status","type":"string"},"size":{"description":"knowledge base size","title":"Size","type":"integer"},"processState":{"description":"knowledge base process state","title":"Processstate","type":"string"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/KnowledgeBaseFileProperty"},"type":"array"},{"type":"null"}],"description":"knowledge base properties","title":"Properties"},"action":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseUploadAction"},{"type":"null"}],"description":"Upload result for this document: 'created', 'overwritten', 'skipped', or 'suffix_added'. Only set on upload responses."},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"knowledge base document source type","title":"Sourcetype"}},"required":["id","name","createdAt","updatedAt","nodeType","breadcrumbs","agentPermission","userPermission","hashtags","status","size","processState"],"title":"KnowledgeBaseNodeFile","type":"object"},"KnowledgeBaseFileProperty":{"properties":{"key":{"description":"property key","title":"Key","type":"string"},"value":{"description":"property value","title":"Value","type":"string"}},"required":["key","value"],"title":"KnowledgeBaseFileProperty","type":"object"},"KnowledgeBaseUploadAction":{"enum":["created","overwritten","skipped","suffix_added"],"title":"KnowledgeBaseUploadAction","type":"string"},"MovePersonalDocumentRequest":{"properties":{"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The destination folder ID. Null moves the document to the personal document box root.","title":"Parentfolderid"}},"title":"MovePersonalDocumentRequest","type":"object"}}},"paths":{"/webapi/v2/personal_documents/{document_id}/move":{"post":{"operationId":"django_server_knowledge_base_views_rest_personal_document_api_move_personal_document","summary":"Move Personal Document","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"document_id","schema":{"title":"Document Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseNodeResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to move a document within the requesting user's personal document box.\n\nBoth the document being moved and the destination must belong to the caller: a personal document\ncannot be moved into the shared document box, and a shared document cannot be moved into the\npersonal one. If the destination already holds a document with the same name but different content,\nthe moved document is renamed with a numeric suffix.\n\nThe move answers 409 when the destination cannot take the document: it already sits there, or the\ndestination already holds an identical copy of it. At the personal document box root that\nidentical-copy check spans the whole project rather than the caller's own box.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string): The email address of the project member whose personal document box is being\n  opened. **Required on Works projects**, where it is what names the box; omitting it there is\n  rejected rather than resolved to the project owner.\n- USER-EMAIL (string): The email address to associate with the user. **Required on Works projects**,\n  where it is what puts the request into user scope — AGENT-EMAIL alone resolves no user.\n- OWN-USER-ID (string): The user ID to identify or create a user. **Required on other project types**,\n  where it names the acting user. On Works it is accepted in place of USER-EMAIL.\n\nSo a Works call sends **AGENT-EMAIL and USER-EMAIL together**, and any other project sends\n**OWN-USER-ID**. Every endpoint acts on the resolved user's own document box; a request that\nresolves no user is rejected — never redirected to the shared box, nor to the project owner's.\n\n## Request Body\n\n- parentFolderId (string, optional): The destination folder ID. Null moves the document to the\n  personal document box root.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovePersonalDocumentRequest"}}},"required":true}}}}}
```

## Compare Knowledge Base Versions

> This API allows you to compare two versions of a knowledge base document and return a line-by-line diff.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- leftId (string, required): The ID of the first (left) knowledge base version.\
> \- rightId (string, required): The ID of the second (right) knowledge base version.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"KnowledgeBaseDiffResponse":{"properties":{"result":{"items":{"$ref":"#/components/schemas/KnowledgeBaseDiffResponseLineDiffer"},"title":"Result","type":"array"}},"required":["result"],"title":"KnowledgeBaseDiffResponse","type":"object"},"KnowledgeBaseDiffResponseLineDiffer":{"properties":{"left":{"$ref":"#/components/schemas/KnowledgeBaseDiffResponseLineDelta"},"right":{"$ref":"#/components/schemas/KnowledgeBaseDiffResponseLineDelta"},"row":{"title":"Row","type":"integer"},"comment":{"title":"Comment","type":"string"}},"required":["left","right","row","comment"],"title":"KnowledgeBaseDiffResponseLineDiffer","type":"object"},"KnowledgeBaseDiffResponseLineDelta":{"properties":{"status":{"title":"Status","type":"string"},"page":{"title":"Page","type":"integer"},"line":{"title":"Line","type":"integer"},"text":{"title":"Text","type":"string"},"highlight":{"title":"Highlight","type":"string"}},"required":["status","page","line","text","highlight"],"title":"KnowledgeBaseDiffResponseLineDelta","type":"object"},"KnowledgeBaseDiffRequest":{"properties":{"leftId":{"description":"The left knowledge base ID","title":"Leftid","type":"string"},"rightId":{"description":"The right knowledge base ID","title":"Rightid","type":"string"}},"required":["leftId","rightId"],"title":"KnowledgeBaseDiffRequest","type":"object"}}},"paths":{"/webapi/v2/knowledge_base_diff":{"post":{"operationId":"django_server_knowledge_base_views_rest_knowledge_base_diff_api_knowledge_base_diff","summary":"Compare Knowledge Base Versions","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDiffResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to compare two versions of a knowledge base document and return a line-by-line diff.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- leftId (string, required): The ID of the first (left) knowledge base version.\n- rightId (string, required): The ID of the second (right) knowledge base version.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDiffRequest"}}},"required":true}}}}}
```

## Get Embedding Status

> This API allows you to retrieve per-status embedding page counts for the project.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/embedding_status":{"get":{"operationId":"django_server_knowledge_base_views_rest_embedding_status_api_get_embedding_status","summary":"Get Embedding Status","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to retrieve per-status embedding page counts for the project.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.","tags":["KnowledgeBase"]}}}}
```

## List Embedding Docs

> This API allows you to list knowledge base documents with their embedding status.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Query Parameters\
> \
> \- status (string, optional): Filter by embedding status.\
> \- page (integer, optional): Page number for pagination. Defaults to \*\*1\*\*.\
> \- search (string, optional): Search term to filter documents.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/embedding_status/docs":{"get":{"operationId":"django_server_knowledge_base_views_rest_embedding_status_api_get_embedding_docs","summary":"List Embedding Docs","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"query","name":"status","schema":{"default":"","title":"Status","type":"string"},"required":false},{"in":"query","name":"page","schema":{"default":1,"title":"Page","type":"integer"},"required":false},{"in":"query","name":"search","schema":{"default":"","title":"Search","type":"string"},"required":false}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to list knowledge base documents with their embedding status.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Query Parameters\n\n- status (string, optional): Filter by embedding status.\n- page (integer, optional): Page number for pagination. Defaults to **1**.\n- search (string, optional): Search term to filter documents.","tags":["KnowledgeBase"]}}}}
```

## Reset Embedding

> This API allows you to reset parsed pages for re-embedding.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- scope (string, optional): Must be \`all\` or \`failed\`. \`all\` resets everything, \`failed\` retries failures only. Defaults to \*\*all\*\*.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"ResetScope":{"properties":{"scope":{"default":"all","title":"Scope","type":"string"}},"title":"ResetScope","type":"object"}}},"paths":{"/webapi/v2/embedding_status/reset":{"post":{"operationId":"django_server_knowledge_base_views_rest_embedding_status_api_reset_embedding","summary":"Reset Embedding","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to reset parsed pages for re-embedding.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- scope (string, optional): Must be `all` or `failed`. `all` resets everything, `failed` retries failures only. Defaults to **all**.","tags":["KnowledgeBase"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetScope"}}},"required":true}}}}}
```

## Get Elasticsearch Index Count

> This API allows you to check if a knowledge base document is indexed in Elasticsearch.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/v2/embedding_status/{kb_id}/es-count":{"get":{"operationId":"django_server_knowledge_base_views_rest_embedding_status_api_get_es_count","summary":"Get Elasticsearch Index Count","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"kb_id","schema":{"title":"Kb Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to check if a knowledge base document is indexed in Elasticsearch.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.","tags":["KnowledgeBase"]}}}}
```

## Get Ingestion Status

> This API allows you to retrieve the document ingestion parsing pipeline status for a knowledge base.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"IngestionStatusResponse":{"properties":{"status":{"title":"Status","type":"string"},"startedAt":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Startedat"},"endedAt":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Endedat"},"elapsed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Elapsed"},"steps":{"items":{"$ref":"#/components/schemas/IngestionStepResponse"},"title":"Steps","type":"array"}},"required":["status","startedAt","endedAt","elapsed","steps"],"title":"IngestionStatusResponse","type":"object"},"IngestionStepResponse":{"properties":{"name":{"title":"Name","type":"string"},"subLabel":{"title":"Sublabel","type":"string"},"startedAt":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Startedat"},"endedAt":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Endedat"},"status":{"title":"Status","type":"string"}},"required":["name","subLabel","startedAt","endedAt","status"],"title":"IngestionStepResponse","type":"object"}}},"paths":{"/webapi/v2/ingestion_status/{kb_id}":{"get":{"operationId":"django_server_knowledge_base_views_rest_ingestion_status_api_get_ingestion_status","summary":"Get Ingestion Status","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"kb_id","schema":{"title":"Kb Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionStatusResponse"}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"description":"This API allows you to retrieve the document ingestion parsing pipeline status for a knowledge base.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.","tags":["KnowledgeBase"]}}}}
```

## GET /download\_document\_by\_name/{project\_id}

> Download document by filename

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/download_document_by_name/{project_id}":{"get":{"tags":["KnowledgeBase"],"operationId":"downloadDocumentByName","summary":"Download document by filename","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","description":"Name of the document to download"}}}}}},"responses":{"200":{"description":"Document file downloaded successfully","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Multiple documents found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden or downloads disabled"},"404":{"description":"Document not found"},"500":{"description":"Internal server error"}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## Get Single Document

> This API allows you to retrieve all details of a single document.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Query Parameters\
> \
> \- id (string, required): The ID of the document.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/single_document":{"get":{"tags":["KnowledgeBase"],"operationId":"getExactDocument","summary":"Get Single Document","description":"This API allows you to retrieve all details of a single document.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Query Parameters\n\n- id (string, required): The ID of the document.\n","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"id","in":"query","required":true,"schema":{"type":"string"},"description":"The id of the document."}],"responses":{"200":{"description":"Successfully retrieved document details","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"The Document's ID."},"documentName":{"type":"string","description":"The document's file name."},"createdDate":{"type":"string","format":"date","description":"The date when the document was uploaded."},"hashtags":{"type":"array","items":{"type":"string"},"description":"Hashtags registered for the document."},"agentFeedback":{"type":"object","properties":{"positiveCount":{"type":"integer","description":"The number of positive feedbacks from agents."},"negativeCount":{"type":"integer","description":"The number of negative feedbacks from agents."}},"description":"Counts of positive and negative ratings by employees."},"userFeedback":{"type":"object","properties":{"positiveCount":{"type":"integer","description":"The number of positive feedbacks from users."},"negativeCount":{"type":"integer","description":"The number of negative feedbacks from users."}},"description":"The feedback from users about this document."}}}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}}}}}}
```

## Upload Documents

> This API allows you to upload documents for Cognitive Search.\
> Supported file formats: PDF, TXT, MS Word, PowerPoint, Excel, HTM, and HTML.\
> To upload an HTML file with linked resources, compress it in a ZIP file\
> along with any relative linked resources before uploading.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body (multipart/form-data)\
> \
> \- file (binary, required): The file to upload.\
> \- hashtags (array\[string], optional): Hashtags for the uploading file.\
> \- footerTitle (string, optional): Source text that appears next to 'From' in search results.\
> \- footerUrl (string, optional): URL to link to the footerTitle.\
> \- parentFolderId (string, optional): Target folder ID to upload to. Null to insert at top level.\
> \- properties (object, optional): Custom properties for the document.\
> \- allowOtherAgentsView (boolean, optional): Whether to allow other agents to view this document. Defaults to \*\*true\*\*.\
> \- allowOtherUsersView (boolean, optional): Whether to allow other users to view this document. Defaults to \*\*true\*\*.\
> \- useLayout (boolean, optional): Whether to use layout processing for improved document ingestion. Defaults to \*\*true\*\*.\
> \- useImageDescription (boolean, optional): Whether to use image description for improved document ingestion. Defaults to \*\*true\*\*.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/upload_file":{"post":{"tags":["KnowledgeBase"],"operationId":"uploadFile","summary":"Upload Documents","description":"This API allows you to upload documents for Cognitive Search.\nSupported file formats: PDF, TXT, MS Word, PowerPoint, Excel, HTM, and HTML.\nTo upload an HTML file with linked resources, compress it in a ZIP file\nalong with any relative linked resources before uploading.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body (multipart/form-data)\n\n- file (binary, required): The file to upload.\n- hashtags (array[string], optional): Hashtags for the uploading file.\n- footerTitle (string, optional): Source text that appears next to 'From' in search results.\n- footerUrl (string, optional): URL to link to the footerTitle.\n- parentFolderId (string, optional): Target folder ID to upload to. Null to insert at top level.\n- properties (object, optional): Custom properties for the document.\n- allowOtherAgentsView (boolean, optional): Whether to allow other agents to view this document. Defaults to **true**.\n- allowOtherUsersView (boolean, optional): Whether to allow other users to view this document. Defaults to **true**.\n- useLayout (boolean, optional): Whether to use layout processing for improved document ingestion. Defaults to **true**.\n- useImageDescription (boolean, optional): Whether to use image description for improved document ingestion. Defaults to **true**.\n","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Your local file location"},"hashtags":{"type":"array","description":"Hashtags for the uploading file","items":{"type":"string"}},"footerTitle":{"type":"string","description":"You can type in the source of the answer as a footer for search results from the uploaded file. The footer text will appear next to 'From' in search results."},"footerUrl":{"type":"string","description":"You can put the URL you want to link to the footerTitle."},"parentFolderId":{"type":"string","description":"Target folder ID to upload to. Null to insert at top level."},"allowOtherAgentsView":{"type":"boolean","description":"Whether to allow other agents to view this document"},"allowOtherUsersView":{"type":"boolean","description":"Whether to allow other users to view this document"},"useLayout":{"type":"boolean","description":"Whether to use layout processing for improved document ingestion. If null, project setting will be used."},"useImageDescription":{"type":"boolean","description":"Whether to use image description for improved document ingestion. If null, project setting will be used."},"properties":{"type":"object","description":"Properties for the document.","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"File uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the uploaded document"},"file_name":{"type":"string","description":"The filename of the uploaded document"},"hashtags":{"type":"array","description":"The array of hashtags added to the uploaded document","items":{"type":"string"}},"footer":{"type":"string","description":"The footer (source) info added to the uploaded document"}}}}}}}},"400":{"description":"Invalid request or file format"},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"413":{"description":"File size exceeds limit"},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Upload Documents from S3

> This API allows you to transfer documents stored in Amazon S3 into Cognitive Search.\
> They will appear as Knowledge Base documents in the dashboard.\
> Supported file formats are the same as the Upload Documents API.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- path (string, required): S3 path of the file. Must end with the file name. Do not include the bucket name.\
> \- bucket (string, optional): Name of the S3 bucket containing your file.\
> \- accessKey (string, optional): Your S3 Access Key.\
> \- secretKey (string, optional): Your S3 Secret Key.\
> \- hashtags (array\[string], optional): Hashtags for the document.\
> \- footerTitle (string, optional): Source text that appears next to 'From' in search results.\
> \- footerUrl (string, optional): URL to link to the footerTitle.\
> \- parentFolderId (string, optional): Target folder ID to upload to. Null to insert at top level.\
> \- properties (object, optional): Custom properties for the document.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/upload_from_s3":{"post":{"tags":["KnowledgeBase"],"operationId":"uploadFromS3","summary":"Upload Documents from S3","description":"This API allows you to transfer documents stored in Amazon S3 into Cognitive Search.\nThey will appear as Knowledge Base documents in the dashboard.\nSupported file formats are the same as the Upload Documents API.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- path (string, required): S3 path of the file. Must end with the file name. Do not include the bucket name.\n- bucket (string, optional): Name of the S3 bucket containing your file.\n- accessKey (string, optional): Your S3 Access Key.\n- secretKey (string, optional): Your S3 Secret Key.\n- hashtags (array[string], optional): Hashtags for the document.\n- footerTitle (string, optional): Source text that appears next to 'From' in search results.\n- footerUrl (string, optional): URL to link to the footerTitle.\n- parentFolderId (string, optional): Target folder ID to upload to. Null to insert at top level.\n- properties (object, optional): Custom properties for the document.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"S3 path of the file. It should end with the file name. Don't include the bucket name"},"secretKey":{"type":"string","description":"Your S3 Secret Key."},"accessKey":{"type":"string","description":"Your S3 Access Key."},"bucket":{"type":"string","description":"Name of S3 bucket containing your file."},"footerTitle":{"type":"string","description":"You can type in the source of the answer as a footer for search results from the uploaded file. The footer text will appear next to 'From' in search results."},"footerUrl":{"type":"string","description":"You can put the URL you want to link to the footerTitle."},"hashtags":{"type":"array","description":"Hashtags for the document.","items":{"type":"string"}},"parentFolderId":{"type":"string","description":"Target folder ID to upload to. Null to insert at top level."},"properties":{"type":"object","description":"Properties for the document.","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"File uploaded successfully from S3","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"The id for the transferred document."},"file_name":{"type":"string","description":"The filename of the transferred document."},"hashtags":{"type":"array","description":"The array of hashtags added to the uploaded document.","items":{"type":"string"}},"footer":{"type":"string","description":"The footer (source) info added to the uploaded document."}}}}}}}},"400":{"description":"Invalid request parameters"},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"404":{"description":"File not found in S3"},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Check Document Status

> This API allows you to check the processing status of an uploaded document. After uploading, documents are converted, parsed, and embedded as vectors.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Query Parameters\
> \
> \- id (string, required): The document ID to check the status of.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/check_file_status":{"get":{"tags":["KnowledgeBase"],"operationId":"checkFileStatus","summary":"Check Document Status","description":"This API allows you to check the processing status of an uploaded document. After uploading, documents are converted, parsed, and embedded as vectors.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Query Parameters\n\n- id (string, required): The document ID to check the status of.\n","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"id","in":"query","required":true,"schema":{"type":"string"},"description":"The document id to check the status"}],"responses":{"200":{"description":"File status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the document being checked"},"status":{"type":"string","description":"Status of the document (e.g. initializing, processing, completed, failed)"},"errorName":{"type":"string","description":"Error name if status indicates failure"}}}}}}}},"400":{"description":"Invalid task ID or file not found"},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}}}}}}
```

## Rename Document

> This API allows you to rename an uploaded document.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- id (string, required): The document ID that you want to rename.\
> \- filename (string, required): The new name for the specified document.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/update_kb_name":{"post":{"tags":["KnowledgeBase"],"operationId":"updateKnowledgeBaseName","summary":"Rename Document","description":"This API allows you to rename an uploaded document.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- id (string, required): The document ID that you want to rename.\n- filename (string, required): The new name for the specified document.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The document ID that you want to rename."},"filename":{"type":"string","description":"The new name for the specified document."}}}}}},"responses":{"200":{"description":"Knowledge base name updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"The Document id for the file who's name was changed."},"filename":{"type":"string","description":"The Document's new name."}}}}}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Replace Document File

> This API allows you to replace the file of an existing document while keeping its metadata (hashtags, permissions, etc.).\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body (multipart/form-data)\
> \
> \- id (string, required): The ID of the document whose file you want to replace.\
> \- file (binary, required): The new file to upload.\
> \- resetClueFeedbacks (boolean, optional): Whether to reset answer feedbacks for this document. Defaults to \*\*false\*\*.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/replace_file":{"post":{"tags":["KnowledgeBase"],"operationId":"replaceFile","summary":"Replace Document File","description":"This API allows you to replace the file of an existing document while keeping its metadata (hashtags, permissions, etc.).\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body (multipart/form-data)\n\n- id (string, required): The ID of the document whose file you want to replace.\n- file (binary, required): The new file to upload.\n- resetClueFeedbacks (boolean, optional): Whether to reset answer feedbacks for this document. Defaults to **false**.\n","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"file":{"type":"string","format":"binary"},"resetClueFeedbacks":{"type":"boolean"}}}}}},"responses":{"200":{"description":"File replaced successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string"},"file_name":{"type":"string"}}}}}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Search Documents by Title

> This API allows you to search for documents by their titles (not content). Results are ranked by relevance to the search query.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Query Parameters\
> \
> \- query (string, required): The search term for document titles.\
> \- hashtags (string, optional): Comma-separated list of hashtags to filter documents.\
> \- combinedHashtags (string, optional): Complex hashtag filtering using semicolons to separate groups and commas within groups (e.g., \`a,b;c,d\`).\
> \- excludingHashtags (string, optional): Comma-separated list of hashtags to exclude.\
> \- useVector (string, optional): Set to \`true\` for semantic matching, \`false\` for text-based search.\
> \- sortKey (string, optional): The property field to sort results by.\
> \- sortDirection (string, optional): Sort direction. Must be either \`asc\` or \`desc\`. Defaults to \*\*desc\*\*.\
> \- offset (integer, optional): Number of results to skip for pagination. Defaults to \*\*0\*\*.\
> \- limit (integer, optional): Maximum number of results to return. Defaults to \*\*10\*\*.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/search_document_by_title":{"get":{"tags":["KnowledgeBase"],"operationId":"searchDocumentByTitle","summary":"Search Documents by Title","description":"This API allows you to search for documents by their titles (not content). Results are ranked by relevance to the search query.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Query Parameters\n\n- query (string, required): The search term for document titles.\n- hashtags (string, optional): Comma-separated list of hashtags to filter documents.\n- combinedHashtags (string, optional): Complex hashtag filtering using semicolons to separate groups and commas within groups (e.g., `a,b;c,d`).\n- excludingHashtags (string, optional): Comma-separated list of hashtags to exclude.\n- useVector (string, optional): Set to `true` for semantic matching, `false` for text-based search.\n- sortKey (string, optional): The property field to sort results by.\n- sortDirection (string, optional): Sort direction. Must be either `asc` or `desc`. Defaults to **desc**.\n- offset (integer, optional): Number of results to skip for pagination. Defaults to **0**.\n- limit (integer, optional): Maximum number of results to return. Defaults to **10**.\n","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"query","in":"query","required":true,"schema":{"type":"string"},"description":"The search term for document titles."},{"name":"hashtags","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of hashtags to filter documents by."},{"name":"combinedHashtags","in":"query","required":false,"schema":{"type":"string"},"description":"Complex hashtag filtering using semicolons to separate groups and commas to separate tags within a group (e.g., \"a,b;c,d\")."},{"name":"excludingHashtags","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of hashtags to exclude documents by."},{"name":"useVector","in":"query","required":false,"schema":{"type":"string"},"description":"Set to 'true' to use vector search for semantic matching, or 'false' for text-based search."},{"name":"sortKey","in":"query","required":false,"schema":{"type":"string"},"description":"The property field to sort results by."},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]},"description":"The direction to sort results in (ascending or descending)."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer"},"description":"Number of results to skip for pagination."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Maximum number of results to return."}],"responses":{"200":{"description":"Successfully searched documents by title","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The document's ID."},"file_name":{"type":"string","description":"The document's file name."},"page_count":{"type":"integer","description":"Number of pages in the document."},"download_url":{"type":"string","description":"URL to download the document."},"hashtags":{"type":"array","items":{"type":"string"},"description":"Hashtags associated with the document."},"score":{"type":"number","description":"Relevance score for the search query."},"folder":{"type":"string","description":"Folder containing the document."},"agentEditor":{"type":"array","items":{"type":"string"},"description":"List of agents with edit permission."},"agentViewer":{"type":"array","items":{"type":"string"},"description":"List of agents with view permission."}}}}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}}}}}}
```

## POST /run\_table\_to\_description\_by\_kb

> Generate description for a table from a knowledge base file

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/run_table_to_description_by_kb":{"post":{"tags":["KnowledgeBase"],"operationId":"runTableToDescriptionByKB","summary":"Generate description for a table from a knowledge base file","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"type":"string"},"project_id":{"type":"string"},"knowledge_base_id":{"type":"string"},"driver":{"type":"string"},"language":{"type":"string"}}}}}},"responses":{"200":{"description":"Successfully generated table descriptions (one per sheet)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sheet_name":{"type":"string"},"table_description":{"type":"string"},"table_range":{"type":"string"},"header_info":{"type":"array","items":{"type":"object","properties":{"cell_no":{"type":"string"},"column_name":{"type":"string"},"column_description":{"type":"string"},"column_type":{"type":"string"}}}}}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Invalid API key"},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"404":{"description":"Knowledge base not found or has no file"},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Rerun Document Ingestion

> This API allows you to re-trigger the document ingestion pipeline for specific knowledge base documents.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- knowledge\_base\_ids (array\[string], required): List of knowledge base document IDs to re-ingest.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/document_ingestion/rerun":{"post":{"tags":["KnowledgeBase"],"operationId":"ingestKnowledgeBase","summary":"Rerun Document Ingestion","description":"This API allows you to re-trigger the document ingestion pipeline for specific knowledge base documents.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- knowledge_base_ids (array[string], required): List of knowledge base document IDs to re-ingest.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"knowledge_base_ids":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successfully ingested knowledge base","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"integer"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Rerun All Document Ingestion

> This API allows you to re-trigger the document ingestion pipeline for all knowledge base documents in the project.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/document_ingestion/rerun_all":{"post":{"tags":["KnowledgeBase"],"operationId":"ingestKnowledgeBaseAll","summary":"Rerun All Document Ingestion","description":"This API allows you to re-trigger the document ingestion pipeline for all knowledge base documents in the project.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n","responses":{"200":{"description":"Successfully ingested all knowledge bases","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"integer"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## List Parsing Failed Documents

> This API allows you to retrieve a list of knowledge base documents that failed during the parsing stage of document ingestion.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/document_ingestion/failed":{"get":{"tags":["KnowledgeBase"],"operationId":"listParsingFailedKnowledgeBases","summary":"List Parsing Failed Documents","description":"This API allows you to retrieve a list of knowledge base documents that failed during the parsing stage of document ingestion.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n","responses":{"200":{"description":"Successfully listed failed knowledge bases","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"file_name":{"type":"string"},"state":{"type":"string"}}}}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Get Document Previews

> This API allows you to retrieve previews for knowledge base documents, including HTML body and PDF page information.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- inputs (array\[object], required): List of preview input objects specifying which documents and pages to preview.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/previews":{"post":{"tags":["KnowledgeBase"],"operationId":"getPreviews","summary":"Get Document Previews","description":"This API allows you to retrieve previews for knowledge base documents, including HTML body and PDF page information.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- inputs (array[object], required): List of preview input objects specifying which documents and pages to preview.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object"}}}}}}},"responses":{"200":{"description":"Successfully retrieved previews","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object"}}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Delete Documents

> This API lets you delete uploaded files.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/delete_file":{"post":{"tags":["KnowledgeBase"],"operationId":"deleteFile","summary":"Delete Documents","description":"This API lets you delete uploaded files.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","description":"The document IDs that you want to delete in the array format","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Files deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"ok":{"type":"boolean","description":"true if the deletion completes successfully"}}},"errors":{"type":"object","nullable":true,"description":"If the deletion fails, this will contain an error message"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## List Documents

> This API lets you list out the uploaded documents.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/knowledge_bases":{"get":{"tags":["KnowledgeBase"],"operationId":"knowledgeBases","summary":"List Documents","description":"This API lets you list out the uploaded documents.\n","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"hashtagsSearchOperator","in":"query","required":false,"schema":{"type":"string","enum":["AND","OR"],"default":"OR"},"description":"Either AND or OR, logical operator used to match multiple hashtags. Defaults to OR."},{"name":"status","in":"query","required":false,"schema":{"type":"boolean"},"description":"The on/off status of the document to filter the list."},{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"},"description":"Keyword search query to filter the list. You can use operators to run advanced searches. \"TERM1 TERM2\" for AND, \"TERM1 OR TERM2\" for OR, and \"TERM\\ for exact match."},{"name":"hashtags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Hashtag information to filter the list."},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["FILE_NAME_ASC","FILE_NAME_DESC","TYPE_ASC","TYPE_DESC","STATUS_ASC","STATUS_DESC","CREATED_AT_ASC","CREATED_AT_DESC"]},"description":"The order type of the list. FILE_NAME_ASC/DESC for file name, TYPE_ASC/DESC for file type, STATUS_ASC/DESC for on/off status, CREATED_AT_ASC/DESC for upload date."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"offset allows you to specify the ranking number of the first item on the page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"limit allows you to set the number of objects returned on one page. The maximum value is 100."}],"responses":{"200":{"description":"Successfully retrieved list of documents","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the listed document."},"fileName":{"type":"string","description":"The filename of the list document."},"hashtags":{"type":"array","items":{"type":"string"},"description":"The hashtags added on the document."},"autoHashtags":{"type":"array","items":{"type":"object"},"description":"The automatically generated hashtags added to the document."},"folder":{"type":"string","description":"The folder where the document is located."},"agentEditor":{"type":"array","items":{"type":"string"},"description":"List of agent emails with editor permissions."},"agentViewer":{"type":"array","items":{"type":"string"},"description":"List of agent emails with viewer permissions."},"userViewer":{"type":"object","properties":{"variables":{"type":"object"}},"description":"User viewer configuration with variables."},"allowOtherAgentsView":{"type":"boolean","description":"Whether other agents can view this document."},"allowOtherUsersView":{"type":"boolean","description":"Whether other users can view this document."}}}}}},"errors":{"type":"object","nullable":true,"description":"Error information if the request fails"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}}}}}}
```

## Preview Documents

> This API lets you preview the uploaded documents.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/knowledge_base_preview":{"get":{"tags":["KnowledgeBase"],"operationId":"knowledgeBasePreview","summary":"Preview Documents","description":"This API lets you preview the uploaded documents.\n","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"id","in":"query","required":true,"schema":{"type":"string"},"description":"The document ID that you want to preview"},{"name":"pageNo","in":"query","required":true,"schema":{"type":"string"},"description":"Pages of the document you want to preview"}],"responses":{"200":{"description":"Successfully retrieved document preview","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"totalPageCount":{"type":"integer","description":"Total number of pages in the document"},"pageNo":{"type":"integer","description":"Current page number being previewed"},"css":{"type":"string","nullable":true,"description":"CSS styling for the document"},"body":{"type":"string","nullable":true,"description":"HTML body content of the document"},"highlightIndexes":{"type":"array","items":{"type":"integer"},"description":"Array of highlight indexes"},"exactAnswer":{"type":"string","nullable":true,"description":"Exact answer if available"},"pdf":{"type":"string","nullable":true,"description":"PDF content or \"PDF\" string. Returns null if there's an error like invalid pageNo."},"draftjs":{"type":"string","nullable":true,"description":"DraftJS format content"},"highlights":{"type":"object","properties":{"indexes":{"type":"array","nullable":true,"items":{"type":"integer"},"description":"Highlight indexes"},"pageIndexes":{"type":"array","items":{"type":"integer"},"description":"Page-specific highlight indexes"},"__typename":{"type":"string","description":"GraphQL typename"}},"description":"Highlight information for the document"},"knowledgeBase":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the document"},"title":{"type":"string","description":"The title of the document"},"__typename":{"type":"string","description":"GraphQL typename"}},"description":"Knowledge base information"},"__typename":{"type":"string","description":"GraphQL typename"}}},"errors":{"type":"object","nullable":true,"description":"Error information if the request fails"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}}}}}}
```

## Update Documents

> This API lets you update hashtags, footer title, and footer title link for a document.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/update_document":{"post":{"tags":["KnowledgeBase"],"operationId":"updateDocument","summary":"Update Documents","description":"This API lets you update hashtags, footer title, and footer title link for a document.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The id of the document you want to update"},"footerTitle":{"type":"string","description":"You can type in the source of the answer as a footer for search results from the uploaded file. The footer text will appear next to 'From' in search results."},"footerUrl":{"type":"string","description":"You can put the URL you want to link to the footerTitle."},"folder":{"type":"string","description":"You can assign the destination folder for document upload."},"followFolderPermission":{"type":"boolean","description":"Whether to follow the folder's permission settings."},"agentsEditor":{"type":"array","items":{"type":"string"},"description":"Specify agents that have editor permissions for the file."},"agentsViewer":{"type":"array","items":{"type":"string"},"description":"Specify agents that have viewer permissions for the file."},"userViewer":{"type":"object","description":"Users who have permission to view the document.","properties":{"customer_id":{"type":"array","items":{"type":"string"}},"customer_group":{"type":"array","items":{"type":"string"}}}},"allowOtherAgentsView":{"type":"boolean","description":"Agents not included in viewers/editors can also view the document."},"allowOtherUsersView":{"type":"boolean","description":"Users not included in viewers/editors can also view the document."},"hashtags":{"type":"array","items":{"type":"string"},"description":"List of string hashtags you want to add to the document"},"properties":{"type":"object","description":"Properties for the document.","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"Document updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"knowledgeBase":{"type":"object","properties":{"id":{"type":"string","description":"The id of the document to which the hashtags correspond"},"hashtags":{"type":"array","items":{"type":"string"},"description":"Hashtags attached to the document after update"},"footer":{"type":"string","description":"The footer (source) info added to the uploaded document. It can be the default one or the one specified by footerTitle and footerUrl parameters. Formatted in HTML."}}}}},"errors":{"type":"object","nullable":true,"description":"Error information if the request fails"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Knowledge Base Toggle Status

> This API lets you change the status of many documents (AKA knowledge bases) at once<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"KnowledgeBase","description":"Knowledge base, folder, and node related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/toggle_documents":{"post":{"tags":["KnowledgeBase"],"operationId":"toggleDocuments","summary":"Knowledge Base Toggle Status","description":"This API lets you change the status of many documents (AKA knowledge bases) at once\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["use","ids"],"properties":{"use":{"type":"boolean","description":"Whether to turn all the status of all the knowledge bases to on (True) or off (False)"},"ids":{"type":"array","items":{"type":"string"},"description":"This is a list of the ids of the knowledge bases that you want to toggle."}}}}}},"responses":{"200":{"description":"Knowledge base statuses toggled successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"knowledgeBases":{"type":"array","description":"A list of ONLY the knowledge bases whose status were toggled","items":{"type":"object","properties":{"id":{"type":"string","description":"id of knowledge base"},"status":{"type":"boolean","description":"new status of knowledge base (boolean). true meaning status is now on."}}}}}},"errors":{"type":"object","nullable":true,"description":"Error information if the request fails"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```
