Pular para o conteúdo principal

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.

📄️Give person access to application

Adds a person from the caller’s company as a direct member, found by `person`: their email, or their name or part of it. A name that matches several people fails with 409 listing their names and emails, so the caller can ask which one. Someone who already has access, the owner included, is left unchanged (`added: false`); a deactivated membership or a channel contact’s guest access becomes a real one. People outside the company must be invited to it first. Requires write access to the application, as on its members page; the person receives an email saying they were added.

📄️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.