---
title: "Clones a job definition into a new, private definition owned by the caller."
method: POST
path: "/job/definition/{definitionId}/clone"
tags: ["Job"]
---

# Clones a job definition into a new, private definition owned by the caller.

`POST /job/definition/{definitionId}/clone`

The clone's first revision copies the configuration of the source definition's latest
 revision and references the same dataset. Jobs, runs and earlier revisions are not
 copied. A preview pipeline is automatically created and returned in the response.
 Omit the name to derive it from the source definition.

## Path parameters

- `definitionId` string, required

## Request body

- object, nullable — The input for the clone job definition endpoint.
  - `definitionName` string, nullable — The name of the new job definition. Defaults to the source definition's name suffixed with "Copy".

## Response `200`

OK

- CloneJobDefinitionEndpointOutput — The result when a job definition has been cloned.
  - `definitionId` string, required — The id of the cloned job definition.
  - `pipelineId` string, required — The id of the created preview pipeline.

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/d779de93a5ee/schema)
