Skip to main content
POST
https://api.usedari.com
/
public
/
workflows
/
start
/
{workflow_id}
from dari import Dari

client = Dari(api_key="YOUR_API_KEY")

# Basic workflow start
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={
        "primary_email": "[email protected]"
    }
)

# With proxy city
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    use_proxy=True,
    proxy_city="New York"
)

# With custom proxy server
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    use_proxy=True,
    proxy_server="http://proxy.example.com:8080",
    proxy_server_username="user",
    proxy_server_password="password"
)

# With custom user agent
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
)

# With browser profile
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    browser_profile_id="550e8400-e29b-41d4-a716-446655440000"
)

print(f"Workflow started: {result}")
{
  "workflow_execution_id": "exec_987654321",
  "status": "started"
}
This endpoint allows you to programmatically start a workflow execution with the specified input variables.

Path Parameters

workflow_id
string
required
The unique identifier of the workflow to start

Headers

X-API-Key
string
required
Your API key for authentication
Content-Type
string
required
Must be application/json

Request Body

input_variables
object
required
Key-value pairs of input variable names and their values
timeout_minutes
number
Maximum execution time in minutes. If not specified, uses default timeout
should_update_cache
boolean
default:true
Whether to update the execution cache
allow_public_live_view
boolean
default:false
Enable public live viewing of the workflow execution
browser_profile_id
string
UUID of a browser profile to use for this workflow execution. Overrides the workflow’s configured profile if one exists. The profile’s saved cookies, login sessions, and browser state will be used during execution.

Proxy Configuration

use_proxy
boolean
default:false
Enable proxy for browser sessions in this workflow
proxy_city
string
Select a proxy location from available cities: New York, Los Angeles, Chicago, Seattle, Miami, Toronto, London, Frankfurt, Singapore, Sydney
proxy_server
string
Custom proxy server URL (e.g., http://proxy.example.com:8080)
proxy_server_username
string
Username for custom proxy server authentication
proxy_server_password
string
Password for custom proxy server authentication

Browser Configuration

user_agent
string
Custom user agent string for browser sessions in this workflow. If not specified, the default browser user agent will be used.
from dari import Dari

client = Dari(api_key="YOUR_API_KEY")

# Basic workflow start
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={
        "primary_email": "[email protected]"
    }
)

# With proxy city
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    use_proxy=True,
    proxy_city="New York"
)

# With custom proxy server
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    use_proxy=True,
    proxy_server="http://proxy.example.com:8080",
    proxy_server_username="user",
    proxy_server_password="password"
)

# With custom user agent
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
)

# With browser profile
result = client.start_workflow(
    workflow_id="23a45a3f-c58c-492a-8e81-0fe6b3704ad2",
    input_variables={"primary_email": "[email protected]"},
    browser_profile_id="550e8400-e29b-41d4-a716-446655440000"
)

print(f"Workflow started: {result}")
{
  "workflow_execution_id": "exec_987654321",
  "status": "started"
}

Usage Notes

  • API Key: Get your API key from the Dari dashboard
  • Workflow ID: Found in your workflow URL or dashboard
  • Input Variables: Must match the variable names defined in your workflow
  • Variable Types: Supports string, number, boolean, and file variables
  • Browser Profiles: Use browser_profile_id to run workflows with persistent authentication:
    • Provide the UUID of a browser profile created via Create Browser Profile
    • The profile’s saved cookies, login sessions, and browser state will be used during execution
    • Overrides any browser profile configured in the workflow settings
    • Maintains authentication across multiple workflow executions without requiring manual login each time
  • Proxy Configuration: Two options available:
    • Managed Proxy Cities: Set use_proxy=true and select a proxy_city from: New York, Los Angeles, Chicago, Seattle, Miami, Toronto, London, Frankfurt, Singapore, Sydney
    • Custom Proxy Server: Set use_proxy=true and provide proxy_server URL with optional proxy_server_username and proxy_server_password for authentication
  • User Agent: Customize the browser user agent string for all browser sessions in the workflow. Useful for:
    • Testing different browser/device configurations
    • Bypassing user agent-based restrictions
    • Simulating specific browsers or mobile devices
  • Timeout: Default timeout applies if timeout_minutes is not specified
  • Caching: Set should_update_cache=false to disable cache updates for this execution

Error Responses

{
  "error": "Invalid API key"
}
{
  "error": "Workflow not found"
}
{
  "error": "Missing required input variables"
}