Workflows API

Multi-tenant workflow management and execution. Supports workflow CRUD, async execution with persistence, run status tracking, scheduling, and natural language parsing. All authenticated endpoints require a JWT token and are rate-limited to 100 requests per minute per user. Tenant isolation is enforced via customer_id from the JWT.

Health Check

Public endpoint for monitoring service availability. No authentication required.

GET/api/v2/workflows/health

Returns service health status. This endpoint is public and does not require authentication.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows/health" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "status": "ok",
  "service": "workflows-api-v2",
  "version": "2.0.0",
  "timestamp": "2026-03-19T18:00:00.000Z"
}

Natural Language Parsing

Convert a natural language instruction into a structured workflow definition using the unified workflow parser. The parser matches against templates or generates a workflow definition with confidence scoring.

POST/api/v2/workflows/parseAuthenticated

Parse a natural language instruction into a structured workflow definition. The instruction must be at least 5 characters.

Body Parameters

instructionstringrequired

Natural language description of the workflow. Minimum 5 characters.

contextobject

Additional context for parsing. Can include availableTools (array) and organizationId (string).

Request

cURL
curl -X POST "https://api.lvng.ai/api/v2/workflows/parse" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response 200

{
  "success": true,
  "workflow": {
    "type": "generated",
    "name": "Weekly Sales Report",
    "description": "Pull sales data, generate summary, and email to team",
    "steps": [
      {
        "id": "step_1",
        "type": "integration",
        "action": "search_knowledge",
        "config": {
          "query": "sales results last week"
        }
      },
      {
        "id": "step_2",
        "type": "agent",
        "action": "generate_report",
        "input_from": "step_1"
      },
      {
        "id": "step_3",
        "type": "integration",
        "action": "send_email",
        "input_from": "step_2"
      }
    ],
    "confidence": 0.87,
    "source": "ai-generated",
    "valid": true
  },
  "parseTimeMs": 1243
}

Workflow CRUD

Create, retrieve, update, and delete workflow definitions. Workflows are scoped to a tenant via customer_id and ownership is verified on all mutating operations.

GET/api/v2/workflowsAuthenticated

List all workflows for the authenticated user's tenant. Results are ordered by creation date descending.

Query Parameters

statusstring

Filter by status: active or archived.

limitinteger
Default: 50

Maximum number of workflows to return.

offsetinteger
Default: 0

Pagination offset.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "workflows": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "name": "Weekly Sales Report",
      "description": "Automated weekly sales report generation and distribution",
      "definition": "{\"nodes\": [...], \"inputs\": {}, \"outputs\": {}}",
      "version": "1.0.0",
      "status": "active",
      "created_by": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "created_at": "2026-02-15T10:00:00.000Z",
      "updated_at": "2026-03-10T14:30:00.000Z"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "name": "Customer Onboarding",
      "description": "Automated onboarding sequence for new customers",
      "definition": "{\"nodes\": [...], \"inputs\": {}, \"outputs\": {}}",
      "version": "1.0.0",
      "status": "active",
      "created_by": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "created_at": "2026-01-20T08:00:00.000Z",
      "updated_at": "2026-03-15T16:00:00.000Z"
    }
  ],
  "count": 2
}
POST/api/v2/workflowsAuthenticated

Create a new workflow. The definition must be an object with a nodes array. Returns 409 if a workflow with the same name already exists for this tenant.

Body Parameters

namestringrequired

Display name for the workflow.

descriptionstring

Description of what the workflow does.

definitionobjectrequired

Workflow definition object. Must contain a nodes array defining the workflow steps.

versionstring
Default: 1.0.0

Semantic version string.

Request

cURL
curl -X POST "https://api.lvng.ai/api/v2/workflows" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response 201

{
  "success": true,
  "workflow": {
    "id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
    "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "name": "Deploy Notification",
    "description": "Notify the team when a deployment completes",
    "definition": {
      "nodes": [
        {
          "id": "step_1",
          "type": "condition",
          "action": "check_status",
          "config": {
            "field": "$.deployment.status",
            "operator": "equals",
            "value": "success"
          }
        },
        {
          "id": "step_2",
          "type": "integration",
          "action": "slack.post_message",
          "input_from": "step_1",
          "config": {
            "channel": "#deployments",
            "message": "Deployment completed successfully!"
          }
        }
      ],
      "inputs": {},
      "outputs": {}
    },
    "version": "1.0.0",
    "status": "active",
    "created_by": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "created_at": "2026-03-19T17:30:00.000Z",
    "updated_at": "2026-03-19T17:30:00.000Z"
  }
}
GET/api/v2/workflows/:idAuthenticated

Get the full workflow definition. The definition JSON is parsed and returned as an object. Returns 404 if not found or not owned by the tenant.

Path Parameters

iduuidrequired

The workflow ID.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "workflow": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "name": "Weekly Sales Report",
    "description": "Automated weekly sales report generation and distribution",
    "definition": {
      "nodes": [
        {
          "id": "step_1",
          "type": "integration",
          "action": "search_knowledge"
        },
        {
          "id": "step_2",
          "type": "agent",
          "action": "generate_report",
          "input_from": "step_1"
        },
        {
          "id": "step_3",
          "type": "integration",
          "action": "send_email",
          "input_from": "step_2"
        }
      ],
      "inputs": {},
      "outputs": {}
    },
    "version": "1.0.0",
    "status": "active",
    "created_by": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "created_at": "2026-02-15T10:00:00.000Z",
    "updated_at": "2026-03-10T14:30:00.000Z"
  }
}
PATCH/api/v2/workflows/:idAuthenticated

Partially update a workflow. Verifies tenant ownership before applying changes. Status must be 'active' or 'archived'. Returns 400 if no valid fields are provided.

Path Parameters

iduuidrequired

The workflow ID.

Body Parameters

namestring

Updated workflow name.

descriptionstring

Updated description.

definitionobject

Updated workflow definition (must contain nodes array).

versionstring

Updated version string.

statusstring

Set workflow status: active or archived.

Request

cURL
curl -X PATCH "https://api.lvng.ai/api/v2/workflows/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response 200

{
  "success": true,
  "workflow": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "name": "Weekly Sales & Marketing Report",
    "description": "Automated weekly sales report generation and distribution",
    "definition": {
      "nodes": [
        { "id": "step_1", "type": "integration", "action": "search_knowledge" },
        { "id": "step_2", "type": "agent", "action": "generate_report", "input_from": "step_1" },
        { "id": "step_3", "type": "integration", "action": "send_email", "input_from": "step_2" }
      ],
      "inputs": {},
      "outputs": {}
    },
    "version": "1.0.0",
    "status": "active",
    "created_by": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "created_at": "2026-02-15T10:00:00.000Z",
    "updated_at": "2026-03-19T17:45:00.000Z"
  }
}
DELETE/api/v2/workflows/:idAuthenticated

Delete a workflow and all its execution history (CASCADE). Verifies tenant ownership. Returns 403 if the workflow belongs to a different tenant.

Path Parameters

iduuidrequired

The workflow ID.

Request

cURL
curl -X DELETE "https://api.lvng.ai/api/v2/workflows/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "message": "Workflow deleted successfully"
}
GET/api/v2/workflows/:id/schemaAuthenticated

Get the input/output schema extracted from the workflow definition. Useful for determining what inputs are required before executing.

Path Parameters

iduuidrequired

The workflow ID.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows/{id}/schema" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "schema": {
    "inputs": {
      "type": "object",
      "properties": {
        "date_range": {
          "type": "string",
          "description": "Override the default date range",
          "default": "LAST_WEEK"
        },
        "recipients": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Override default email recipients"
        }
      }
    },
    "outputs": {
      "type": "object",
      "properties": {
        "report": { "type": "string" },
        "email_sent": { "type": "boolean" }
      }
    }
  }
}

Workflow Execution

Start runs and follow them. Each run is aworkflow_runs record. The workflow engine runs it in the background and emits WebSocket events for its progress. Archived workflows cannot be run.

The run object

Every route below answers runs in this shape. Everyone in the workflow's organization sees that a run happened: its status, its timing, who started it and what started it. What the run was given and what it produced (inputs, outputs and error) are answered only to the person who started it and to the organization's owners and admins; anyone else gets outputs_hidden: true and the run without those three fields.

Run

iduuid

The run ID.

workflow_iduuid

The workflow it ran.

customer_iduuid

The organization the workflow belongs to.

statusstring

running, completed, failed or terminated.

started_atstring

When it started (ISO 8601).

finished_atstring | null

When it ended; null while it runs.

started_byuuid | null

The person the run acted for: whoever started it with Run or with POST /:id/execute, the person who made the schedule or trigger that started it, or the person Tron acted for in a call. null for runs recorded before this was kept.

triggerobject | null

What started it: { "type": "manual" }, { "type": "schedule", "scheduleId", "scheduledAt" }, { "type": "trigger", "triggerId" } or { "type": "call" }. null for runs recorded before this was kept.

error_classstring | null

Why a failed run failed: refused (it was refused before it started), step_failed (a step failed; outputs.failed_step says which), timeout (it ran out of time), not_started (it waited too long for its turn), schedule_stopped (its schedule was stopped), interrupted (the server running it stopped before it ended) or failed (anything else). null unless status is failed.

outputs_hiddenboolean

true when you may not read what the run was given and produced: inputs, outputs and error are then left out.

For the person who started it, and owners and admins

inputsobject

What the run was given.

outputsobject | null

The run's result (below); null until it has one.

errorstring | null

The full text of the error a failed run ended with.

outputs

executionIdstring | null

The engine's ID for the run.

statusstring

The engine's end status of a completed run.

outputsobject | null

What reached the workflow's output steps.

resultIdstring | null

The stored result, when the engine kept one.

durationnumber | null

How long the run took, in milliseconds.

stepsarray

Each step the run reached, in the order of the definition (below). A step it never reached is not listed; at most 100 are.

failed_stepobject | null

The step whose own work failed (below); null when none did.

notesstring[]

What the run says of itself, such as where its artifacts were filed. Only when it has something to say.

triggerobject

What started the run, as above.

outputs.steps[]

idstring

The step's ID in the definition.

typestring | null

The step's type.

labelstring | null

The step's name, when it has one.

statusstring

completed, failed, or not_finished (it was still going when the run ended).

started_atstring | null

When the step started.

finished_atstring | null

When the step ended.

duration_msnumber | null

How long it took, in milliseconds.

outputany

What the step handed on. Absent for a step that failed.

output_truncatedboolean

true when output is cut short: it is then the start of its JSON text (up to 8,000 characters for a step, 64,000 for all the steps of a run together), or null once the steps before it hold the 64,000.

output_charsnumber

The length of the whole JSON text of a cut-short output.

errorstring

Why a failed step failed.

outputs.failed_step

idstring

The step's ID in the definition.

typestring | null

The step's type.

labelstring | null

The step's name, when it has one.

messagestring

Why it failed.

POST/api/v2/workflows/:id/executeAuthenticated

Start a run of the workflow. It is recorded as started by you (started_by, trigger { type: 'manual' }) and executes in the background for up to 60 minutes; a run still going at that limit is stopped and fails with error_class timeout. Answers 201 with the run as you read it. WebSocket events execution:started, execution:completed and execution:failed follow its progress. An archived workflow answers 400.

Path Parameters

iduuidrequired

The workflow ID.

Body Parameters

inputsobject

Input parameters for the workflow execution. Defaults to empty object.

Request

cURL
curl -X POST https://api.lvng.ai/api/v2/workflows/wf_01HMPJ4WX9R6N8K5T3F0V7QB1Z/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": {
      "customer_id": "cus_01HMPJ800K2N7P6T4Q1W3F8C9X",
      "plan": "enterprise"
    }
  }'

Response 201

{
  "success": true,
  "run": {
    "id": "e5f6a7b8-c9d0-1234-ef56-789012345678",
    "workflow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "status": "running",
    "started_at": "2026-03-19T18:00:00.000Z",
    "finished_at": null,
    "started_by": "3c9d2e1f-7a6b-4c5d-9e8f-0a1b2c3d4e5f",
    "trigger": { "type": "manual" },
    "error_class": null,
    "outputs_hidden": false,
    "inputs": {
      "date_range": "LAST_MONTH",
      "recipients": ["ceo@company.com", "sales-lead@company.com"]
    },
    "outputs": null,
    "error": null
  }
}
GET/api/v2/workflows/:id/runsAuthenticated

The runs of a workflow, newest first, each as you may read it (see The run object). count is the number of runs that match, across all pages. In the example the second run was started by a colleague's schedule, so its inputs, outputs and error are hidden from you.

Path Parameters

iduuidrequired

The workflow ID.

Query Parameters

statusstring

Filter by run status: running, completed, failed, or terminated.

limitinteger
Default: 50

Maximum number of runs to return.

offsetinteger
Default: 0

Pagination offset.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows/{id}/runs" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "runs": [
    {
      "id": "e5f6a7b8-c9d0-1234-ef56-789012345678",
      "workflow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "status": "completed",
      "started_at": "2026-03-19T18:00:00.000Z",
      "finished_at": "2026-03-19T18:00:47.000Z",
      "started_by": "3c9d2e1f-7a6b-4c5d-9e8f-0a1b2c3d4e5f",
      "trigger": { "type": "manual" },
      "error_class": null,
      "outputs_hidden": false,
      "inputs": { "date_range": "LAST_MONTH" },
      "outputs": {
        "executionId": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
        "status": "completed",
        "outputs": { "report": "Q1 2026 Sales Summary...", "email_sent": true },
        "resultId": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
        "duration": 47012,
        "steps": [
          {
            "id": "step_1",
            "type": "integration",
            "label": "Find last week's sales notes",
            "status": "completed",
            "started_at": "2026-03-19T18:00:00.120Z",
            "finished_at": "2026-03-19T18:00:02.480Z",
            "duration_ms": 2360,
            "output": { "documents": 12 }
          },
          {
            "id": "step_2",
            "type": "agent",
            "label": "Write the summary",
            "status": "completed",
            "started_at": "2026-03-19T18:00:02.480Z",
            "finished_at": "2026-03-19T18:00:43.690Z",
            "duration_ms": 41210,
            "output": { "report": "Q1 2026 Sales Summary..." }
          },
          {
            "id": "step_3",
            "type": "integration",
            "label": "Email the sales team",
            "status": "completed",
            "started_at": "2026-03-19T18:00:43.690Z",
            "finished_at": "2026-03-19T18:00:46.990Z",
            "duration_ms": 3300,
            "output": { "email_sent": true }
          }
        ],
        "failed_step": null,
        "trigger": { "type": "manual" }
      },
      "error": null
    },
    {
      "id": "d4e5f6a7-b8c9-0123-de45-678901234567",
      "workflow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "status": "failed",
      "started_at": "2026-03-17T13:00:00.000Z",
      "finished_at": "2026-03-17T13:15:00.000Z",
      "started_by": "6b7c8d9e-0f1a-4b2c-8d3e-4f5a6b7c8d9e",
      "trigger": {
        "type": "schedule",
        "scheduleId": "f6a7b8c9-d0e1-2345-f678-901234567890",
        "scheduledAt": "2026-03-17T13:00:00.000Z"
      },
      "error_class": "timeout",
      "outputs_hidden": true
    }
  ],
  "count": 2
}
GET/api/v2/workflows/runs/summaryAuthenticated

Count the runs of your organization's workflows in one request, for a dashboard. Counts only: nothing a run was given or produced is read. running counts runs that started less than 65 minutes ago and are still running; stale counts runs still marked running that started longer ago (their server most likely restarted and never wrote their end). A personal API key needs the 'read' scope.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows/runs/summary" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "summary": {
    "total": 128,
    "running": 2,
    "stale": 0,
    "last_7_days": {
      "total": 21,
      "completed": 18,
      "failed": 2,
      "terminated": 1
    },
    "as_of": "2026-03-19T18:05:00.000Z"
  }
}
GET/api/v2/workflows/:id/runs/:runIdAuthenticated

One run, as you may read it (see The run object). For a run that failed in a step, outputs.steps shows each step it reached and outputs.failed_step names the step that failed and why.

Path Parameters

iduuidrequired

The workflow ID.

runIduuidrequired

The run ID.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows/{id}/runs/{runId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "run": {
    "id": "f7a8b9c0-d1e2-4f3a-8b4c-5d6e7f8a9b0c",
    "workflow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "customer_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "status": "failed",
    "started_at": "2026-03-20T09:00:00.000Z",
    "finished_at": "2026-03-20T09:00:04.320Z",
    "started_by": "3c9d2e1f-7a6b-4c5d-9e8f-0a1b2c3d4e5f",
    "trigger": { "type": "manual" },
    "error_class": "step_failed",
    "outputs_hidden": false,
    "inputs": { "date_range": "LAST_WEEK" },
    "outputs": {
      "executionId": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
      "steps": [
        {
          "id": "step_1",
          "type": "integration",
          "label": "Find last week's sales notes",
          "status": "completed",
          "started_at": "2026-03-20T09:00:00.110Z",
          "finished_at": "2026-03-20T09:00:02.430Z",
          "duration_ms": 2320,
          "output": { "documents": 9 }
        },
        {
          "id": "step_2",
          "type": "agent",
          "label": "Write the summary",
          "status": "failed",
          "started_at": "2026-03-20T09:00:02.430Z",
          "finished_at": "2026-03-20T09:00:04.270Z",
          "duration_ms": 1840,
          "error": "The model did not answer in time."
        }
      ],
      "failed_step": {
        "id": "step_2",
        "type": "agent",
        "label": "Write the summary",
        "message": "The model did not answer in time."
      },
      "trigger": { "type": "manual" }
    },
    "error": "The model did not answer in time."
  }
}
DELETE/api/v2/workflows/:id/runs/:runIdAuthenticated

Stop a run that is still running. The run is recorded terminated at once, and it is stopped: no further step of it starts, and a wait step ends at once. The server running it stops it straight away, or within 30 seconds when another server runs it. A step that is already running is not interrupted; whatever the run ends with afterwards is not recorded, so it stays terminated. A run that has already ended (completed, failed or terminated) answers 400 and is not changed.

Path Parameters

iduuidrequired

The workflow ID.

runIduuidrequired

The run ID to terminate.

Request

cURL
curl -X DELETE "https://api.lvng.ai/api/v2/workflows/{id}/runs/{runId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "message": "Workflow run terminated successfully"
}

Workflow Schedules

Manage cron-based schedules for automated workflow execution. Uses the workflow scheduler service. Schedule routes include :scheduleId as a path parameter for update and delete operations.

POST/api/v2/workflows/:id/schedulesAuthenticated

Create a new cron schedule for the workflow. Verifies tenant ownership. Returns 400 for invalid cron expressions.

Path Parameters

iduuidrequired

The workflow ID.

Body Parameters

cron_expressionstringrequired

Standard 5-field cron expression. Example: "0 9 * * 1" for every Monday at 9am.

timezonestring
Default: UTC

IANA timezone identifier.

inputsobject

Inputs to pass to each scheduled execution.

missed_execution_policystring

How to handle missed runs: run_immediately, skip, or queue.

Request

cURL
curl -X POST "https://api.lvng.ai/api/v2/workflows/{id}/schedules" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response 201

{
  "success": true,
  "schedule": {
    "id": "f6a7b8c9-d0e1-2345-f678-901234567890",
    "workflow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "cron_expression": "0 9 * * 1",
    "timezone": "America/New_York",
    "inputs": { "date_range": "LAST_WEEK" },
    "missed_execution_policy": "run_immediately",
    "enabled": true,
    "next_run_at": "2026-03-24T13:00:00.000Z",
    "created_by": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "created_at": "2026-03-19T18:15:00.000Z"
  }
}
GET/api/v2/workflows/:id/schedulesAuthenticated

List all schedules for a workflow. Verifies tenant ownership.

Path Parameters

iduuidrequired

The workflow ID.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workflows/{id}/schedules" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "schedules": [
    {
      "id": "f6a7b8c9-d0e1-2345-f678-901234567890",
      "workflow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "cron_expression": "0 9 * * 1",
      "timezone": "America/New_York",
      "enabled": true,
      "next_run_at": "2026-03-24T13:00:00.000Z",
      "last_run_at": "2026-03-17T13:00:00.000Z",
      "created_at": "2026-03-19T18:15:00.000Z"
    }
  ],
  "count": 1
}
PATCH/api/v2/workflows/:id/schedules/:scheduleIdAuthenticated

Update an existing schedule. Verifies tenant ownership of the parent workflow. Returns 404 if the schedule is not found.

Path Parameters

iduuidrequired

The workflow ID.

scheduleIduuidrequired

The schedule ID to update.

Body Parameters

cron_expressionstring

Updated cron expression.

timezonestring

Updated IANA timezone.

inputsobject

Updated inputs for scheduled executions.

enabledboolean

Enable or disable the schedule.

missed_execution_policystring

Updated missed execution policy.

Request

cURL
curl -X PATCH "https://api.lvng.ai/api/v2/workflows/{id}/schedules/{scheduleId}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response 200

{
  "success": true,
  "schedule": {
    "id": "f6a7b8c9-d0e1-2345-f678-901234567890",
    "workflow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "cron_expression": "0 9 * * 1,4",
    "timezone": "America/New_York",
    "enabled": true,
    "next_run_at": "2026-03-20T13:00:00.000Z",
    "updated_at": "2026-03-19T18:20:00.000Z"
  }
}
DELETE/api/v2/workflows/:id/schedules/:scheduleIdAuthenticated

Delete a schedule. Verifies tenant ownership of the parent workflow.

Path Parameters

iduuidrequired

The workflow ID.

scheduleIduuidrequired

The schedule ID to delete.

Request

cURL
curl -X DELETE "https://api.lvng.ai/api/v2/workflows/{id}/schedules/{scheduleId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "message": "Schedule deleted successfully"
}