v1

latestOpenAPI 3.1.02026-07-22136108233.0 KB
workflows

Merge Workflow

Merge the current workflow into another workflow.

Updates the target workflow with all data from the source workflow (except version history), optionally copies trajectories, and deletes the source workflow.

post/v1/workflows/{workflow_id}/merge

Path parameters

workflow_idstring uuid required

Headers

Idempotency-Keystring
Example:550e8400-e29b-41d4-a716-446655440000

Unique key for idempotent requests. If provided, the server ensures the request is processed at most once. Retries with the same key return the original response. SDKs auto-generate this for write requests.

Request body

target_workflow_idstring uuid required

Workflow ID to merge into

copy_trajectoriesboolean

Whether to copy trajectories to the target workflow

Response

Successful Response

namestring nullable
main_promptstring required
input_schemastring nullable

JSON schema for validating merged run inputs. Sensitive root keys are exposed with a '$' prefix in schema validation (for example sensitive_input_values.api_key -> '$api_key').

output_schemastring nullable

JSON schema for output data transformation

includes_file_exportsboolean

Enable AI-based file export detection

is_webhooks_enabledboolean

Send webhook on run completion

terminal_command_allowliststring[] nullable

Optional workflow-level allowlist for execute_terminal_command. When set, the agent may only run commands that exactly match one of the approved command templates.

post_run_check_failure_cleanup_promptstring nullable

Optional workflow-level cleanup prompt that runs when any post-run check fails during a session or chain.

idstring uuid required
user_idstring uuid nullable
organization_idstring nullable
includes_input_variablesboolean
old_versionsobject[] nullable
created_atstring date-time required
updated_atstring date-time required