Skip to main content

POST /api/v1/decision-flows/rollback

Restores a decision flow to a previously published version. Instead of overwriting history, rollback creates a new version that contains the configuration from the target version. This means the version history is fully immutable — you can always see when a rollback happened and what it restored. For example, if a flow is currently at version 5 and you roll back to version 3, the system creates version 6 whose configuration matches version 3. Versions 4 and 5 remain in the history for auditing.

Authentication

Requires a valid tenant and the admin role.

Request Body


Example Request

Example Response

The response returns the full updated decision flow record, including the new version in publishedVersions.

What Happens on Rollback

  1. The target version’s configSnapshot is looked up from the flow’s published version history.
  2. A new version is appended (e.g., version 6) with the restored configuration and rollback notes.
  3. The flow’s draftConfig is replaced with the restored configuration.
  4. The flow’s status is set to active.
  5. Entity caches (offers, decisioning gates) are invalidated so the rolled-back configuration takes effect immediately.
  6. An audit log entry is recorded with the rollback details, including the source and target version numbers.

Optimistic Concurrency

The rollback uses rowVersion-based optimistic concurrency control. If another user modifies the same flow between your read and the rollback, the request returns a 409 Conflict and you should retry.

Error Responses


Rollback replaces the current draft configuration with the restored version. Any unpublished draft changes will be overwritten. If you need to preserve in-progress work, publish or export the current draft before rolling back.
After a rollback, use the Decision Flow Versions endpoint to confirm the new version was created correctly. The version notes will clearly indicate it was a rollback (e.g., "Rollback to v3: Reverting due to scoring regression in v5").
See also: Decision Flow Versions | Decision Flows | Change History