Skip to main content
POST
Duplicate Workflow

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

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.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Path Parameters

workflow_id
string<uuid>
required

Body

application/json

Schema for duplicating workflows.

include_trajectories
boolean
default:false

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

Response

Successful Response

Workflow response schema

main_prompt
string
required
Minimum string length: 1
id
string<uuid>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
name
string | null
Maximum string length: 255
input_schema
string | null

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_schema
string | null

JSON schema for output data transformation

includes_file_exports
boolean
default:false

Enable AI-based file export detection

is_webhooks_enabled
boolean
default:false

Send webhook on run completion

terminal_command_allowlist
string[] | null

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.

model_metadata
WorkflowModelMetadata · object | null

Optional workflow-level model configuration metadata (main agent, cache detection, and fallbacks).

post_run_check_failure_cleanup_prompt
string | null

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

user_id
string<uuid> | null
organization_id
string | null
includes_input_variables
boolean
default:false
workflow_metadata
WorkflowInternalMetadata · object | null

Internal workflow metadata used for run/error tracking.

old_versions
Old Versions · object[] | null
tags
WorkflowTagResponse · object[] | null

Tags assigned to this workflow

post_run_checks
WorkflowPostRunCheckResponse · object[] | null

Post-run checks assigned to this workflow.