Update workflow

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Updates a workflow. Send only the fields you want to change.

Anything you leave out keeps its stored value, so a rename is just {"name": "..."}. Changing definition saves a new immutable version and the workflow runs it from then on; earlier versions stay readable through List workflow versions. Pass change_summary to label what changed.

Renaming to a name another live workflow already uses returns a 409. An invalid definition returns a 422 with the validation errors, and nothing is saved.

Updating does not change whether the workflow is running. It also rewrites the workflow's file in the app's code.

This endpoint is limited to 30 requests per minute.

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>

put/api/apps/{app_id}/workflows/{workflow_id}

Path parameters

app_idstring required

ID of the app whose workflows you want to work with.

ID of the app whose workflows you want to work with.

workflow_idstring required

ID of the workflow, as returned in id by List workflows.

ID of the workflow, as returned in id by List workflows.

Request body

namestring nullable

New name. Leave it out to keep the current one.

descriptionstring nullable

New description. Leave it out to keep the current one.

definitionobject nullable

New definition. Sending one saves a new version. Leave it out to keep the current one.

triggerobject nullable

New trigger, same shape as on create. Leave it out to keep the current one.

change_summarystring nullable

Note describing this change, kept in the version history.

Example request

{
  "name": "Email me new signups",
  "description": "Sends an email whenever a User record is created.",
  "definition": {
    "do": [],
    "document": {
      "dsl": "1.0.0",
      "name": "notify",
      "version": "1.0.0"
    }
  },
  "trigger": {
    "config": {
      "cron_expression": "0 9 * * *",
      "timezone": "UTC",
      "trigger_type": "scheduled"
    }
  },
  "change_summary": "Send to the ops alias instead"
}

Response

The updated workflow.

idstring required

ID of the workflow.

app_idstring required

ID of the app the workflow belongs to.

file_keystring nullable

Name of the workflow's file in the app's code. null on workflows saved before files were kept.

namestring required

Name of the workflow.

descriptionstring nullable

What the workflow is for.

statusstring required

Whether the workflow runs: active, inactive, or archived.

status_reasonstring nullable

Why Base44 stopped the workflow itself, as a fixed code: consecutive_failures, end_condition_reached, migration_activation_failed, or workflows_not_available. null when you set the status yourself.

current_version_idstring nullable

Version the workflow runs today, as the SHA-256 hash of that definition. null until a definition is saved.

triggerobject

What starts the workflow. The trigger sits under config, keyed by trigger_type.

app_type_contextobject nullable

Which app surface the workflow was authored against.

last_run_atstring date-time nullable

When the workflow last started running. null before its first run.

last_run_statusstring nullable

How that run ended: success, failed, or cancelled. null before the first run. Note this is a different set of values from a run's own status, which reports completed rather than success.

consecutive_failuresinteger

Runs that have failed in a row. Resets on the next success.

total_runsinteger

Runs the workflow has started, ever.

successful_runsinteger

Runs that finished successfully, ever.

failed_runsinteger

Runs that ended in an error, ever.

created_datestring date-time nullable

When the workflow was created.

updated_datestring date-time nullable

When the workflow was last changed.

created_bystring nullable

Email of whoever created the workflow.

definitionobject nullable

The steps the workflow runs, as a CNCF Serverless Workflow v1.0 document. null when no version has been saved yet. Only this endpoint returns it; the list endpoint does not.

Example response

{
  "id": "68b1c0d4e7b91d003c45a1f2",
  "app_id": "6820f3a4e7b91d003c45a1f2",
  "file_key": "email-me-new-signups",
  "name": "Email me new signups",
  "description": "Sends an email whenever a User record is created.",
  "status": "active",
  "status_reason": "consecutive_failures",
  "current_version_id": "9f2c1a7b3e5d84f60c1b2a9e7d4f8c3b6a5e2d1f0c9b8a7e6d5c4b3a2f1e0d9c",
  "trigger": {
    "config": {
      "cron_expression": "0 9 * * *",
      "timezone": "UTC",
      "trigger_type": "scheduled"
    }
  },
  "app_type_context": {
    "app_type": "user_app"
  },
  "last_run_at": "2026-08-25T09:12:44Z",
  "last_run_status": "success",
  "total_runs": 48,
  "successful_runs": 44,
  "failed_runs": 3,
  "created_date": "2026-07-02T11:04:00Z",
  "updated_date": "2026-08-20T16:31:00Z",
  "created_by": "you@example.com",
  "definition": {
    "do": [],
    "document": {
      "dsl": "1.0.0",
      "name": "notify",
      "version": "1.0.0"
    }
  }
}

Changes