LemuAI

Overview

Create and manage automation workflows, triggers, and runs

An automation workflow orchestrates multi-step business logic — for example, waiting for an inbound event, then dispatching a call, then sending a WhatsApp message. This is distinct from the voice agent "workflows" documented under Agents — an automation workflow's definition describes the automation graph, and it fires from triggers rather than being dialed directly.

This feature is called Journeys in the app UI and throughout the Guides. The API resource and every endpoint below keep the automation-workflows name for backward compatibility.

MethodEndpointPurpose
POST/automation-workflows/Create an automation workflow
GET/automation-workflows/List automation workflows
GET/automation-workflows/{workflow_id}Get a specific automation workflow
PATCH/automation-workflows/{workflow_id}Update an automation workflow
DELETE/automation-workflows/{workflow_id}Delete (archive) an automation workflow
POST/automation-workflows/{workflow_id}/executeExecute a workflow with a given context
POST/automation-workflows/{workflow_id}/testTest a workflow regardless of its status
GET/automation-workflows/runsList all runs for the organization, with filters
GET/automation-workflows/{workflow_id}/runsList runs for a specific workflow
GET/automation-workflows/runs/{run_id}Get a specific run
GET/automation-workflows/runs/{run_id}/historyGet execution history for a run
POST/automation-workflows/runs/{run_id}/stopManually stop a stuck run
POST/automation-workflows/{workflow_id}/triggersCreate a trigger for a workflow
GET/automation-workflows/{workflow_id}/triggersList triggers for a workflow
PATCH/automation-workflows/triggers/{trigger_id}Update trigger config or state
DELETE/automation-workflows/triggers/{trigger_id}Delete (archive) a trigger
GET/automation-workflows/{workflow_id}/trigger-metaGet trigger config metadata for building trigger UIs
POST/automation-workflows/{workflow_id}/triggers/{trigger_id}/fireManually fire a manual trigger
POST/automation-workflows/webhook/{trigger_uuid}Receive an inbound webhook that fires the matching trigger

Workflow status values#

StatusDescription
draftBeing configured
activeReady to fire from its trigger
pausedTemporarily disabled
archivedDeleted (soft delete)

Trigger types#

TypeDescription
data_conditionFires when data matches a condition
scheduleCron-based scheduled trigger
webhookFires when /automation-workflows/webhook/{trigger_uuid} receives a request
eventInternal event-based trigger
contact_eventFires on an inbound contact event (e.g. cart_added, order_placed)
manualFired on demand via the fire-trigger endpoint

Run state values#

queued, pending, running, waiting, completed, failed, cancelled

Create and execute a workflow#

curl -X POST https://app.lemuai.com/api/v1/automation-workflows/ \
  -H "X-API-Key: lemu_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Post-call follow-up",
    "description": "Send a WhatsApp message after a call completes",
    "definition": {},
    "trigger": {},
    "context_schema": {},
    "settings": {}
  }'
{
  "id": 42,
  "organization_id": 7,
  "name": "Post-call follow-up",
  "description": "Send a WhatsApp message after a call completes",
  "version": 1,
  "status": "draft",
  "definition": {},
  "trigger": {},
  "context_schema": {},
  "settings": {},
  "created_at": "2026-08-20T10:00:00Z",
  "updated_at": null,
  "runs_count": 0,
  "active_runs_count": 0
}

Once a workflow is active, execute it directly with a context payload — the context must satisfy the workflow's context_schema:

curl -X POST https://app.lemuai.com/api/v1/automation-workflows/42/execute \
  -H "X-API-Key: lemu_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "context": { "contact_id": 123 } }'
{
  "id": 501,
  "organization_id": 7,
  "automation_workflow_id": 42,
  "state": "running",
  "current_node_id": null,
  "context": { "contact_id": 123 },
  "initial_context": { "contact_id": 123 },
  "error": null,
  "trigger_id": null,
  "voice_call_run_id": null,
  "started_at": "2026-08-20T10:05:00Z",
  "completed_at": null,
  "created_at": "2026-08-20T10:05:00Z"
}

© 2026 LemuAI. Built with our own docs platform.