External Project API
Interaktiv testen: https://ki-toolbox.reflactportal.com/swagger.
GET /api/external/projectapi/bots
List all bots of the project (scope bots:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Status | Beschreibung |
|---|---|
| 200 | Array of bots belonging to the project |
POST /api/external/projectapi/bots
Create a new bot in the project (scope bots:write)
Not available with LogtoBearer (403); use a project API key.
Auth: APIKeyHeaderProject
Request-Body (application/json): name: string, customJs: string, customCss: string, customChatCss: string, customVoiceCss: string, customAvatarCss: string, customDidAvatarCss: string, botInstruction: string, summarizePrompt: string, helpUrls: string, documentationUrl: string, temperature: number, model: string, modelSource: "openai" | "vllm", reasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh", textVerbosity: "low" | "medium" | "high", isPublic: boolean, isPwProtected: boolean, botPassword: string, websearch: boolean, allowUserFileUpload: boolean, memoryEnabled: boolean, voiceAutoPlay: boolean, tagList: string[], stopWords: string[], chatMsgSourceOption: "hidden" | "visible" | "linking", wordReplacements: object[], complianceText: object, storageaccessText: object, loadingMessages: string, postMessageTargetOrigin: string, speechRecognitionMode: "locale" | "auto", enableMessageFeedback: boolean, enableInstantAccess: boolean, createEmptyThreadOnVisit: boolean, secondsToWaitForThreadDeleting: integer, deleteGuestsAfterDays: integer, supervisorEnabled: boolean, messageCopyChatActive: boolean, chatCopyActive: boolean, chatExportActive: boolean, messageDeleteChatActive: boolean, cancelBotThinkingChatActive: boolean, cancelBotThinkingVoiceActive: boolean, cancelBotThinkingAvatarActive: boolean, promptbarChatActive: boolean, promptbarAudioActive: boolean, promptbarAvatarActive: boolean, voiceInputChatActive: boolean, voiceInputVoiceActive: boolean, voiceInputAvatarActive: boolean, voiceOutputChatActive: boolean, switchToChatFromVoice: boolean, switchToChatFromAvatar: boolean, switchToVoiceFromChat: boolean, switchToVoiceFromAvatar: boolean, switchToAvatarFromChat: boolean, switchToAvatarFromVoice: boolean, activeDocSearch: boolean, activeDocSearchCount: integer, activeDocSearchMinScore: integer, activeDocSearchType: "vector" | "text" | "combined", userDocumentsEnabled: boolean, userDocumentsMaxCount: integer, userDocumentsMaxMb: integer, templateVars: object[] & object
| Status | Beschreibung |
|---|---|
| 200 | The newly created bot (API keys are masked) |
| 404 | Project not found |
| 422 | Invalid or unknown fields in request body |
GET /api/external/projectapi/bots/{botId}
Get a single bot of the project (scope bots:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The bot (API keys are masked) |
| 404 | Bot not found |
PUT /api/external/projectapi/bots/{botId}
Partially update a bot of the project (scope bots:write)
Only the fields present in the request body are updated (like a PATCH) - any allow-listed field can be omitted. Unknown fields are rejected. Use this to edit e.g. customJs without resending the whole bot config.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): name: string, customJs: string, customCss: string, customChatCss: string, customVoiceCss: string, customAvatarCss: string, customDidAvatarCss: string, botInstruction: string, summarizePrompt: string, helpUrls: string, documentationUrl: string, temperature: number, model: string, modelSource: "openai" | "vllm", reasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh", textVerbosity: "low" | "medium" | "high", isPublic: boolean, isPwProtected: boolean, botPassword: string, websearch: boolean, allowUserFileUpload: boolean, memoryEnabled: boolean, voiceAutoPlay: boolean, tagList: string[], stopWords: string[], chatMsgSourceOption: "hidden" | "visible" | "linking", wordReplacements: object[], complianceText: object, storageaccessText: object, loadingMessages: string, postMessageTargetOrigin: string, speechRecognitionMode: "locale" | "auto", enableMessageFeedback: boolean, enableInstantAccess: boolean, createEmptyThreadOnVisit: boolean, secondsToWaitForThreadDeleting: integer, deleteGuestsAfterDays: integer, supervisorEnabled: boolean, messageCopyChatActive: boolean, chatCopyActive: boolean, chatExportActive: boolean, messageDeleteChatActive: boolean, cancelBotThinkingChatActive: boolean, cancelBotThinkingVoiceActive: boolean, cancelBotThinkingAvatarActive: boolean, promptbarChatActive: boolean, promptbarAudioActive: boolean, promptbarAvatarActive: boolean, voiceInputChatActive: boolean, voiceInputVoiceActive: boolean, voiceInputAvatarActive: boolean, voiceOutputChatActive: boolean, switchToChatFromVoice: boolean, switchToChatFromAvatar: boolean, switchToVoiceFromChat: boolean, switchToVoiceFromAvatar: boolean, switchToAvatarFromChat: boolean, switchToAvatarFromVoice: boolean, activeDocSearch: boolean, activeDocSearchCount: integer, activeDocSearchMinScore: integer, activeDocSearchType: "vector" | "text" | "combined", userDocumentsEnabled: boolean, userDocumentsMaxCount: integer, userDocumentsMaxMb: integer, templateVars: object[]
| Status | Beschreibung |
|---|---|
| 200 | The updated bot (API keys are masked) |
| 404 | Bot not found |
| 422 | Invalid or unknown fields, or no fields provided |
DELETE /api/external/projectapi/bots/{botId}
Delete, archive or trash a bot of the project (scope bots:write)
Default mode is "delete" (irreversible - uploaded files, docsearch documents, scrapes, history, threads, blockly blocks, trunks, D-ID agent, ... - same teardown as the internal admin delete). "archive" and "trash" instead just flag the bot (archived/thisIsTrash) - after that it's excluded from this API's bot lookups (same as demo/template bots), so further calls on it will 404. Not available with LogtoBearer (403); use a project API key.
Auth: APIKeyHeaderProject
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): mode: "delete" | "archive" | "trash"
| Status | Beschreibung |
|---|---|
| 200 | Bot deleted, archived or trashed |
| 404 | Bot not found |
GET /api/external/projectapi/bots/{botId}/changelog
Read the change history of a bot of the project (scope changelog:read)
Returns up to the last 5000 changelog entries, newest first.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of changelog entries |
| 404 | Bot not found |
POST /api/external/projectapi/bots/{botId}/doc/assign
Attach one or more already uploaded project-level documents to a bot of the project (scopes projectdoc:write and bots:write)
New bot-level copies keep the document's skill ID if it is free in this bot and are always private (publiclyReachable false); make them public via PATCH /bots/{botId}/doc/files/{docId}. All documents are checked before any is assigned.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): docIds: string[]
| Status | Beschreibung |
|---|---|
| 200 | Documents assigned to the bot (already assigned documents are returned as-is) |
| 404 | Bot or document not found |
| 409 | A document's skill ID is already used in this bot (errorType SKILL_ID_DUPLICATE); nothing was assigned |
| 422 | No document IDs were provided |
PATCH /api/external/projectapi/bots/{botId}/doc/files/{docId}
Change visibility, skill ID and knowledge use of a bot document (scope projectdoc:write)
Changes only the bot-level copy of the document. A document with publiclyReachable true and a skill ID is served without login under /api/toolbox/bot/file/{botId}/{skillId}; set back to private, that URL requires a file session again (401). Fields that are not sent stay unchanged; at least one field is required. Write-protected bots answer 423.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
docId | path | ✔ | string | ID of the bot-level document or of the project-level document assigned to this bot |
Request-Body (application/json): publiclyReachable: boolean, skillId: string, enabledForKnowledge: boolean
| Status | Beschreibung |
|---|---|
| 200 | Updated bot document |
| 403 | Missing token or scope projectdoc:write (errorType MISSING_SCOPE, e.g. read access only). With a bearer token for a bot without project: errorType PROJECT_API_WITHOUT_PROJECT (other Logto rejections: see ExternalErrorMessage). |
| 404 | Bot not found or document not assigned to this bot |
| 409 | The skill ID is already used by another document of this bot (errorType SKILL_ID_DUPLICATE) |
| 422 | Invalid body or invalid skill ID |
| 423 | The bot is write-protected (errorType WRITE_PROTECTED) |
POST /api/external/projectapi/bots/{botId}/doc/unassign
Detach one or more documents from a bot of the project (scopes projectdoc:write and bots:write)
Removes the bot-level copy of each document. The project-level document (botId == null) and any copies attached to other bots are not affected. Documents that are not currently assigned to the bot are silently skipped.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): docIds: string[]
| Status | Beschreibung |
|---|---|
| 200 | Documents detached from the bot (not-assigned documents are skipped) |
| 404 | Bot or document not found |
| 422 | No document IDs were provided |
POST /api/external/projectapi/bots/{botId}/doc/upload
Upload a new document and attach it to a bot of the project (scope projectdoc:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (multipart/form-data): file: string, publiclyReachable: boolean, skillId: string, enabledForKnowledge: boolean
| Status | Beschreibung |
|---|---|
| 200 | Uploaded document, attached to both project and bot |
| 404 | Bot or project not found |
| 409 | The skill ID is already used by another document of this bot (errorType SKILL_ID_DUPLICATE) |
| 413 | |
| 422 | No file was uploaded or the skill ID is invalid, or the malware scan found malware in the file |
| 500 | Upload failed |
| 503 |
POST /api/external/projectapi/bots/{botId}/duplicate
Duplicate a bot of the project (scope bots:write)
Creates a full copy of the bot (config, documents, skills, stages, fusion views, ...) in the same project. Not available with LogtoBearer (403); use a project API key.
Auth: APIKeyHeaderProject
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): name: string
| Status | Beschreibung |
|---|---|
| 200 | The newly created bot (API keys are masked) |
| 404 | Bot not found |
GET /api/external/projectapi/bots/{botId}/embedding
List all website-crawls of a bot of the project (scope embedding:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of website-crawls |
| 404 | Bot not found |
POST /api/external/projectapi/bots/{botId}/embedding
Start a new website-crawl for a bot of the project (scope embedding:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): url: string, depth: integer, skillId: string, description: string, name: string
| Status | Beschreibung |
|---|---|
| 200 | The created (or already-running) crawl |
| 404 | Bot not found |
| 422 | Invalid or missing fields |
GET /api/external/projectapi/bots/{botId}/embedding/{scrapeId}
Get a single website-crawl of a bot of the project (scope embedding:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
scrapeId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The website-crawl, including its scraped pages |
| 404 | Bot or website-crawl not found |
PUT /api/external/projectapi/bots/{botId}/embedding/{scrapeId}
Update a website-crawl of a bot of the project (scope embedding:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
scrapeId | path | ✔ | string |
Request-Body (application/json): description: string, active: boolean, skillId: string, name: string
| Status | Beschreibung |
|---|---|
| 200 | The updated website-crawl |
| 404 | Bot or website-crawl not found |
| 422 | Invalid or missing fields |
DELETE /api/external/projectapi/bots/{botId}/embedding/{scrapeId}
Delete a website-crawl of a bot of the project (scope embedding:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
scrapeId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Website-crawl deleted |
| 404 | Bot or website-crawl not found |
GET /api/external/projectapi/bots/{botId}/feedback
Read message feedback of a bot of the project (scope stats:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of message feedback entries |
| 404 | Bot not found |
GET /api/external/projectapi/bots/{botId}/fusion
List all Fusion-Views of a bot of the project (scope fusion:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of Fusion-Views |
| 404 | Bot not found |
POST /api/external/projectapi/bots/{botId}/fusion
Create a new Fusion-View for a bot of the project (scope fusion:write)
For rise/storyline/captivate/lxt/knowledgeworker this only creates the metadata entry - upload the ZIP afterwards via the /upload endpoint.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): type: string, title: string
| Status | Beschreibung |
|---|---|
| 200 | The newly created Fusion-View |
| 404 | Bot not found |
| 422 | Invalid fields (e.g. missing type/title, a reserved field was set, or an iframely view without a usable video url / with html) |
| 502 | The urlpreview service for iframely embed codes is not reachable |
GET /api/external/projectapi/bots/{botId}/fusion/{fusionId}
Get a single Fusion-View of a bot of the project (scope fusion:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
fusionId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The Fusion-View |
| 404 | Bot or Fusion-View not found |
PUT /api/external/projectapi/bots/{botId}/fusion/{fusionId}
Partially update a Fusion-View's metadata of a bot of the project (scope fusion:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
fusionId | path | ✔ | string |
Request-Body (application/json): object
| Status | Beschreibung |
|---|---|
| 200 | The updated Fusion-View |
| 404 | Bot or Fusion-View not found |
| 422 | Invalid fields (e.g. type/_id/botId was set, no fields provided, or html/an unusable url for an iframely view) |
| 502 | The urlpreview service for iframely embed codes is not reachable |
DELETE /api/external/projectapi/bots/{botId}/fusion/{fusionId}
Delete a Fusion-View of a bot of the project (scope fusion:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
fusionId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Fusion-View deleted |
| 404 | Bot or Fusion-View not found |
POST /api/external/projectapi/bots/{botId}/fusion/{fusionId}/upload
Upload the ZIP content for a rise/storyline/captivate/lxt/knowledgeworker Fusion-View of a bot of the project (scope fusion:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
fusionId | path | ✔ | string |
Request-Body (multipart/form-data): file: string
| Status | Beschreibung |
|---|---|
| 200 | The updated Fusion-View file entry |
| 404 | Bot or Fusion-View not found |
| 413 | |
| 415 | Upload not supported for this Fusion-View type, or unsupported mimetype |
| 422 | |
| 503 |
GET /api/external/projectapi/bots/{botId}/skills
List all Skills (Wenn-Dann/Online-Quellen/Webhooks) of a bot of the project (scope skills:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of skills |
| 404 | Bot not found |
POST /api/external/projectapi/bots/{botId}/skills
Create a new Skill for a bot of the project (scope skills:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): tool: "customtoolkit" | "websitesearch" | "schnittstelle" | "webhook", name: string, skillId: string, description: string, enabled: boolean, params: object[], url: string, content: string, toolCallAnswer: string[], answerMode: "sequence" | "sequenceloop" | "random", authMethod: "none" | "basic", authData: object, urlMethod: "get" | "post", contentType: "application/json" | "application/x-www-form-urlencoded" & object
| Status | Beschreibung |
|---|---|
| 200 | The newly created skill |
| 404 | Bot not found |
| 409 | name (customtoolkit only) or skillId already used by another Skill of this bot |
| 422 | Invalid or unknown fields |
GET /api/external/projectapi/bots/{botId}/skills/{skillId}
Get a single Skill of a bot of the project (scope skills:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
skillId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The skill |
| 404 | Bot or skill not found |
PUT /api/external/projectapi/bots/{botId}/skills/{skillId}
Partially update a Skill of a bot of the project (scope skills:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
skillId | path | ✔ | string |
Request-Body (application/json): tool: "customtoolkit" | "websitesearch" | "schnittstelle" | "webhook", name: string, skillId: string, description: string, enabled: boolean, params: object[], url: string, content: string, toolCallAnswer: string[], answerMode: "sequence" | "sequenceloop" | "random", authMethod: "none" | "basic", authData: object, urlMethod: "get" | "post", contentType: "application/json" | "application/x-www-form-urlencoded"
| Status | Beschreibung |
|---|---|
| 200 | The updated skill |
| 404 | Bot or skill not found |
| 409 | name (customtoolkit only) or skillId already used by another Skill of this bot |
| 422 | Invalid or unknown fields, or no fields provided |
DELETE /api/external/projectapi/bots/{botId}/skills/{skillId}
Delete a Skill of a bot of the project (scope skills:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
skillId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Skill deleted |
| 404 | Bot or skill not found |
GET /api/external/projectapi/bots/{botId}/stages
List all stages of a bot of the project (scope stages:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of stages |
| 404 | Bot not found |
POST /api/external/projectapi/bots/{botId}/stages
Create a new stage for a bot of the project (scope stages:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
Request-Body (application/json): title: string, name: string, hidden: boolean, footer: boolean, forceSkills: boolean, skills: string[], enterJS: string, exitJS: string, preConditionJS: string & object
| Status | Beschreibung |
|---|---|
| 200 | The newly created stage |
| 404 | Bot not found |
| 422 | Invalid or unknown fields |
GET /api/external/projectapi/bots/{botId}/stages/{stageId}
Get a single stage of a bot of the project (scope stages:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
stageId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The stage |
| 404 | Bot or stage not found |
PUT /api/external/projectapi/bots/{botId}/stages/{stageId}
Partially update a stage of a bot of the project (scope stages:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
stageId | path | ✔ | string |
Request-Body (application/json): title: string, name: string, hidden: boolean, footer: boolean, forceSkills: boolean, skills: string[], enterJS: string, exitJS: string, preConditionJS: string
| Status | Beschreibung |
|---|---|
| 200 | The updated stage |
| 404 | Bot or stage not found |
| 422 | Invalid or unknown fields, or no fields provided |
DELETE /api/external/projectapi/bots/{botId}/stages/{stageId}
Delete a stage of a bot of the project (scope stages:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string | |
stageId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Stage deleted |
| 404 | Bot or stage not found |
GET /api/external/projectapi/bots/{botId}/usage
Read usage/token statistics of a bot of the project (scope stats:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
botId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of usage stats (chat completions, TTS, HeyGen) |
| 404 | Bot not found |
GET /api/external/projectapi/checkauth
Verify external project API token
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Status | Beschreibung |
|---|---|
| 200 | Validated token data |
POST /api/external/projectapi/doc/extract/{docId}
Trigger chunking/extraction for a project document (scope projectdoc:chunk)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
docId | path | ✔ | string |
Request-Body (application/json): maxChars: integer, maxOverlap: integer, chunking_strategy: "text" | "markdown" | "yaml", imagesEnabled: boolean, ocrEnabled: boolean, ocrLanguage: string
| Status | Beschreibung |
|---|---|
| 200 | Extraction triggered/finished |
| 404 | Document or project not found |
| 500 | Extraction failed |
GET /api/external/projectapi/doc/files
List all project-level documents (scope projectdoc:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Status | Beschreibung |
|---|---|
| 200 | Array of project documents |
GET /api/external/projectapi/doc/files/{docId}
Get metadata of a single project document (scope projectdoc:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
docId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Document metadata |
| 404 | Document not found |
DELETE /api/external/projectapi/doc/files/{docId}
Delete a project document (scope projectdoc:write). Also removes the document from every bot of the project it was attached to.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
docId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Document deleted |
| 404 | Document not found |
GET /api/external/projectapi/doc/files/{docId}/chunks
Get the extracted chunks of a project document (scope projectdoc:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
docId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of document chunks |
| 404 | Document not found |
GET /api/external/projectapi/doc/files/{docId}/download
Download the file content of a project document (scope projectdoc:read)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
docId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Binary file stream |
| 404 | Document not found |
PUT /api/external/projectapi/doc/replace/{docId}
Replace/overwrite an existing project document (scope projectdoc:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
docId | path | ✔ | string |
Request-Body (multipart/form-data): file: string, extract: boolean & maxChars: integer, maxOverlap: integer, chunking_strategy: "text" | "markdown" | "yaml", imagesEnabled: boolean, ocrEnabled: boolean, ocrLanguage: string
| Status | Beschreibung |
|---|---|
| 200 | Replaced document (no projectDoc — use GET /files/{docId} to fetch the updated metadata) |
| 404 | Document or project not found |
| 413 | |
| 422 | No file was uploaded, or the malware scan found malware in the file |
| 500 | Replace failed |
| 503 |
POST /api/external/projectapi/doc/upload
Upload a new document to the project (scope projectdoc:write)
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
Request-Body (multipart/form-data): file: string, extract: boolean, skillId: string, functionName: string & maxChars: integer, maxOverlap: integer, chunking_strategy: "text" | "markdown" | "yaml", imagesEnabled: boolean, ocrEnabled: boolean, ocrLanguage: string
| Status | Beschreibung |
|---|---|
| 200 | Uploaded document |
| 404 | Project not found |
| 413 | |
| 422 | No file was uploaded, or the malware scan found malware in the file |
| 500 | Upload failed |
| 503 |
GET /api/external/projectapi/keyval
List all key-value entries for this project
Returns all ProjectKeyVal entries belonging to the token's project. Filter by userId, key, keyPrefix, and/or type.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | query | – | string | |
type | query | – | string | |
key | query | – | string | Exact key match (mutually exclusive with keyPrefix) |
keyPrefix | query | – | string | Key starts-with filter (mutually exclusive with key) |
| Status | Beschreibung |
|---|---|
| 200 | Array of ProjectKeyVal entries |
GET /api/external/projectapi/keyval/{userId}
List all project key-value entries for a specific user
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | |
type | query | – | string | |
keyPrefix | query | – | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of ProjectKeyVal entries |
DELETE /api/external/projectapi/keyval/{userId}
Delete all project key-value entries for a specific user
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | |
type | query | – | string | |
keyPrefix | query | – | string | |
keepPermanent | query | – | boolean |
| Status | Beschreibung |
|---|---|
| 200 | Number of deleted entries |
GET /api/external/projectapi/keyval/{userId}/{type}/{key}
Get a single project key-value entry
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | |
type | path | ✔ | string | |
key | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | ProjectKeyVal entry |
| 404 | Entry not found |
PUT /api/external/projectapi/keyval/{userId}/{type}/{key}
Create or update a project key-value entry (upsert)
Permanent entries (key starts with "!") cannot be written and return 403. userId must be the internal user ID of the bot user (MongoDB ObjectId, exactly 24 lowercase hexadecimal characters), not the user name. Bots read project key-value entries by this internal ID, so an entry stored under a name would never reach the intended user. Other values are rejected with 400 before anything is stored. Only the format is checked, not whether a user with this ID exists (e.g. entries can be prepared for users before their first bot visit). Reading and deleting accept any userId, so previously stored invalid entries can still be found and removed.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | Internal user ID (MongoDB ObjectId, lowercase) of the bot user, not the user name. |
type | path | ✔ | string | |
key | path | ✔ | string |
Request-Body (application/json): value: unknown
| Status | Beschreibung |
|---|---|
| 200 | Updated or created entry |
| 400 | userId is not an internal user ID (24 lowercase hexadecimal characters); nothing was stored |
| 403 | Key is read-only (starts with "!") |
DELETE /api/external/projectapi/keyval/{userId}/{type}/{key}
Delete a single project key-value entry
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | |
type | path | ✔ | string | |
key | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Entry deleted |
| 404 | Entry not found |
POST /api/external/projectapi/keyval/bulk-delete
Bulk-delete project key-value entries
Deletes all project entries matching the given filter. Permanent entries ("!"-prefixed keys) are protected by default.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
Request-Body (application/json): userId: string, type: string, keyPrefix: string, keepPermanent: boolean
| Status | Beschreibung |
|---|---|
| 200 | Number of deleted entries |
GET /api/external/projectapi/keyval/maxage
List all MaxAge rules for this project
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Status | Beschreibung |
|---|---|
| 200 | Array of MaxAge rules |
POST /api/external/projectapi/keyval/maxage
Create a new MaxAge rule
Entries whose key matches keyPattern and that have not been accessed or updated within maxAgeSeconds seconds will be automatically deleted by the cleanup job.
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
Request-Body (application/json): keyPattern: string, maxAgeSeconds: number
| Status | Beschreibung |
|---|---|
| 200 | Created MaxAge rule |
| 422 | Missing or invalid request body |
PUT /api/external/projectapi/keyval/maxage/{ruleId}
Update a MaxAge rule
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
ruleId | path | ✔ | string |
Request-Body (application/json): keyPattern: string, maxAgeSeconds: number
| Status | Beschreibung |
|---|---|
| 200 | Updated MaxAge rule |
| 404 | Rule not found |
| 422 | Invalid ruleId format |
DELETE /api/external/projectapi/keyval/maxage/{ruleId}
Delete a MaxAge rule
Auth: APIKeyHeaderProject, LogtoBearer, EngineProjectId, EngineBotId
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
ruleId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Rule deleted |
| 422 | Invalid ruleId format |