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.
| Method | Endpoint | Purpose |
|---|---|---|
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}/execute | Execute a workflow with a given context |
POST | /automation-workflows/{workflow_id}/test | Test a workflow regardless of its status |
GET | /automation-workflows/runs | List all runs for the organization, with filters |
GET | /automation-workflows/{workflow_id}/runs | List runs for a specific workflow |
GET | /automation-workflows/runs/{run_id} | Get a specific run |
GET | /automation-workflows/runs/{run_id}/history | Get execution history for a run |
POST | /automation-workflows/runs/{run_id}/stop | Manually stop a stuck run |
POST | /automation-workflows/{workflow_id}/triggers | Create a trigger for a workflow |
GET | /automation-workflows/{workflow_id}/triggers | List 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-meta | Get trigger config metadata for building trigger UIs |
POST | /automation-workflows/{workflow_id}/triggers/{trigger_id}/fire | Manually fire a manual trigger |
POST | /automation-workflows/webhook/{trigger_uuid} | Receive an inbound webhook that fires the matching trigger |
Workflow status values#
| Status | Description |
|---|---|
draft | Being configured |
active | Ready to fire from its trigger |
paused | Temporarily disabled |
archived | Deleted (soft delete) |
Trigger types#
| Type | Description |
|---|---|
data_condition | Fires when data matches a condition |
schedule | Cron-based scheduled trigger |
webhook | Fires when /automation-workflows/webhook/{trigger_uuid} receives a request |
event | Internal event-based trigger |
contact_event | Fires on an inbound contact event (e.g. cart_added, order_placed) |
manual | Fired 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"
}