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
string
required
Workflow name (max 128 characters)
string
default:""
Workflow description
array
required
Ordered list of workflow steps
Show Step object
Show Step object
string
default:"private"
"private" or "public"array
default:[]
Tags for discovery
string
default:"template"
"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).string
What the workflow should achieve, for
execution_mode: "instructions"array
Tool UUIDs the hosted model may call, for
execution_mode: "instructions"array
Declared inputs as
[{"name": "city", "description": "..."}], shown to callers and to the hosted modelstring
Cron expression to run the workflow on a schedule (five fields). Required when
schedule_enabled is true.string
default:"UTC"
IANA timezone the cron expression is evaluated in
boolean
default:false
Turn the schedule on
object
inputs used by scheduled runsResponse
string
Created workflow UUID
string
Workflow name
string
Workflow description
array
The workflow steps as provided
string
Owner user ID
string
"private" or "public"array
Workflow tags
string
ISO 8601 creation timestamp
string
ISO 8601 update timestamp
string
template or instructionsstring
Goal for
instructions mode, or nullarray
Tool UUIDs the hosted model may call
array
Declared inputs
string
Cron expression, or null
string
Timezone for the schedule
boolean
Whether scheduled runs are on
object
Inputs used by scheduled runs
string
Next scheduled run, or null
string
Last scheduled run, or null
boolean
Whether callers pay
price_per_call_cents per runExample
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"
})
