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="dk_...") 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: 'dk_...' });
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="dk_...") 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: 'dk_...' });
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
Response
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
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="dk_...") 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: 'dk_...' });
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"
})
⌘I
