workflow-editor

Truncate Draft Chat

Chat-aware undo: truncate chat at message_index and restore the canvas YAML to the snapshot stored on that user message.

Used by both the undo button (with the index of the last user message) and the per-message pencil-edit button.

post/v3/workflow-editor/drafts/{workflow_id}/truncate-chat

Request

  • Base URL
    https://api.mentium.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Path parameters

workflow_idstring uuid required

Headers

mentium-workspace-idstring nullable

Request body

message_indexinteger required

Index of the user message to revert to (it and all later messages are dropped).

Response

Successful Response

idstring required
workspace_idstring required
namestring nullable
yaml_contentstring required
workflow_parent_idstring nullable
draft_idstring nullable

ID of the child draft linked to this workflow, if one exists. Only populated for non-draft (deployed / inactive) workflows.

created_atstring required
updated_atstring required
can_undoboolean

Whether undo is available

is_activeboolean

Whether the workflow is deployed and active

is_draftboolean

Whether this is a draft

deployed_versioninteger

Number of times this workflow has been deployed

Changes

No recorded changes to this operation across all 2 revisions of this API.