Applications
Applications, their environments, allowed websites, and recommendations.
List applications
Returns only applications the caller can access through ownership, direct membership, or team membership. Non-admin callers always get `ACTIVE` applications, admins can request `ARCHIVED` via `status`. All filters combine with AND.
Create an application
Creates the application owned by the caller and adds the caller as an active `ADMIN` member. Requires company-level permission to write applications.
Get an application
Returns one application in the same item shape as the `GET /api/applications/` list.
List environments of an application
Environments are named sets of key-value variables that agents resolve through `{{env.*}}` placeholders at run time. Values are stored encrypted and returned decrypted here.
Create an application environment
Environment names are unique per application, compared case-insensitively. Variables are encrypted before storage. Requires write access to the application.
Update an application environment
The environment to update is selected by `environmentId` in the request body. Provide `name`, `variables`, or both. A provided `variables` map replaces every existing variable.
Delete an application environment
The environment to delete is selected by `environmentId` in the request body. Agents that still reference the deleted environment resolve their `{{env.*}}` placeholders to empty values.
List allowed websites of an application
Merges the company-level website records with the per-application link, so each row carries the global configuration plus an `enabledForApplication` toggle. Stored passwords are reported through `hasStoredPassword` and the ciphertext is never returned.
Create an allowed website for an application
Creates a company-level allowed website and links it to the application in one call. A plain-text `password` is encrypted before storage. Use `PATCH /api/v1/applications/{id}/allowed-websites/{siteId}/` to toggle the per-application link later.
Get one allowed website of an application
The response replaces stored credentials with a `hasStoredPassword` boolean. The password ciphertext is never returned.
Update an allowed website of an application
Most fields update the company-level record shared by every application, while `enabledForApplication` toggles only the link to this application. `password: null` clears the stored credentials, omitting the field keeps them.
Delete an allowed website
Deletes the company-level record, which removes the website from every application it is linked to, not just the one in the path.
List threads of an application
`limit` is clamped to 100. `threadGroupId` switches to a compact playground-history shape. `format=preview` strips full message content down to a display preview.
Reset the persistent browser context of an application
Discards the stored persistent browser context id, the shared browser profile that carries cookies and auth tokens across `ADVANCED` browser runs, so the next run mints a fresh context and logs in from scratch. Use it when cookies persisted by a failed or expired login break subsequent logins. Idempotent, requires write access to the application.
List pending MCP OAuth connections of an application
Checks the OAuth MCP servers enabled on the application and returns the ones that block the assistant for the calling user, that is servers with a `not_connected` or `expired` connection. Each entry carries a `settingsPath` pointing to the page where the connection can be completed. Connected and expiring-soon servers are excluded.
List recommendations of an application
Returns the recommendation configurations of the application plus pagination metadata (`total`, `page`, `limit`, `totalPages`). Defaults to page 1 with 10 items, sorted by `createdAt` descending.
Create a recommendation for an application
Registers a recommendation that finds documents similar to the seed `inputs`. A scheduler job recalculates it on `updateFrequencyCron`, hourly by default. Use `POST /api/v1/applications/{id}/recommendations/{recommendationId}/trigger/` to run it immediately.
Get a recommendation with enriched results
`recommendationId` accepts the numeric id or the UUID. The stored results are enriched with document metadata, or collection metadata when grouped by collection, before being returned.
Update a recommendation
`recommendationId` accepts the numeric id or the UUID. A provided `inputs` array replaces every existing input, and updating `updateFrequencyCron` reschedules the background job.
Delete a recommendation
`recommendationId` accepts the numeric id or the UUID. Deleting also removes the scheduler job that recalculates the recommendation.
Trigger a recommendation calculation
`mode=sync` calculates and returns enriched results immediately; `mode=async` (default) queues it.
Record a document visit on a recommendation
Stamps `visitedAt` and increments `visitCount` on the matching document input, or appends a new input with `visitCount: 1` when the document is not among the inputs yet. Requires access to both the application and the document.
Remove a document from a recommendation
Removes the matching document input from the recommendation. Returns 404 when the document is not among the inputs.