v1

latestOpenAPI 3.1.02026-07-22136108233.0 KB
workflows

Duplicate Workflow

Duplicate a workflow, including prompt images and optional generated trajectories.

Copies everything except version history, and prefixes the name with "(Copy)".

post/v1/workflows/{workflow_id}/duplicate

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

include_trajectoriesboolean

Whether to duplicate generated trajectories onto the copied workflow. Non-generated trajectories are never duplicated.

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