Lunnoa Automate API (Public)
Spec version 1.0
Stable HTTP contract for Lunnoa Automate. Authenticate with a workspace API key (`lna_…`) or a user JWT. For an interactive explorer, open Swagger at /docs on your deployment.
Projects
/api/projectsCreate a project in current workspace
Creates a project in the current workspace. Projects are organisational containers accessible to all workspace users.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, workflows, createdByWorkspaceUser, countAgents, countVariables, countWorkflows |
Responses
201The created project.
/api/projectsList projects in current workspace
Returns all projects in the current workspace, ordered by most recently updated.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, workflows, createdByWorkspaceUser, countAgents, countVariables, countWorkflows |
Responses
200Projects in the workspace.
/api/projects/{projectId}Get project by ID
Returns a single project.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| projectId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, workflows, createdByWorkspaceUser, countAgents, countVariables, countWorkflows |
Responses
200The requested project.
Discovery
/api/discovery/enabled-featuresGet enabled workspace features
Returns the feature flags for this deployment, letting a custom UI adapt to the features that are enabled. Flags reflect the current server configuration, such as storage, vector database, email and SSO settings.
Responses
200The enabled feature flags for this deployment.
Workflows
/api/workflowsList workflows in current workspace
Returns the workflows in the current workspace, most recently updated first. By default only the ID and name are returned per item; use the expansion query parameter to include further fields.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| includeType | query | string | no | Comma-separated inclusion flags. Available: all, internal. Pass internal to include internal workflows, which are excluded by default. |
| filterBy | query | string | no | Comma-separated key:value filters. Available: projectId, agentCanTrigger. Example: filterBy=projectId:proj_123 |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, isActive, isInternal, description, project, nodes, edges, triggerNode, triggerAndActionIds, pollStorage, nextScheduledExecution, orientation. Example: expansion=description,isActive,project |
Responses
200List of workflows. Fields beyond the ID and name are included according to the expansion query parameter.
/api/workflows/{workflowId}Get workflow by ID
Returns a single workflow. By default only the ID and name are returned; use the expansion query parameter to include further fields.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workflowId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, isActive, isInternal, description, project, nodes, edges, triggerNode, triggerAndActionIds, subWorkflowIds, agentIds, pollStorage, nextScheduledExecution, orientation. Example: expansion=description,nodes,edges |
Responses
200The workflow. Fields beyond the ID and name are included according to the expansion query parameter.
Workflow Apps
/api/workflow-appsList all workflow apps
Returns the full catalogue of app definitions, including their actions and triggers. Custom UIs use this catalogue to resolve executionPath step appId/actionId pairs to names and icons. Each action and trigger exposes declarative UI metadata (inputConfig) describing its configuration fields.
Responses
200All workflow app definitions.
/api/workflow-apps/{appId}/connections/{connectionId}/connectConnect workflow app
Creates a connection for an app using non-interactive credentials such as an API key or basic auth username and password. OAuth2 connection types require the interactive browser flow and cannot be created through this endpoint with machine credentials.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| appId | path | string | yes | |
| connectionId | path | string | yes |
Responses
200Result of the connection attempt, written by the app connection handler.
Executions
/api/executions/workflows/{workflowId}/executeManually execute workflow by ID
Starts a new execution of the workflow immediately. The workflow must be active and use a manual or scheduled trigger strategy. The optional inputData object supplies values for the custom input fields configured on the workflow "Manually Run" trigger.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workflowId | path | string | yes |
Responses
201The newly created execution. Only the execution ID is returned; poll GET /executions/{executionId} to track progress.
/api/executionsList executions in current workspace
Returns the executions in the current workspace, most recently started first. By default only the execution ID is returned per item; use the expansion query parameter to include further fields.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| includeType | query | string | no | Comma-separated inclusion flags. Available: all, internal. Pass internal to include executions of internal workflows, which are excluded by default. |
| filterBy | query | string | no | Comma-separated key:value filters. Available: projectId, workflowId. Example: filterBy=workflowId:wf_123 |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, startedAt, stoppedAt, executionNumber, nodes, edges, status, statusMessage, continueExecutionAt, workflow, project, workspace, output, orientation, executionVariables. The executionPath expansion is only honoured on GET /executions/{executionId}. Example: expansion=status,startedAt,workflow |
Responses
200List of executions. Fields beyond the ID are included according to the expansion query parameter.
/api/executions/{executionId}Get execution by ID
Returns a single execution. The ID and startedAt timestamp are always returned; use the expansion query parameter to include further fields. Request the executionPath expansion to receive the business-readable step list (step labels, per-step status including NEEDS_INPUT, timings, and loop iterations) that custom UIs render progress from.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| executionId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, startedAt, stoppedAt, executionNumber, nodes, edges, status, statusMessage, continueExecutionAt, workflow, project, workspace, output, orientation, executionVariables, executionPath. executionPath is the derived, ordered list of executed (or queued) steps with labels, per-step status, timings, and loop iteration metadata. Example: expansion=status,executionPath |
Responses
200The execution. Fields beyond the ID and startedAt are included according to the expansion query parameter.
Variables
/api/variablesCreate variable in current workspace
Creates a variable in the current workspace. Provide projectId to scope the variable to a project.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project |
Responses
201The created variable.
/api/variablesList variables in current workspace
Returns all variables in the current workspace, ordered by most recently updated.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| includeType | query | string | no | Comma-separated include flags. Available: all |
| filterBy | query | string | no | Comma-separated key:value filters. Available: projectId (variables owned by the project), projectAccessId (variables the project can access, including workspace-wide ones). Example: filterBy=projectId:abc123 |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project |
Responses
200Variables in the workspace.
/api/variables/{variableId}Get variable by ID
Returns a single variable.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| variableId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project |
Responses
200The requested variable.
/api/variables/{variableId}Update variable by ID
Updates variable properties. All body fields are optional; only provided fields are changed.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| variableId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project |
Responses
200The updated variable.
/api/variables/{variableId}Delete variable by ID
Deletes a variable. This action cannot be undone.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| variableId | path | string | yes |
Responses
200Returns true when the variable was deleted.
Connections
/api/connectionsList connections in current workspace
Returns all connections available to the current user: OAuth connections belonging to the workspace and managed connections assigned to the user. Credential values are never returned.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| includeType | query | string | no | Comma-separated include flags. Available: all |
| filterBy | query | string | no | Comma-separated key:value filters. Available: workflowAppId. Example: filterBy=workflowAppId:gmail |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, connectionId, workflowAppId, workflowApp, workspace. Credentials are never returned. |
Responses
200Connections available in the workspace.
/api/connections/{connectionId}Get connection by ID
Returns a single connection. Credential values are never returned.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| connectionId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, connectionId, workflowAppId, workflowApp, workspace. Credentials are never returned. |
Responses
200The requested connection.
Webhooks
/api/webhooks/workflows/{workflowId}Trigger workflow via custom webhook (POST)
Unauthenticated workflow trigger. The workflow must have a webhook trigger configured. The JSON request body and headers are forwarded to the trigger. When the workflow responds synchronously, the response body contains the output of the webhook trigger; otherwise the body is empty.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workflowId | path | string | yes |
Responses
200The output of the webhook trigger when the workflow responds synchronously; empty otherwise.
/api/webhooks/workflows/{workflowId}Trigger workflow via custom webhook (PUT)
Unauthenticated workflow trigger. The workflow must have a webhook trigger configured. The JSON request body and headers are forwarded to the trigger. When the workflow responds synchronously, the response body contains the output of the webhook trigger; otherwise the body is empty.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workflowId | path | string | yes |
Responses
200The output of the webhook trigger when the workflow responds synchronously; empty otherwise.
/api/webhooks/workflows/{workflowId}Trigger workflow via custom webhook (GET)
Unauthenticated workflow trigger. The workflow must have a webhook trigger configured. Query parameters and headers are forwarded to the trigger as the payload. When the workflow responds synchronously, the response body contains the output of the webhook trigger; otherwise the body is empty.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workflowId | path | string | yes |
Responses
200The output of the webhook trigger when the workflow responds synchronously; empty otherwise.
/api/webhooks/executions/{executionId}/nodes/{nodeId}/inputSubmit input to a workflow execution step
Unauthenticated endpoint implementing the pause-for-user-input pattern: it resumes an execution paused in the NEEDS_INPUT status by submitting values for the node that is waiting. Identify the waiting node via the executionPath expansion on GET /executions/{executionId} (steps with status NEEDS_INPUT). The endpoint acknowledges receipt immediately and the execution resumes asynchronously.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| executionId | path | string | yes | |
| nodeId | path | string | yes |
Responses
200Acknowledgement that the input was received. The execution resumes asynchronously; poll GET /executions/{executionId} to track progress.
Queues
/api/queuesCreate queue
Creates a queue in the given project. Queues are the platform's human-in-the-loop work surface: items are added to a queue, then processed by workflows or reviewed by people.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| projectId | query | string | yes | ID of the project the queue belongs to. |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts. |
Responses
201The newly created queue.
/api/queuesList queues in workspace
Lists queues across the workspace, ordered by priority then creation date. Queues are the platform's human-in-the-loop work surface. Configuration fields (maxRetries, retryDelayMinutes, batchSize) are not included in list responses.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| filterBy | query | string | no | Comma-separated key:value filter pairs. Available keys: projectId, isActive, search, priority. |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts. |
| includeType | query | string | no | Comma-separated include flags. Available: deleted (include soft-deleted queues). |
Responses
200Queues in the workspace.
/api/queues/{queueId}Get queue by ID
Returns a single queue with its configuration.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts. |
| includeType | query | string | no | Comma-separated include flags. Available: deleted (include soft-deleted queues). |
Responses
200The requested queue.
/api/queues/{queueId}Update queue
Updates queue configuration such as name, retry behaviour, batch size, priority, and active state.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts. |
| includeType | query | string | no | Comma-separated include flags. Available: deleted (include soft-deleted queues). |
Responses
200The updated queue.
/api/queues/{queueId}Delete queue
Soft-deletes the queue and deactivates it. Items are retained.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes |
Responses
200Confirmation that the queue was deleted.
/api/queues/{queueId}/statsGet queue statistics
Returns item counts for the queue broken down by processing status.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes |
Responses
200Item counts by status for the queue.
/api/queues/{queueId}/activateActivate queue
Marks the queue as active so its items can be processed.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts. |
Responses
200The activated queue.
/api/queues/{queueId}/deactivateDeactivate queue
Marks the queue as inactive, pausing processing of its items.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts. |
Responses
200The deactivated queue.
Queue Items
/api/queues/{queueId}/itemsCreate queue item
Adds an item to the queue for processing or human review. If an externalId is supplied and an item with the same externalId already exists, the existing item is returned with isDuplicate set to true.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
201The created queue item, or the existing item when a duplicate externalId was found.
/api/queues/{queueId}/itemsList queue items
Lists items in the queue with pagination, ordered by priority then creation date. Queues are the platform's human-in-the-loop work surface, so this is the primary endpoint for building review interfaces.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| limit | query | number | no | Maximum number of items to return. |
| offset | query | number | no | Number of items to skip for pagination. |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
| filterBy | query | string | no | Comma-separated key:value filter pairs. Available keys: status, externalId, priority, scheduledFor, search, createdAfter, createdBefore. |
Responses
200A page of queue items with pagination details.
/api/queues/{queueId}/items/bulkBulk create queue items
Creates multiple queue items in one request. Duplicate handling is controlled by the options field: skip duplicates, update existing items, or return them unchanged.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
201Created and existing items, with summary counts for the operation.
/api/queues/{queueId}/items/bulkBulk update queue items
Applies the same field updates to every listed item in the queue.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
200The updated queue items.
/api/queues/{queueId}/items/bulkBulk delete queue items
Permanently deletes the listed items from the queue. Items that fail to delete are skipped and the response reports the deleted count.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes |
Responses
200Counts of deleted and requested items.
/api/queues/{queueId}/items/readyList ready queue items
Returns items that are ready for processing: pending items whose scheduled time has passed (or that have no schedule), and retrying items whose retry time has arrived. Intended for workers pulling batches of work.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| limit | query | number | no | Maximum number of items to return. |
| priority | query | number | no | Only return items with at least this priority. |
Responses
200Queue items ready for processing.
/api/queues/{queueId}/items/retryList queue items needing retry
Returns items in RETRYING status whose next retry time has arrived.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| limit | query | number | no | Maximum number of items to return. |
Responses
200Queue items due for a retry attempt.
/api/queues/{queueId}/items/status/{status}List queue items by status
Lists items in the queue that are in the given processing status, with pagination.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| status | path | string | yes | Processing status to filter by. |
| limit | query | number | no | Maximum number of items to return. |
| offset | query | number | no | Number of items to skip for pagination. |
Responses
200A page of queue items in the requested status.
/api/queues/{queueId}/items/external/{externalId}Get queue item by external ID
Looks up a queue item by the external identifier supplied when it was created.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| externalId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
200The queue item with the given external ID.
/api/queues/{queueId}/items/searchSearch queue items
Searches items in the queue. The search filter matches against externalId, item data, and metadata; other filters behave as in the list endpoint.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| limit | query | number | no | Maximum number of items to return. |
| offset | query | number | no | Number of items to skip for pagination. |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
| filterBy | query | string | no | Comma-separated key:value filter pairs. Available keys: status, externalId, priority, scheduledFor, search, createdAfter, createdBefore. |
Responses
200A page of matching queue items with pagination details.
/api/queues/{queueId}/items/statsGet queue item statistics
Returns aggregate statistics for the queue's items: counts by status and priority band, average processing time, and retry rate.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes |
Responses
200Aggregate statistics for the queue's items.
/api/queues/{queueId}/items/{itemId}Get queue item by ID
Returns a single queue item.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
200The requested queue item.
/api/queues/{queueId}/items/{itemId}Update queue item
Updates item fields such as data, priority, retry configuration, schedule, and metadata.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
200The updated queue item.
/api/queues/{queueId}/items/{itemId}Delete queue item
Permanently deletes the item from the queue.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes |
Responses
200Confirmation that the item was deleted.
/api/queues/{queueId}/items/{itemId}/errorsGet queue item error history
Returns the chronological list of errors recorded against the item.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes |
Responses
200Error history entries for the queue item.
/api/queues/{queueId}/items/{itemId}/statusUpdate queue item status
Transitions the item to a new processing status. Only valid transitions are accepted; invalid transitions return a 400 error. Moving to FAILED or RETRYING records the supplied error message.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
200The queue item after the status transition.
/api/queues/{queueId}/items/{itemId}/link-executionLink execution to queue item
Associates a workflow execution with the item so processing outcomes can be traced.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
200The queue item with the linked execution.
/api/queues/{queueId}/items/{itemId}/retryRetry queue item
Manually requeues a FAILED item by transitioning it to RETRYING. Fails with a 400 error if the item is not in FAILED status or has exhausted its retry attempts.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
201The queue item transitioned to RETRYING.
/api/queues/{queueId}/items/{itemId}/errorAdd error to queue item
Records an error against the item. If the item is currently PROCESSING it transitions to RETRYING, or to FAILED once retry attempts are exhausted.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| queueId | path | string | yes | |
| itemId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor). |
Responses
201The queue item after the error was recorded.
Agents
/api/agentsList agents in current workspace
Lists every agent in the caller's active workspace, most recently updated first. By default each item carries only `id`, `name`, and `FK_aiConnectionId`; request additional fields with the `expansion` query parameter.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| includeType | query | string | no | Comma-separated include flags, e.g. `includeType=all`. Available: all |
| filterBy | query | string | no | Filters in `key:value` format, comma-separated, e.g. `filterBy=projectId:<uuid>`. Available: projectId |
| expansion | query | string | no | Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, profileImageUrl, instructions, temperature, maxOutputTokens, topP, frequencyPenalty, presencePenalty, maxRetries, seed, maxToolRoundtrips, messageLookbackLimit, project, tools, toolIds, knowledge, objects, objectTypes, connections, variables, workflows, subAgents, webAccess, phoneAccess, aiConnection, selectedModelId, persona, taskNamingInstructions, enabledBuiltInTools, enabledPlatformTools, mcpServers, a2aAgents, dynamicActionDiscoveryEnabled, dynamicMcpDiscoveryEnabled, dynamicSelfInstructionsEnabled, memoryEnabled, memoryScope, memoryRetentionDays, suggestedPrompts, builderSetupCompletedAt, builderCanvasPositions |
Responses
200Agents in the current workspace
/api/agents/{agentId}Get agent by ID
Returns a single agent. By default only `id`, `name`, and `FK_aiConnectionId` are returned; request additional fields with the `expansion` query parameter. Access is gated by the `agents:use` permission, so agents reachable via a share grant can also be fetched.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agentId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, profileImageUrl, instructions, temperature, maxOutputTokens, topP, frequencyPenalty, presencePenalty, maxRetries, seed, maxToolRoundtrips, messageLookbackLimit, project, tools, toolIds, knowledge, objects, objectTypes, connections, variables, workflows, subAgents, webAccess, phoneAccess, aiConnection, selectedModelId, persona, taskNamingInstructions, enabledBuiltInTools, enabledPlatformTools, mcpServers, a2aAgents, dynamicActionDiscoveryEnabled, dynamicMcpDiscoveryEnabled, dynamicSelfInstructionsEnabled, memoryEnabled, memoryScope, memoryRetentionDays, suggestedPrompts, builderSetupCompletedAt, builderCanvasPositions |
Responses
200The requested agent
Tasks
/api/tasksList tasks in current workspace
Lists tasks visible to the caller, most recently updated first. Builders see every task for agents in the active workspace; grant-only callers see only the conversations they own. By default each item carries only `id`, `name`, and `isStreaming`; request additional fields with the `expansion` query parameter.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| includeType | query | string | no | Comma-separated include flags, e.g. `includeType=all`. Available: all |
| filterBy | query | string | no | Filters in `key:value` format, comma-separated, e.g. `filterBy=agentId:<uuid>`. Available: projectId, agentId |
| expansion | query | string | no | Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, agent, project, messages, messageCreatedAt, messageUsage, finishReason, customIdentifier |
Responses
200Tasks visible to the caller
/api/tasks/{taskId}Get task by ID
Returns a single task. By default the response carries `id`, `name`, `isStreaming`, `lastActivityAt`, and `latestRun` (plus `activeStreamId` when a resumable stream may still be running); request additional fields, such as the conversation `messages`, with the `expansion` query parameter.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| taskId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand, e.g. `expansion=messages,createdAt`. Available: createdAt, updatedAt, description, agent, project, messages, messageCreatedAt, messageUsage, finishReason, customIdentifier |
Responses
200The requested task
/api/tasks/{taskId}Update task by ID
Updates the task name or description and returns the updated task. By default the response carries `id`, `name`, `isStreaming`, `lastActivityAt`, and `latestRun`; request additional fields with the `expansion` query parameter.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| taskId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand, e.g. `expansion=description,updatedAt`. Available: createdAt, updatedAt, description, agent, project, messages, messageCreatedAt, messageUsage, finishReason, customIdentifier |
Responses
200The updated task
/api/tasks/{taskId}Delete task by ID
Permanently deletes a task and its messages, and returns the deleted task record.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| taskId | path | string | yes |
Responses
200The deleted task record
/api/agents/{agentId}/tasksCreate task for an agent
Creates a task (conversation thread) for an agent. Part of the Agent Runtime API; access is gated by the `agents:use` permission. When `customIdentifier` matches an existing task for the agent, that task is returned instead of creating a new one. The response carries `id`, `name`, `isStreaming`, `lastActivityAt`, and `latestRun` by default; request additional fields with the `expansion` query parameter.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agentId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, agent, project, messages, messageCreatedAt, messageUsage, finishReason, customIdentifier |
Responses
201The created (or deduplicated existing) task
/api/agents/{agentId}/tasks/{taskId}/messageSend message to agent task (non-streaming)
Sends a message to an agent task and waits for the full agent turn to finish before responding. Part of the Agent Runtime API; access is gated by the `agents:use` permission. Creates the task row when `taskId` does not exist yet. Messages use the AI SDK UIMessage format. Consumer (grant-based) callers are subject to a per-grant hourly message cap (429 when exceeded).
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| taskId | path | string | yes | |
| agentId | path | string | yes |
Responses
200The completed agent turn: either a plain text response or the assistant messages in AI SDK UIMessage format
/api/agents/{agentId}/tasks/{taskId}/stream-messageResume agent task SSE stream after disconnect
Reattaches to an in-flight agent turn after a client disconnect. Part of the Agent Runtime API; access is gated by the `agents:use` permission. Responds with `text/event-stream` (SSE) carrying AI SDK UIMessage chunk parts from the resumable stream, replaying from the beginning of the turn. Returns 204 when there is no active stream to resume.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| taskId | path | string | yes |
Responses
200SSE stream of the in-flight agent turn, replayed via the resumable stream204No active stream to resume
/api/agents/{agentId}/tasks/{taskId}/stream-messageSend message to agent task (streaming)
Sends a message to an agent task and streams the assistant response as `text/event-stream` (SSE) using the AI SDK UIMessage chunk format. Part of the Agent Runtime API; access is gated by the `agents:use` permission. Creates the task row when `taskId` does not exist yet. Streams are resumable: after a disconnect, reattach with `GET /agents/:agentId/tasks/:taskId/stream-message` (which returns 204 when there is nothing to resume). When a stream is already active for the task, the connection attaches as a follower of the in-flight turn. Consumer (grant-based) callers are subject to a per-grant hourly message cap (429 when exceeded).
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| taskId | path | string | yes | |
| agentId | path | string | yes |
Responses
200SSE stream of the agent turn in AI SDK UIMessage chunk format
/api/agents/{agentId}/tasks/{taskId}/stream-message/stopStop active agent task stream
Requests cancellation of the active agent turn for a task. Part of the Agent Runtime API; access is gated by the `agents:use` permission. Optionally persists the partial assistant message (AI SDK UIMessage format) received so far so it is not lost. Idempotent: returns success even when no stream is active.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| taskId | path | string | yes |
Responses
201Cancellation was requested (or no stream was active)
Knowledge
/api/knowledgeCreate knowledge base
Creates a workspace-wide knowledge base with a dedicated vector index. Embedding model, provider and dimensions default to the platform configuration when omitted.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions |
Responses
201The created knowledge base.
/api/knowledgeList knowledge bases in workspace
Returns all knowledge bases in the current workspace, ordered by most recently updated.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions |
Responses
200Knowledge bases in the workspace.
/api/knowledge/{knowledgeId}Get knowledge base by ID
Returns a single knowledge base.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| knowledgeId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions |
Responses
200The requested knowledge base.
/api/knowledge/{knowledgeId}Update knowledge base
Updates knowledge base properties. All body fields are optional; only provided fields are changed.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| knowledgeId | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions |
Responses
200The updated knowledge base.
/api/knowledge/{knowledgeId}Delete knowledge base
Deletes a knowledge base, its stored files and its vector index. This action cannot be undone.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| knowledgeId | path | string | yes |
Responses
200Returns true when the knowledge base was deleted.
/api/knowledge/{knowledgeId}/saveUploadedTextSave uploaded text to knowledge base
Chunks the provided text, generates embeddings and stores them in the knowledge base. Multi-chunk uploads are grouped into a single document.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| knowledgeId | path | string | yes |
Responses
201Returns true when the text was embedded and stored.
/api/knowledge/{knowledgeId}/documentsList documents for knowledge base
Returns a grouped document view of the knowledge base. Multi-part uploads appear as a single group document; single-part uploads appear as standalone documents.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| knowledgeId | path | string | yes |
Responses
200Documents in the knowledge base, newest first.
/api/knowledge/{knowledgeId}/documents/{groupId}Get knowledge document group
Returns a document group with all of its parts (vector references), ordered by part number.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| groupId | path | string | yes |
Responses
200The requested document group.
/api/knowledge/{knowledgeId}/documents/{groupId}Delete knowledge document group
Deletes a document group and all of its parts, including stored files and vector index entries. This action cannot be undone.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| knowledgeId | path | string | yes | |
| groupId | path | string | yes |
Responses
200Returns true when the document group was deleted.
Entities
/api/objectsCreate a new entity
Creates an entity of the given type. When no state is supplied, the initial state from the entity type state schema is applied automatically.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| expansion | query | string | no | Comma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory. |
Responses
201The newly created entity.
/api/objectsGet all entities for workspace with filtering
Returns a paginated list of entities in the workspace, optionally filtered by type, state, owner or a name search.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| objectTypeId | query | string | no | Filter by entity type ID. |
| objectTypeSlug | query | string | no | Filter by entity type slug. |
| state | query | string | no | Filter by a single state ID. |
| states | query | string | no | Filter by multiple state IDs, supplied as a comma-separated list. |
| ownerId | query | string | no | Filter by owner workspace user ID. |
| search | query | string | no | Case-insensitive search on the entity name. |
| sortBy | query | string | no | Field to sort by (for example name, createdAt, updatedAt). Defaults to updatedAt. |
| sortOrder | query | string | no | Sort direction. Defaults to asc when sortBy is supplied. |
| page | query | number | no | Page number (1-based). Defaults to 1. |
| pageSize | query | number | no | Items per page. Defaults to 25, capped at 100. |
| expansion | query | string | no | Comma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory. |
Responses
200Paginated list of entities.
/api/objects/{id}Get entity by ID
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory. |
Responses
200The requested entity.
/api/objects/{id}Update entity
Partially updates an entity. Supplied attributes are merged into the existing attribute values; fields not supplied are left unchanged.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory. |
Responses
200The updated entity.
/api/objects/{id}Delete entity (soft delete)
Soft deletes the entity. It no longer appears in reads or lists but its data is retained and can be restored.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes |
Responses
200True when the entity was soft deleted.
/api/objects/{id}/stateChange entity state
Moves the entity to a new state. When the entity type defines transitions, the change must be a valid transition from the current state, a reason is required where the transition demands one, and any fields required by the target state must be populated. Every change is recorded in the state history.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes |
Responses
201The entity after the state change.
/api/objects/{id}/state/historyGet entity state history
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | |
| limit | query | number | no | Maximum number of history entries to return. Defaults to 50. |
Responses
200State changes for the entity, newest first.
/api/objects/{id}/state/transitionsGet valid state transitions for entity
Returns the current state, the transitions allowed from it, and all states defined by the entity type. When the type has no state schema, all three are empty.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes |
Responses
200Current state, valid transitions and all defined states.
/api/objects/importImport entities from CSV/Excel data
Imports pre-parsed rows into an entity type. Each column mapping routes a source column to a target field; map a column to "name" (or "entityName") to set the entity name, which is required. With updateExisting and matchField set, rows matching an existing entity on that attribute update it instead of creating a new one. Failed rows are reported per row without aborting the import.
Responses
201Summary of the import, including per-row errors.
/api/objects/exportExport entities to CSV/Excel format
Returns entities of a type as flat JSON rows ready to be rendered as CSV or Excel by the caller. Each row always contains id, name, state, createdAt and updatedAt, plus the requested attribute fields. The format field records the intended file format only; the response itself is always JSON.
Responses
201Flat export rows. Each row contains id, name, state, createdAt, updatedAt, the requested attribute fields, and ownerName when includeRelatedEntityNames is true.
/api/objects/import/template/{entityTypeId}Get import template for entity type
Returns the column headers and a sample row for importing entities of the given type. The name column is always first and required.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| entityTypeId | path | string | yes |
Responses
200Import template columns and sample row.
Entity Types
/api/object-typesGet all entity types for workspace
Returns entity types in the workspace, sorted by name. Disabled types are excluded unless includeDisabled is true.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| includeDisabled | query | boolean | no | Set to true to include disabled entity types. |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, attributeSchema, stateSchema, createdAt, updatedAt, createdBy, countObjects. |
Responses
200Entity types in the workspace.
/api/object-types/slug/{slug}Get entity type by slug
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| slug | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, attributeSchema, stateSchema, createdAt, updatedAt, createdBy, countObjects. |
Responses
200The requested entity type.
/api/object-types/{id}Get entity type by ID
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | |
| expansion | query | string | no | Comma-separated fields to expand. Available: description, attributeSchema, stateSchema, createdAt, updatedAt, createdBy, countObjects. |
Responses
200The requested entity type.