Clone a script

Copies a script into a new UNPUBLISHED one. The source document is re-imported, so the clone's trigger type and parameters come from the code itself rather than being copied across.

The default name is {source name} (copy), so cloning the same script twice without a name override returns 400 the second time. An override name is trimmed, and an override description normalised, before validation.

Path Params
uuid
required

Id of the script.

Body Params

Optional overrides. When the body or a field is omitted, the clone name defaults to "{source name} (copy)" and the description is carried over from the source.

Optional name/description overrides for the clone. Both fields are optional.

string
length between 3 and 50

Optional. Same rules as import: unique per tenant, letters/digits/spaces/hyphens/underscores, no leading/trailing space, no consecutive separators. Defaults to "{source name} (copy)".

string
length ≤ 250

Optional. UTF-8; letters/digits/punctuation/spaces only; script-injection patterns rejected. When omitted, the source description is carried over.

Headers
string
^\d+\.\d+\.\d+$

Version of the API contract the client targets, in MAJOR.MINOR.PATCH format. Mandated by the Gateway standard. Not yet enforced: requests without the header, or with an unsupported value, are currently processed normally. Once enforcement is enabled, such requests will be rejected with 400 Bad Request.

string
required
length ≥ 1

Required on every POST, PUT and PATCH. A client-generated key: retrying with the same key returns the original response without running the request again. Scoped per tenant, user, method and path. A missing or blank key is rejected with 400.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json