curl -X POST "https://api.danubeai.com/v1/workflows" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"visibility": "private",
"tags": ["weather", "notifications"]
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
workflow = client.workflows.create(
name="Weather Alert Pipeline",
description="Get weather and send Slack notification",
steps=[
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"},
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}",
},
},
],
visibility="private",
tags=["weather", "notifications"],
)
print(f"Created: {workflow.id}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const workflow = await client.workflows.create({
name: 'Weather Alert Pipeline',
description: 'Get weather and send Slack notification',
steps: [
{
stepNumber: 1,
toolId: 'tool_weather_001',
toolName: 'Weather - Get Forecast',
description: 'Fetch the weather forecast',
inputMapping: { city: '{{inputs.city}}' },
},
{
stepNumber: 2,
toolId: 'tool_slack_001',
toolName: 'Slack - Send Message',
description: 'Post forecast to Slack',
inputMapping: {
channel: '{{inputs.channel}}',
text: 'Forecast: {{steps.1.result.forecast}}',
},
},
],
visibility: 'private',
tags: ['weather', 'notifications'],
});
console.log(`Created: ${workflow.id}`);
{
"id": "wf_abc123",
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"owner_id": "user_456",
"visibility": "private",
"tags": ["weather", "notifications"],
"created_at": "2026-02-21T12:00:00Z",
"updated_at": "2026-02-21T12:00:00Z"
}
Workflows
Create Workflow
Create a new multi-tool workflow
POST
/
v1
/
workflows
curl -X POST "https://api.danubeai.com/v1/workflows" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"visibility": "private",
"tags": ["weather", "notifications"]
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
workflow = client.workflows.create(
name="Weather Alert Pipeline",
description="Get weather and send Slack notification",
steps=[
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"},
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}",
},
},
],
visibility="private",
tags=["weather", "notifications"],
)
print(f"Created: {workflow.id}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const workflow = await client.workflows.create({
name: 'Weather Alert Pipeline',
description: 'Get weather and send Slack notification',
steps: [
{
stepNumber: 1,
toolId: 'tool_weather_001',
toolName: 'Weather - Get Forecast',
description: 'Fetch the weather forecast',
inputMapping: { city: '{{inputs.city}}' },
},
{
stepNumber: 2,
toolId: 'tool_slack_001',
toolName: 'Slack - Send Message',
description: 'Post forecast to Slack',
inputMapping: {
channel: '{{inputs.channel}}',
text: 'Forecast: {{steps.1.result.forecast}}',
},
},
],
visibility: 'private',
tags: ['weather', 'notifications'],
});
console.log(`Created: ${workflow.id}`);
{
"id": "wf_abc123",
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"owner_id": "user_456",
"visibility": "private",
"tags": ["weather", "notifications"],
"created_at": "2026-02-21T12:00:00Z",
"updated_at": "2026-02-21T12:00:00Z"
}
Overview
Creates a new workflow that chains multiple Danube tools into an ordered pipeline. Each step executes a tool and can reference results from previous steps using template syntax ({{steps.N.result.field}}, {{inputs.field}}).
Auth: Accepts either JWT or API key (danube-api-key header).
Body Parameters
Ordered list of workflow steps
Show Step object
Show Step object
"template" runs the steps as written, filling {{inputs.x}} and {{steps.N.result.y}} templates. "instructions" hands instructions and allowed_tool_ids to a hosted model that plans the calls itself (counts against the free plan’s hosted-AI allowance).Declared inputs as
[{"name": "city", "description": "..."}], shown to callers and to the hosted modelCron expression to run the workflow on a schedule (five fields). Required when
schedule_enabled is true.Response
Example
curl -X POST "https://api.danubeai.com/v1/workflows" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"visibility": "private",
"tags": ["weather", "notifications"]
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
workflow = client.workflows.create(
name="Weather Alert Pipeline",
description="Get weather and send Slack notification",
steps=[
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"},
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}",
},
},
],
visibility="private",
tags=["weather", "notifications"],
)
print(f"Created: {workflow.id}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const workflow = await client.workflows.create({
name: 'Weather Alert Pipeline',
description: 'Get weather and send Slack notification',
steps: [
{
stepNumber: 1,
toolId: 'tool_weather_001',
toolName: 'Weather - Get Forecast',
description: 'Fetch the weather forecast',
inputMapping: { city: '{{inputs.city}}' },
},
{
stepNumber: 2,
toolId: 'tool_slack_001',
toolName: 'Slack - Send Message',
description: 'Post forecast to Slack',
inputMapping: {
channel: '{{inputs.channel}}',
text: 'Forecast: {{steps.1.result.forecast}}',
},
},
],
visibility: 'private',
tags: ['weather', 'notifications'],
});
console.log(`Created: ${workflow.id}`);
{
"id": "wf_abc123",
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"owner_id": "user_456",
"visibility": "private",
"tags": ["weather", "notifications"],
"created_at": "2026-02-21T12:00:00Z",
"updated_at": "2026-02-21T12:00:00Z"
}
MCP Tool
This endpoint is also available as thecreate_workflow MCP tool:
result = await mcp.call_tool("create_workflow", {
"name": "Weather Alert Pipeline",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
}
],
"visibility": "private"
})
