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

POST/api/projects

Create a project in current workspace

Creates a project in the current workspace. Projects are organisational containers accessible to all workspace users.

NameInTypeRequiredDescription
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, workflows, createdByWorkspaceUser, countAgents, countVariables, countWorkflows

Responses

  • 201The created project.
GET/api/projects

List projects in current workspace

Returns all projects in the current workspace, ordered by most recently updated.

NameInTypeRequiredDescription
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, workflows, createdByWorkspaceUser, countAgents, countVariables, countWorkflows

Responses

  • 200Projects in the workspace.
GET/api/projects/{projectId}

Get project by ID

Returns a single project.

NameInTypeRequiredDescription
projectIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, workflows, createdByWorkspaceUser, countAgents, countVariables, countWorkflows

Responses

  • 200The requested project.

Discovery

GET/api/discovery/enabled-features

Get 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

GET/api/workflows

List 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.

NameInTypeRequiredDescription
includeTypequerystringnoComma-separated inclusion flags. Available: all, internal. Pass internal to include internal workflows, which are excluded by default.
filterByquerystringnoComma-separated key:value filters. Available: projectId, agentCanTrigger. Example: filterBy=projectId:proj_123
expansionquerystringnoComma-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.
GET/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.

NameInTypeRequiredDescription
workflowIdpathstringyes
expansionquerystringnoComma-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

GET/api/workflow-apps

List 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.
POST/api/workflow-apps/{appId}/connections/{connectionId}/connect

Connect 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.

NameInTypeRequiredDescription
appIdpathstringyes
connectionIdpathstringyes

Responses

  • 200Result of the connection attempt, written by the app connection handler.

Executions

POST/api/executions/workflows/{workflowId}/execute

Manually 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.

NameInTypeRequiredDescription
workflowIdpathstringyes

Responses

  • 201The newly created execution. Only the execution ID is returned; poll GET /executions/{executionId} to track progress.
GET/api/executions

List 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.

NameInTypeRequiredDescription
includeTypequerystringnoComma-separated inclusion flags. Available: all, internal. Pass internal to include executions of internal workflows, which are excluded by default.
filterByquerystringnoComma-separated key:value filters. Available: projectId, workflowId. Example: filterBy=workflowId:wf_123
expansionquerystringnoComma-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.
GET/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.

NameInTypeRequiredDescription
executionIdpathstringyes
expansionquerystringnoComma-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

POST/api/variables

Create variable in current workspace

Creates a variable in the current workspace. Provide projectId to scope the variable to a project.

NameInTypeRequiredDescription
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project

Responses

  • 201The created variable.
GET/api/variables

List variables in current workspace

Returns all variables in the current workspace, ordered by most recently updated.

NameInTypeRequiredDescription
includeTypequerystringnoComma-separated include flags. Available: all
filterByquerystringnoComma-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
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project

Responses

  • 200Variables in the workspace.
GET/api/variables/{variableId}

Get variable by ID

Returns a single variable.

NameInTypeRequiredDescription
variableIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project

Responses

  • 200The requested variable.
PATCH/api/variables/{variableId}

Update variable by ID

Updates variable properties. All body fields are optional; only provided fields are changed.

NameInTypeRequiredDescription
variableIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, value, workspace, project

Responses

  • 200The updated variable.
DELETE/api/variables/{variableId}

Delete variable by ID

Deletes a variable. This action cannot be undone.

NameInTypeRequiredDescription
variableIdpathstringyes

Responses

  • 200Returns true when the variable was deleted.

Connections

GET/api/connections

List 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.

NameInTypeRequiredDescription
includeTypequerystringnoComma-separated include flags. Available: all
filterByquerystringnoComma-separated key:value filters. Available: workflowAppId. Example: filterBy=workflowAppId:gmail
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, connectionId, workflowAppId, workflowApp, workspace. Credentials are never returned.

Responses

  • 200Connections available in the workspace.
GET/api/connections/{connectionId}

Get connection by ID

Returns a single connection. Credential values are never returned.

NameInTypeRequiredDescription
connectionIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, connectionId, workflowAppId, workflowApp, workspace. Credentials are never returned.

Responses

  • 200The requested connection.

Webhooks

POST/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.

NameInTypeRequiredDescription
workflowIdpathstringyes

Responses

  • 200The output of the webhook trigger when the workflow responds synchronously; empty otherwise.
PUT/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.

NameInTypeRequiredDescription
workflowIdpathstringyes

Responses

  • 200The output of the webhook trigger when the workflow responds synchronously; empty otherwise.
GET/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.

NameInTypeRequiredDescription
workflowIdpathstringyes

Responses

  • 200The output of the webhook trigger when the workflow responds synchronously; empty otherwise.
POST/api/webhooks/executions/{executionId}/nodes/{nodeId}/input

Submit 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.

NameInTypeRequiredDescription
executionIdpathstringyes
nodeIdpathstringyes

Responses

  • 200Acknowledgement that the input was received. The execution resumes asynchronously; poll GET /executions/{executionId} to track progress.

Queues

POST/api/queues

Create 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.

NameInTypeRequiredDescription
projectIdquerystringyesID of the project the queue belongs to.
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts.

Responses

  • 201The newly created queue.
GET/api/queues

List 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.

NameInTypeRequiredDescription
filterByquerystringnoComma-separated key:value filter pairs. Available keys: projectId, isActive, search, priority.
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts.
includeTypequerystringnoComma-separated include flags. Available: deleted (include soft-deleted queues).

Responses

  • 200Queues in the workspace.
GET/api/queues/{queueId}

Get queue by ID

Returns a single queue with its configuration.

NameInTypeRequiredDescription
queueIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts.
includeTypequerystringnoComma-separated include flags. Available: deleted (include soft-deleted queues).

Responses

  • 200The requested queue.
PATCH/api/queues/{queueId}

Update queue

Updates queue configuration such as name, retry behaviour, batch size, priority, and active state.

NameInTypeRequiredDescription
queueIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts.
includeTypequerystringnoComma-separated include flags. Available: deleted (include soft-deleted queues).

Responses

  • 200The updated queue.
DELETE/api/queues/{queueId}

Delete queue

Soft-deletes the queue and deactivates it. Items are retained.

NameInTypeRequiredDescription
queueIdpathstringyes

Responses

  • 200Confirmation that the queue was deleted.
GET/api/queues/{queueId}/stats

Get queue statistics

Returns item counts for the queue broken down by processing status.

NameInTypeRequiredDescription
queueIdpathstringyes

Responses

  • 200Item counts by status for the queue.
PATCH/api/queues/{queueId}/activate

Activate queue

Marks the queue as active so its items can be processed.

NameInTypeRequiredDescription
queueIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts.

Responses

  • 200The activated queue.
PATCH/api/queues/{queueId}/deactivate

Deactivate queue

Marks the queue as inactive, pausing processing of its items.

NameInTypeRequiredDescription
queueIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, description, project, workspace, createdByWorkspaceUser, statistics, itemCounts.

Responses

  • 200The deactivated queue.

Queue Items

POST/api/queues/{queueId}/items

Create 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.

NameInTypeRequiredDescription
queueIdpathstringyes
expansionquerystringnoComma-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.
GET/api/queues/{queueId}/items

List 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.

NameInTypeRequiredDescription
queueIdpathstringyes
limitquerynumbernoMaximum number of items to return.
offsetquerynumbernoNumber of items to skip for pagination.
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor).
filterByquerystringnoComma-separated key:value filter pairs. Available keys: status, externalId, priority, scheduledFor, search, createdAfter, createdBefore.

Responses

  • 200A page of queue items with pagination details.
POST/api/queues/{queueId}/items/bulk

Bulk 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.

NameInTypeRequiredDescription
queueIdpathstringyes
expansionquerystringnoComma-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.
PATCH/api/queues/{queueId}/items/bulk

Bulk update queue items

Applies the same field updates to every listed item in the queue.

NameInTypeRequiredDescription
queueIdpathstringyes
expansionquerystringnoComma-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.
DELETE/api/queues/{queueId}/items/bulk

Bulk 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.

NameInTypeRequiredDescription
queueIdpathstringyes

Responses

  • 200Counts of deleted and requested items.
GET/api/queues/{queueId}/items/ready

List 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.

NameInTypeRequiredDescription
queueIdpathstringyes
limitquerynumbernoMaximum number of items to return.
priorityquerynumbernoOnly return items with at least this priority.

Responses

  • 200Queue items ready for processing.
GET/api/queues/{queueId}/items/retry

List queue items needing retry

Returns items in RETRYING status whose next retry time has arrived.

NameInTypeRequiredDescription
queueIdpathstringyes
limitquerynumbernoMaximum number of items to return.

Responses

  • 200Queue items due for a retry attempt.
GET/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.

NameInTypeRequiredDescription
queueIdpathstringyes
statuspathstringyesProcessing status to filter by.
limitquerynumbernoMaximum number of items to return.
offsetquerynumbernoNumber of items to skip for pagination.

Responses

  • 200A page of queue items in the requested status.
GET/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.

NameInTypeRequiredDescription
queueIdpathstringyes
externalIdpathstringyes
expansionquerystringnoComma-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.
GET/api/queues/{queueId}/items/search

Search 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.

NameInTypeRequiredDescription
queueIdpathstringyes
limitquerynumbernoMaximum number of items to return.
offsetquerynumbernoNumber of items to skip for pagination.
expansionquerystringnoComma-separated fields to expand. Available: createdAt, updatedAt, queue, lastExecution, errorHistory. Note: createdAt also expands the other timestamp fields (nextRetryAt, processingStartedAt, processingCompletedAt, lastErrorAt, scheduledFor).
filterByquerystringnoComma-separated key:value filter pairs. Available keys: status, externalId, priority, scheduledFor, search, createdAfter, createdBefore.

Responses

  • 200A page of matching queue items with pagination details.
GET/api/queues/{queueId}/items/stats

Get queue item statistics

Returns aggregate statistics for the queue's items: counts by status and priority band, average processing time, and retry rate.

NameInTypeRequiredDescription
queueIdpathstringyes

Responses

  • 200Aggregate statistics for the queue's items.
GET/api/queues/{queueId}/items/{itemId}

Get queue item by ID

Returns a single queue item.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes
expansionquerystringnoComma-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.
PATCH/api/queues/{queueId}/items/{itemId}

Update queue item

Updates item fields such as data, priority, retry configuration, schedule, and metadata.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes
expansionquerystringnoComma-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.
DELETE/api/queues/{queueId}/items/{itemId}

Delete queue item

Permanently deletes the item from the queue.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes

Responses

  • 200Confirmation that the item was deleted.
GET/api/queues/{queueId}/items/{itemId}/errors

Get queue item error history

Returns the chronological list of errors recorded against the item.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes

Responses

  • 200Error history entries for the queue item.
PATCH/api/queues/{queueId}/items/{itemId}/status

Update 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.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes
expansionquerystringnoComma-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.
PATCH/api/queues/{queueId}/items/{itemId}/link-execution

Link execution to queue item

Associates a workflow execution with the item so processing outcomes can be traced.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes
expansionquerystringnoComma-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.
POST/api/queues/{queueId}/items/{itemId}/retry

Retry 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.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes
expansionquerystringnoComma-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.
POST/api/queues/{queueId}/items/{itemId}/error

Add 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.

NameInTypeRequiredDescription
queueIdpathstringyes
itemIdpathstringyes
expansionquerystringnoComma-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

GET/api/agents

List 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.

NameInTypeRequiredDescription
includeTypequerystringnoComma-separated include flags, e.g. `includeType=all`. Available: all
filterByquerystringnoFilters in `key:value` format, comma-separated, e.g. `filterBy=projectId:<uuid>`. Available: projectId
expansionquerystringnoComma-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
GET/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.

NameInTypeRequiredDescription
agentIdpathstringyes
expansionquerystringnoComma-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

GET/api/tasks

List 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.

NameInTypeRequiredDescription
includeTypequerystringnoComma-separated include flags, e.g. `includeType=all`. Available: all
filterByquerystringnoFilters in `key:value` format, comma-separated, e.g. `filterBy=agentId:<uuid>`. Available: projectId, agentId
expansionquerystringnoComma-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
GET/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.

NameInTypeRequiredDescription
taskIdpathstringyes
expansionquerystringnoComma-separated fields to expand, e.g. `expansion=messages,createdAt`. Available: createdAt, updatedAt, description, agent, project, messages, messageCreatedAt, messageUsage, finishReason, customIdentifier

Responses

  • 200The requested task
PATCH/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.

NameInTypeRequiredDescription
taskIdpathstringyes
expansionquerystringnoComma-separated fields to expand, e.g. `expansion=description,updatedAt`. Available: createdAt, updatedAt, description, agent, project, messages, messageCreatedAt, messageUsage, finishReason, customIdentifier

Responses

  • 200The updated task
DELETE/api/tasks/{taskId}

Delete task by ID

Permanently deletes a task and its messages, and returns the deleted task record.

NameInTypeRequiredDescription
taskIdpathstringyes

Responses

  • 200The deleted task record
POST/api/agents/{agentId}/tasks

Create 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.

NameInTypeRequiredDescription
agentIdpathstringyes
expansionquerystringnoComma-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
POST/api/agents/{agentId}/tasks/{taskId}/message

Send 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).

NameInTypeRequiredDescription
taskIdpathstringyes
agentIdpathstringyes

Responses

  • 200The completed agent turn: either a plain text response or the assistant messages in AI SDK UIMessage format
GET/api/agents/{agentId}/tasks/{taskId}/stream-message

Resume 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.

NameInTypeRequiredDescription
taskIdpathstringyes

Responses

  • 200SSE stream of the in-flight agent turn, replayed via the resumable stream
  • 204No active stream to resume
POST/api/agents/{agentId}/tasks/{taskId}/stream-message

Send 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).

NameInTypeRequiredDescription
taskIdpathstringyes
agentIdpathstringyes

Responses

  • 200SSE stream of the agent turn in AI SDK UIMessage chunk format
POST/api/agents/{agentId}/tasks/{taskId}/stream-message/stop

Stop 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.

NameInTypeRequiredDescription
taskIdpathstringyes

Responses

  • 201Cancellation was requested (or no stream was active)

Knowledge

POST/api/knowledge

Create 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.

NameInTypeRequiredDescription
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions

Responses

  • 201The created knowledge base.
GET/api/knowledge

List knowledge bases in workspace

Returns all knowledge bases in the current workspace, ordered by most recently updated.

NameInTypeRequiredDescription
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions

Responses

  • 200Knowledge bases in the workspace.
GET/api/knowledge/{knowledgeId}

Get knowledge base by ID

Returns a single knowledge base.

NameInTypeRequiredDescription
knowledgeIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions

Responses

  • 200The requested knowledge base.
PATCH/api/knowledge/{knowledgeId}

Update knowledge base

Updates knowledge base properties. All body fields are optional; only provided fields are changed.

NameInTypeRequiredDescription
knowledgeIdpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: description, createdAt, updatedAt, workspace, indexName, chunkSize, chunkOverlap, usage, vectorRefs, countVectorRefs, embeddingProvider, embeddingModel, dimensions

Responses

  • 200The updated knowledge base.
DELETE/api/knowledge/{knowledgeId}

Delete knowledge base

Deletes a knowledge base, its stored files and its vector index. This action cannot be undone.

NameInTypeRequiredDescription
knowledgeIdpathstringyes

Responses

  • 200Returns true when the knowledge base was deleted.
POST/api/knowledge/{knowledgeId}/saveUploadedText

Save 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.

NameInTypeRequiredDescription
knowledgeIdpathstringyes

Responses

  • 201Returns true when the text was embedded and stored.
GET/api/knowledge/{knowledgeId}/documents

List 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.

NameInTypeRequiredDescription
knowledgeIdpathstringyes

Responses

  • 200Documents in the knowledge base, newest first.
GET/api/knowledge/{knowledgeId}/documents/{groupId}

Get knowledge document group

Returns a document group with all of its parts (vector references), ordered by part number.

NameInTypeRequiredDescription
groupIdpathstringyes

Responses

  • 200The requested document group.
DELETE/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.

NameInTypeRequiredDescription
knowledgeIdpathstringyes
groupIdpathstringyes

Responses

  • 200Returns true when the document group was deleted.

Entities

POST/api/objects

Create 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.

NameInTypeRequiredDescription
expansionquerystringnoComma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory.

Responses

  • 201The newly created entity.
GET/api/objects

Get 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.

NameInTypeRequiredDescription
objectTypeIdquerystringnoFilter by entity type ID.
objectTypeSlugquerystringnoFilter by entity type slug.
statequerystringnoFilter by a single state ID.
statesquerystringnoFilter by multiple state IDs, supplied as a comma-separated list.
ownerIdquerystringnoFilter by owner workspace user ID.
searchquerystringnoCase-insensitive search on the entity name.
sortByquerystringnoField to sort by (for example name, createdAt, updatedAt). Defaults to updatedAt.
sortOrderquerystringnoSort direction. Defaults to asc when sortBy is supplied.
pagequerynumbernoPage number (1-based). Defaults to 1.
pageSizequerynumbernoItems per page. Defaults to 25, capped at 100.
expansionquerystringnoComma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory.

Responses

  • 200Paginated list of entities.
GET/api/objects/{id}

Get entity by ID

NameInTypeRequiredDescription
idpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory.

Responses

  • 200The requested entity.
PATCH/api/objects/{id}

Update entity

Partially updates an entity. Supplied attributes are merged into the existing attribute values; fields not supplied are left unchanged.

NameInTypeRequiredDescription
idpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: attributes, objectType, owner, createdBy, createdAt, updatedAt, stateHistory.

Responses

  • 200The updated entity.
DELETE/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.

NameInTypeRequiredDescription
idpathstringyes

Responses

  • 200True when the entity was soft deleted.
POST/api/objects/{id}/state

Change 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.

NameInTypeRequiredDescription
idpathstringyes

Responses

  • 201The entity after the state change.
GET/api/objects/{id}/state/history

Get entity state history

NameInTypeRequiredDescription
idpathstringyes
limitquerynumbernoMaximum number of history entries to return. Defaults to 50.

Responses

  • 200State changes for the entity, newest first.
GET/api/objects/{id}/state/transitions

Get 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.

NameInTypeRequiredDescription
idpathstringyes

Responses

  • 200Current state, valid transitions and all defined states.
POST/api/objects/import

Import 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.
POST/api/objects/export

Export 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.
GET/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.

NameInTypeRequiredDescription
entityTypeIdpathstringyes

Responses

  • 200Import template columns and sample row.

Entity Types

GET/api/object-types

Get all entity types for workspace

Returns entity types in the workspace, sorted by name. Disabled types are excluded unless includeDisabled is true.

NameInTypeRequiredDescription
includeDisabledquerybooleannoSet to true to include disabled entity types.
expansionquerystringnoComma-separated fields to expand. Available: description, attributeSchema, stateSchema, createdAt, updatedAt, createdBy, countObjects.

Responses

  • 200Entity types in the workspace.
GET/api/object-types/slug/{slug}

Get entity type by slug

NameInTypeRequiredDescription
slugpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: description, attributeSchema, stateSchema, createdAt, updatedAt, createdBy, countObjects.

Responses

  • 200The requested entity type.
GET/api/object-types/{id}

Get entity type by ID

NameInTypeRequiredDescription
idpathstringyes
expansionquerystringnoComma-separated fields to expand. Available: description, attributeSchema, stateSchema, createdAt, updatedAt, createdBy, countObjects.

Responses

  • 200The requested entity type.