Skip to main content

Applications API

Applications, their environments, and allowed websites.

📄️Request user setup

Returns a structured awaiting-user-input handoff for MCP, website, upload, or environment setup. This does not save settings or open a remote browser. Clients render a local form or direct the user to settingsPath. Complete setup through the existing application MCP, allowed-websites, environments, or document upload APIs, then resume the conversation with a non-secret completion message. Never send secret values in reason or variableNames. Requires application write access.

📄️Update application

Updates one or more of the application name, description, group and settings. `settings` takes every application-level setting: capability toggles (`codeExecutionEnabled`, `skillsEnabled`, ...), model pins (`agentDefaultModel`, `assistantModel`, ...), attachment, document template and retrieval knobs, the concurrent-execution limit (`maxConcurrentExecutions`), whether the assistant answers only from the application knowledge (`assistantKnowledgeOnly`), and the persona and tone of voice (`persona`: a preset, six voice trait levels, and free-text voice notes; `null` or the `neutral` preset clears it). On the other settings `null` removes the application value so the company value applies again. Omitted fields are preserved. Settings read back from `metadata.settings`. Requires write access. `maxConcurrentExecutions` and the model pins (`agentDefaultModel`, `agentLiteModel`, `agentProModel`, `assistantModel`, `documentTemplateModelName`, `evaluationModel`, `smartAssertionModel`, `retrievalRerankModel`) are super admin only: from anyone else a body that sets or clears one is rejected whole with 403 `settings/super-admin-only`, `details.keys` naming them, and nothing is written.

📄️Register message template

Accepts a generic text definition `{ type: 'text', name, language: { code: 'pt_BR' }, text: '{{report}}' }` with unrestricted channel `any`, or an existing WhatsApp send payload/bare template with channel `whatsapp`. Generic text supports simple variables and if/unless blocks and renders values literally. A definition that could only ever produce nothing is refused; at send time an empty render publishes nothing and a render past the 256 KiB output cap is truncated. The serialized definition is limited to 65536 bytes. `name` and `language` come from the definition. Re-registering the same application/channel/name replaces and re-enables it. Enabled names duplicated across channels fail explicitly when sent. Requires write access to the application.