External API
Interaktiv testen: https://ki-toolbox.reflactportal.com/swagger.
GET /api/external/bot
Get the token's own bot config (scope bot:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | The bot (API keys are masked) |
| 404 | Bot not found |
PUT /api/external/bot
Partially update the token's own bot config (scope bot: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.
Auth: APIKeyHeader
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, 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
| 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/bot
Delete, archive or trash the token's own bot (scope bot:write)
Default mode is "delete" (irreversible, same teardown as the internal admin delete). "archive" and "trash" instead just flag the bot (archived/thisIsTrash) - after that it no longer matches this token's own-bot lookup (same exclusion as demo/template bots), so further calls on it will 404.
Auth: APIKeyHeader
Request-Body (application/json): mode: "delete" | "archive" | "trash"
| Status | Beschreibung |
|---|---|
| 200 | Bot deleted, archived or trashed |
| 404 | Bot not found |
GET /api/external/bot/changelog
Read the change history of the token's own bot (scope changelog:read)
Returns up to the last 5000 changelog entries, newest first.
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of changelog entries |
POST /api/external/bot/duplicate
Duplicate the token's own bot (scope bot:write)
Creates a full copy of the bot (config, documents, skills, stages, fusion views, ...) in the same project. The new bot is not accessible through this token (which stays scoped to the original bot) - use a Project API token or mint a new Bot API token for it.
Auth: APIKeyHeader
Request-Body (application/json): name: string
| Status | Beschreibung |
|---|---|
| 200 | The newly created bot (API keys are masked) |
| 404 | Bot not found |
GET /api/external/bot/embedding
List all website-crawls of the token's own bot (scope embedding:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of website-crawls |
POST /api/external/bot/embedding
Start a new website-crawl for the token's own bot (scope embedding:write)
Auth: APIKeyHeader
Request-Body (application/json): url: string, depth: integer, skillId: string, description: string, name: string
| Status | Beschreibung |
|---|---|
| 200 | The created (or already-running) crawl |
| 422 | Invalid or missing fields |
GET /api/external/bot/embedding/{scrapeId}
Get a single website-crawl of the token's own bot (scope embedding:read)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
scrapeId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The website-crawl, including its scraped pages |
| 404 | Website-crawl not found |
PUT /api/external/bot/embedding/{scrapeId}
Update a website-crawl of the token's own bot (scope embedding:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
scrapeId | path | ✔ | string |
Request-Body (application/json): description: string, active: boolean, skillId: string, name: string
| Status | Beschreibung |
|---|---|
| 200 | The updated website-crawl |
| 404 | Website-crawl not found |
| 422 | Invalid or missing fields |
DELETE /api/external/bot/embedding/{scrapeId}
Delete a website-crawl of the token's own bot (scope embedding:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
scrapeId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Website-crawl deleted |
| 404 | Website-crawl not found |
GET /api/external/bot/feedback
Read message feedback of the token's own bot (scope stats:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of message feedback entries |
GET /api/external/bot/fusion
List all Fusion-Views of the token's own bot (scope fusion:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of Fusion-Views |
POST /api/external/bot/fusion
Create a new Fusion-View (scope fusion:write)
For rise/storyline/captivate/lxt/knowledgeworker this only creates the metadata entry - upload the ZIP afterwards via the /upload endpoint.
Auth: APIKeyHeader
Request-Body (application/json): type: string, title: string
| Status | Beschreibung |
|---|---|
| 200 | The newly created Fusion-View |
| 422 | Invalid fields (e.g. missing type/title, or a reserved field was set) |
GET /api/external/bot/fusion/{fusionId}
Get a single Fusion-View of the token's own bot (scope fusion:read)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
fusionId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The Fusion-View |
| 404 | Fusion-View not found |
PUT /api/external/bot/fusion/{fusionId}
Partially update a Fusion-View's metadata (scope fusion:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
fusionId | path | ✔ | string |
Request-Body (application/json): object
| Status | Beschreibung |
|---|---|
| 200 | The updated Fusion-View |
| 404 | Fusion-View not found |
| 422 | Invalid fields (e.g. type/_id/botId was set, or no fields provided) |
DELETE /api/external/bot/fusion/{fusionId}
Delete a Fusion-View (scope fusion:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
fusionId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Fusion-View deleted |
| 404 | Fusion-View not found |
POST /api/external/bot/fusion/{fusionId}/upload
Upload the ZIP content for a rise/storyline/captivate/lxt/knowledgeworker Fusion-View (scope fusion:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
fusionId | path | ✔ | string |
Request-Body (multipart/form-data): file: string
| Status | Beschreibung |
|---|---|
| 200 | The updated Fusion-View file entry |
| 404 | Fusion-View not found |
| 415 | Upload not supported for this Fusion-View type, or unsupported mimetype |
GET /api/external/bot/skills
List all Wenn-Dann rules of the token's own bot (scope skills:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of skills |
POST /api/external/bot/skills
Create a new Wenn-Dann rule (scope skills:write)
Auth: APIKeyHeader
Request-Body (application/json): name: string, skillId: string, description: string, enabled: boolean, content: string, params: object[], toolCallAnswer: string[], answerMode: "sequence" | "sequenceloop" | "random" & object
| Status | Beschreibung |
|---|---|
| 200 | The newly created skill |
| 409 | name or skillId already used by another Wenn-Dann rule of this bot |
| 422 | Invalid or unknown fields |
GET /api/external/bot/skills/{skillId}
Get a single Wenn-Dann rule of the token's own bot (scope skills:read)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
skillId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The skill |
| 404 | Skill not found |
PUT /api/external/bot/skills/{skillId}
Partially update a Wenn-Dann rule (scope skills:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
skillId | path | ✔ | string |
Request-Body (application/json): name: string, skillId: string, description: string, enabled: boolean, content: string, params: object[], toolCallAnswer: string[], answerMode: "sequence" | "sequenceloop" | "random"
| Status | Beschreibung |
|---|---|
| 200 | The updated skill |
| 404 | Skill not found |
| 409 | name or skillId already used by another Wenn-Dann rule of this bot |
| 422 | Invalid or unknown fields, or no fields provided |
DELETE /api/external/bot/skills/{skillId}
Delete a Wenn-Dann rule (scope skills:write)
Also removes the rule's skillId from any Stage referencing it and deletes a matching Blockly block (ifthen_{id}), if one exists.
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
skillId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Skill deleted |
| 404 | Skill not found |
GET /api/external/bot/stages
List all stages of the token's own bot (scope stages:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of stages |
POST /api/external/bot/stages
Create a new stage (scope stages:write)
Auth: APIKeyHeader
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 |
| 422 | Invalid or unknown fields |
GET /api/external/bot/stages/{stageId}
Get a single stage of the token's own bot (scope stages:read)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
stageId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The stage |
| 404 | Stage not found |
PUT /api/external/bot/stages/{stageId}
Partially update a stage (scope stages:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
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 | Stage not found |
| 422 | Invalid or unknown fields, or no fields provided |
DELETE /api/external/bot/stages/{stageId}
Delete a stage (scope stages:write)
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
stageId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | Stage deleted |
| 404 | Stage not found |
GET /api/external/bot/usage
Read usage/token statistics of the token's own bot (scope stats:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of usage stats (chat completions, TTS, HeyGen) |
GET /api/external/checkauth
Verify external API token
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Validated token data |
GET /api/external/keyval
List all key-value entries for this bot
Returns all KeyVal entries belonging to the token's bot. Filter by userId, key, keyPrefix, and/or type via query parameters.
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | query | – | string | Filter by user ID |
type | query | – | string | Filter by entry type |
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 KeyVal entries (enriched with guestId) |
GET /api/external/keyval/{userId}
List all key-value entries for a specific user
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | |
type | query | – | string | |
keyPrefix | query | – | string |
| Status | Beschreibung |
|---|---|
| 200 | Array of KeyVal entries |
DELETE /api/external/keyval/{userId}
Delete all key-value entries for a specific user
Deletes all entries for the given user. Filter by type and/or keyPrefix. Permanent entries ("!"-prefixed keys) are protected by default; pass keepPermanent=false to remove them as well.
Auth: APIKeyHeader
| 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/keyval/{userId}/{type}/{key}
Get a single key-value entry
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | |
type | path | ✔ | string | |
key | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | KeyVal entry |
| 404 | Entry not found |
PUT /api/external/keyval/{userId}/{type}/{key}
Create or update a key-value entry (upsert)
Permanent entries (key starts with "!") cannot be written and return 403.
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string | |
type | path | ✔ | string | |
key | path | ✔ | string |
Request-Body (application/json): value: unknown
| Status | Beschreibung |
|---|---|
| 200 | Updated or created entry |
| 403 | Key is read-only (starts with "!") |
DELETE /api/external/keyval/{userId}/{type}/{key}
Delete a single key-value entry
Auth: APIKeyHeader
| 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/keyval/bulk-delete
Bulk-delete key-value entries for this bot
Deletes all entries matching the given filter. By default, entries whose key starts with "!" (permanent entries) are protected — set keepPermanent to false to delete them as well.
Auth: APIKeyHeader
Request-Body (application/json): userId: string, type: string, keyPrefix: string, keepPermanent: boolean
| Status | Beschreibung |
|---|---|
| 200 | Number of deleted entries |
GET /api/external/supervisor/chats
Get all supervisor chats for this bot, grouped by user (scope supervisor:read). SocketEvents are excluded.
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of supervisor chats |
| 403 | Missing scope |
GET /api/external/supervisor/chats/{userId}
Get the supervisor chat of a single user of this bot (scope supervisor:read). SocketEvents are excluded.
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | The user's supervisor chat |
| 403 | Missing scope |
GET /api/external/supervisor/users
Get all users of this bot that have at least one supervisor-enabled history item (scope supervisor:read)
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of users |
| 403 | Missing scope |
POST /api/external/useraccess/resetstats
Reset usage stats for a user
Auth: APIKeyHeader
Request-Body (application/json): userId: string
| Status | Beschreibung |
|---|---|
| 200 | Stats reset |
| 403 | Reset failed |
POST /api/external/useraccess/user
Create a user
Auth: APIKeyHeader
Request-Body (application/json): object
| Status | Beschreibung |
|---|---|
| 200 | Created user |
| 403 | Creation failed (e.g. missing guestId) |
PUT /api/external/useraccess/user
Update a user
Auth: APIKeyHeader
Request-Body (application/json): object
| Status | Beschreibung |
|---|---|
| 200 | Updated user |
| 403 | Update failed (e.g. guestId already in list) |
GET /api/external/useraccess/user/byGuestId/{guestId}
Get user by guest ID
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
guestId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | User object |
GET /api/external/useraccess/user/byId/{userId}
Get user by ID
Auth: APIKeyHeader
| Parameter | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
userId | path | ✔ | string |
| Status | Beschreibung |
|---|---|
| 200 | User object |
GET /api/external/useraccess/user/usersinorg
Get all users in the token's organisation
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of bots in the organisation with their selectable users |
GET /api/external/useraccess/users
Get all users for this bot
Auth: APIKeyHeader
| Status | Beschreibung |
|---|---|
| 200 | Array of users |
DELETE /api/external/useraccess/users
Delete multiple users
Auth: APIKeyHeader
Request-Body (application/json): userIds: string[]
| Status | Beschreibung |
|---|---|
| 200 | Users deleted |