Dashboard

Workflows API

Create, manage, and run automated workflows.

List Workflows

GET /api/v1/workflows?page=1&limit=20
x-api-key: YOUR_API_KEY

Response:

{
  "success": true,
  "data": [
    {
      "id": "wf_abc123",
      "name": "Product Scraper",
      "status": "active",
      "createdAt": "2025-01-15T10:00:00Z",
      "lastRun": "2025-01-20T15:30:00Z"
    }
  ],
  "total": 5
}

Get Workflow

GET /api/v1/workflows/:id
x-api-key: YOUR_API_KEY

Create Workflow

POST /api/v1/workflows
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "name": "My Workflow",
  "description": "Scrapes product pages",
  "nodes": [...],
  "edges": [...]
}

Update Workflow

PUT /api/v1/workflows/:id
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "name": "Updated Workflow",
  "nodes": [...],
  "edges": [...]
}

Delete Workflow

DELETE /api/v1/workflows/:id
x-api-key: YOUR_API_KEY

Run Workflow

POST /api/v1/workflows/:id/run
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "inputs": {
    "url": "https://example.com",
    "searchQuery": "laptops"
  }
}

Response:

{
  "success": true,
  "data": {
    "runId": "run_abc123",
    "status": "queued"
  }
}

Get Run Status

GET /api/v1/workflows/:id/runs/:runId
x-api-key: YOUR_API_KEY

List Runs

GET /api/v1/workflows/:id/runs?page=1&limit=20
x-api-key: YOUR_API_KEY

Scheduling

Create Schedule

POST /api/v1/workflows/:id/schedule
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "cron": "0 9 * * *",
  "timezone": "America/New_York",
  "inputs": {
    "url": "https://example.com"
  }
}

Delete Schedule

DELETE /api/v1/workflows/:id/schedule
x-api-key: YOUR_API_KEY

Destinations

Add Webhook Destination

POST /api/v1/workflows/:id/destinations
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "type": "webhook",
  "url": "https://your-server.com/webhook",
  "headers": {
    "Authorization": "Bearer your-token"
  }
}

Credits

Each workflow run costs 5 credits.