Skip to main content

Stan

Stan is the platform's onboarding and guidance assistant — an LLM-backed agent that helps users build workflows, navigate features, and operate the platform conversationally. The endpoints in this section manage core Stan workflow-builder sessions and the messages exchanged inside them.

All endpoints require authentication via X-API-Key header and the appropriate scope.


Stan Session Object

{
"sessionId": "stan-user_456",
"mode": "workflows",
"modelId": "model_abc123",
"modelName": "Claude Opus 4.7",
"activeWorkflowId": "wf_def001",
"activeWorkflowName": "Customer Onboarding",
"messageCount": 7,
"workflowId": "wf_def001"
}

POST /api/v1/stan/sessions

Create a Stan workflow-builder session. Sessions are 1:1 per user — creating a new session overwrites any existing one.

Scope: stan:execute

Request Body

{
"modelId": "model_abc123",
"activeWorkflowId": "wf_def001",
"activeWorkflowName": "Customer Onboarding"
}
FieldTypeRequiredDescription
modelIdstringYesID of the model to drive the Stan session
activeWorkflowIdstringNoID of the workflow currently being edited
activeWorkflowNamestringNoHuman-readable name of the active workflow

Response 201 Created

{
"sessionId": "stan-user_456",
"mode": "workflows",
"modelId": "model_abc123",
"modelName": "Claude Opus 4.7",
"activeWorkflowId": "wf_def001",
"activeWorkflowName": "Customer Onboarding"
}

GET /api/v1/stan/sessions/:id

Get information about the current Stan session.

Scope: stan:execute

Path Parameters

ParameterTypeRequiredDescription
idstringYesSession ID (e.g. stan-<userId>)

Response 200 OK

Returns the full Stan Session object.


POST /api/v1/stan/sessions/:id/messages

Send a message to Stan within an active session. Stan processes the message and returns the assistant's response, including any tool calls or resources it produced.

Scope: stan:execute

Path Parameters

ParameterTypeRequiredDescription
idstringYesSession ID

Request Body

{
"message": "Add a webhook trigger to my workflow"
}
FieldTypeRequiredDescription
messagestringYesThe user message to send to Stan

Response 200 OK

{
"content": "I've added a webhook trigger node to your workflow.",
"isComplete": true,
"toolCalls": [
{
"name": "add_workflow_node",
"arguments": { "type": "webhook-trigger" }
}
],
"resources": {}
}

DELETE /api/v1/stan/sessions/:id

End the current Stan session.

Scope: stan:execute

Path Parameters

ParameterTypeRequiredDescription
idstringYesSession ID

Response 200 OK

{
"ended": true,
"workflowId": "wf_def001",
"workflowUrl": "/src/workflows/wf_def001"
}