Skip to main content

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

StatusBeschreibung
200The bot (API keys are masked)
404Bot 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

StatusBeschreibung
200The updated bot (API keys are masked)
404Bot not found
422Invalid 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"

StatusBeschreibung
200Bot deleted, archived or trashed
404Bot 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

StatusBeschreibung
200Array 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

StatusBeschreibung
200The newly created bot (API keys are masked)
404Bot not found

GET /api/external/bot/embedding

List all website-crawls of the token's own bot (scope embedding:read)

Auth: APIKeyHeader

StatusBeschreibung
200Array 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

StatusBeschreibung
200The created (or already-running) crawl
422Invalid 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

ParameterInPflichtTypBeschreibung
scrapeIdpathstring
StatusBeschreibung
200The website-crawl, including its scraped pages
404Website-crawl not found

PUT /api/external/bot/embedding/{scrapeId}

Update a website-crawl of the token's own bot (scope embedding:write)

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
scrapeIdpathstring

Request-Body (application/json): description: string, active: boolean, skillId: string, name: string

StatusBeschreibung
200The updated website-crawl
404Website-crawl not found
422Invalid or missing fields

DELETE /api/external/bot/embedding/{scrapeId}

Delete a website-crawl of the token's own bot (scope embedding:write)

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
scrapeIdpathstring
StatusBeschreibung
200Website-crawl deleted
404Website-crawl not found

GET /api/external/bot/feedback

Read message feedback of the token's own bot (scope stats:read)

Auth: APIKeyHeader

StatusBeschreibung
200Array of message feedback entries

GET /api/external/bot/fusion

List all Fusion-Views of the token's own bot (scope fusion:read)

Auth: APIKeyHeader

StatusBeschreibung
200Array 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

StatusBeschreibung
200The newly created Fusion-View
422Invalid 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

ParameterInPflichtTypBeschreibung
fusionIdpathstring
StatusBeschreibung
200The Fusion-View
404Fusion-View not found

PUT /api/external/bot/fusion/{fusionId}

Partially update a Fusion-View's metadata (scope fusion:write)

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
fusionIdpathstring

Request-Body (application/json): object

StatusBeschreibung
200The updated Fusion-View
404Fusion-View not found
422Invalid 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

ParameterInPflichtTypBeschreibung
fusionIdpathstring
StatusBeschreibung
200Fusion-View deleted
404Fusion-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

ParameterInPflichtTypBeschreibung
fusionIdpathstring

Request-Body (multipart/form-data): file: string

StatusBeschreibung
200The updated Fusion-View file entry
404Fusion-View not found
415Upload 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

StatusBeschreibung
200Array 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

StatusBeschreibung
200The newly created skill
409name or skillId already used by another Wenn-Dann rule of this bot
422Invalid 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

ParameterInPflichtTypBeschreibung
skillIdpathstring
StatusBeschreibung
200The skill
404Skill not found

PUT /api/external/bot/skills/{skillId}

Partially update a Wenn-Dann rule (scope skills:write)

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
skillIdpathstring

Request-Body (application/json): name: string, skillId: string, description: string, enabled: boolean, content: string, params: object[], toolCallAnswer: string[], answerMode: "sequence" | "sequenceloop" | "random"

StatusBeschreibung
200The updated skill
404Skill not found
409name or skillId already used by another Wenn-Dann rule of this bot
422Invalid 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

ParameterInPflichtTypBeschreibung
skillIdpathstring
StatusBeschreibung
200Skill deleted
404Skill not found

GET /api/external/bot/stages

List all stages of the token's own bot (scope stages:read)

Auth: APIKeyHeader

StatusBeschreibung
200Array 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

StatusBeschreibung
200The newly created stage
422Invalid or unknown fields

GET /api/external/bot/stages/{stageId}

Get a single stage of the token's own bot (scope stages:read)

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
stageIdpathstring
StatusBeschreibung
200The stage
404Stage not found

PUT /api/external/bot/stages/{stageId}

Partially update a stage (scope stages:write)

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
stageIdpathstring

Request-Body (application/json): title: string, name: string, hidden: boolean, footer: boolean, forceSkills: boolean, skills: string[], enterJS: string, exitJS: string, preConditionJS: string

StatusBeschreibung
200The updated stage
404Stage not found
422Invalid or unknown fields, or no fields provided

DELETE /api/external/bot/stages/{stageId}

Delete a stage (scope stages:write)

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
stageIdpathstring
StatusBeschreibung
200Stage deleted
404Stage not found

GET /api/external/bot/usage

Read usage/token statistics of the token's own bot (scope stats:read)

Auth: APIKeyHeader

StatusBeschreibung
200Array of usage stats (chat completions, TTS, HeyGen)

GET /api/external/checkauth

Verify external API token

Auth: APIKeyHeader

StatusBeschreibung
200Validated 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

ParameterInPflichtTypBeschreibung
userIdquerystringFilter by user ID
typequerystringFilter by entry type
keyquerystringExact key match (mutually exclusive with keyPrefix)
keyPrefixquerystringKey starts-with filter (mutually exclusive with key)
StatusBeschreibung
200Array of KeyVal entries (enriched with guestId)

GET /api/external/keyval/{userId}

List all key-value entries for a specific user

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
userIdpathstring
typequerystring
keyPrefixquerystring
StatusBeschreibung
200Array 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

ParameterInPflichtTypBeschreibung
userIdpathstring
typequerystring
keyPrefixquerystring
keepPermanentqueryboolean
StatusBeschreibung
200Number of deleted entries

GET /api/external/keyval/{userId}/{type}/{key}

Get a single key-value entry

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
userIdpathstring
typepathstring
keypathstring
StatusBeschreibung
200KeyVal entry
404Entry 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

ParameterInPflichtTypBeschreibung
userIdpathstring
typepathstring
keypathstring

Request-Body (application/json): value: unknown

StatusBeschreibung
200Updated or created entry
403Key is read-only (starts with "!")

DELETE /api/external/keyval/{userId}/{type}/{key}

Delete a single key-value entry

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
userIdpathstring
typepathstring
keypathstring
StatusBeschreibung
200Entry deleted
404Entry 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

StatusBeschreibung
200Number 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

StatusBeschreibung
200Array of supervisor chats
403Missing 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

ParameterInPflichtTypBeschreibung
userIdpathstring
StatusBeschreibung
200The user's supervisor chat
403Missing 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

StatusBeschreibung
200Array of users
403Missing scope

POST /api/external/useraccess/resetstats

Reset usage stats for a user

Auth: APIKeyHeader

Request-Body (application/json): userId: string

StatusBeschreibung
200Stats reset
403Reset failed

POST /api/external/useraccess/user

Create a user

Auth: APIKeyHeader

Request-Body (application/json): object

StatusBeschreibung
200Created user
403Creation failed (e.g. missing guestId)

PUT /api/external/useraccess/user

Update a user

Auth: APIKeyHeader

Request-Body (application/json): object

StatusBeschreibung
200Updated user
403Update failed (e.g. guestId already in list)

GET /api/external/useraccess/user/byGuestId/{guestId}

Get user by guest ID

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
guestIdpathstring
StatusBeschreibung
200User object

GET /api/external/useraccess/user/byId/{userId}

Get user by ID

Auth: APIKeyHeader

ParameterInPflichtTypBeschreibung
userIdpathstring
StatusBeschreibung
200User object

GET /api/external/useraccess/user/usersinorg

Get all users in the token's organisation

Auth: APIKeyHeader

StatusBeschreibung
200Array of bots in the organisation with their selectable users

GET /api/external/useraccess/users

Get all users for this bot

Auth: APIKeyHeader

StatusBeschreibung
200Array of users

DELETE /api/external/useraccess/users

Delete multiple users

Auth: APIKeyHeader

Request-Body (application/json): userIds: string[]

StatusBeschreibung
200Users deleted