v36

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0187270483.0 KB
Functions

Copy a Function

Copy a function to a new name within the same environment.

Forks the source function's current configuration into a brand-new function. The copy starts at versionNum: 1 regardless of how many versions the source has — version history is not carried over.

Useful for experimenting with schema or prompt changes against a stable production function without disturbing existing callers.

The destination name must be unique in the environment. A copy does not migrate workflows: existing workflow nodes continue to reference the original function.

post/v3/functions/copy

Request body

sourceFunctionNamestring required

Name of the function to copy from. Must be a valid existing function name.

targetFunctionNamestring required

Name for the new copied function. Must be unique within the target environment.

targetDisplayNamestring

Optional display name for the copied function. If not provided, defaults to the source function's display name with " (Copy)" appended.

targetEnvironmentstring

Optional environment name to copy the function to. If not provided, the function will be copied within the same environment.

tagsstring[]

Optional array of tags for the copied function. If not provided, defaults to the source function's tags.

Response

The request has succeeded.