# Duplicate a job preset

```http
POST https://secure.yoprint.com/v1/api/store/{team_slug}/setting/job_preset/{hash_id}/duplicate
```

- API version: v1
- Operation ID: `v1_public_job_preset_duplicate`
- Section: Team settings › [Job presets](https://developer.yoprint.com/reference/job-presets.md)
- Web page: https://developer.yoprint.com/reference/job-presets/v1-job-preset-duplicate/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Copies a job preset to the end of the list, named like it with " (copy)" added (the original name is shortened if the result would pass 191 characters).

The copy gets the note, the service lines, the tasks, the people still on your team, and the files. Copied files share the stored file with the original and keep their links to the copied service lines. People who were deleted or left your team are not copied.

It takes no body. Returns the new preset.

## Permission

Needs the Manage Settings permission. The team owner always has it.

## Business rules

- Deleted services, locations and task presets are copied as they are, so a preset that needs review gives a copy that needs review too.

## Side effects

- Team members who have YoPrint open see the new preset at once.

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.
- `hash_id` (string, required): The job preset to copy. Its hash id from an earlier answer; there is no unique key for it. Example `8vxTyCrd1y1gdf`.

## Request body

This operation takes no request body.

### Example request

```bash
curl -X POST 'https://secure.yoprint.com/v1/api/store/your-team/setting/job_preset/8vxTyCrd1y1gdf/duplicate' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1'
```

## Response

`200` Successful response.

Fields:

- `data` (object, required)
  - `assigned_users` (array of objects, required): The people on the job itself. Jobs made from the preset get the ones still on your team.
    - Each item:
      - `avatar_url` (string | null, required): Their profile picture, or null.
      - `id` (string, required)
      - `name` (string, required)
      - `removed` (boolean, required): True when the person was deleted or is no longer on your team. They stay listed until someone takes them off; jobs made from the preset leave them out.
  - `id` (string, required)
  - `is_valid` (boolean, required): False when a service, saved location, or task preset it uses was deleted, or a service option no longer exists.
  - `mockup` (array of objects, required): Mockup images, in their order.
    - Each item:
      - `collection` (string, required): One of: `"mockup"`, `"production_file"`.
      - `created_at` (string (date-time), required): When the file record was made: the upload time, or for a duplicated preset, when it was copied.
      - `custom_properties` (object | array, required)
      - `file_name` (string, required)
      - `id` (string, required): The file's id: use it in `update` and `delete` file rows.
      - `is_image` (boolean, required)
      - `job_preset_id` (string, required): The preset the file belongs to.
      - `job_service` (array of strings, required): The ids of this preset's service lines the file belongs to. A job made from the preset links its copy to the matching new services.
      - `mime_type` (string | null, required)
      - `name` (string | null, required): The display name.
      - `position` (integer | null, required): Where the file sorts, lowest first.
      - `preview` (object | null, required): Preview image links `small`, `medium` and `large` (250, 800 and 1200 px), or null when there is no preview.
      - `show_in_pdf` (boolean | null, required): Null when it was never set.
      - `size` (integer, required): Bytes.
      - `source_media_id` (null, required): Always null on a preset's files.
      - `url` (string | null, required): Where to download the file.
      - `view_url` (string | null, required): A signed link to view the file. It expires: read it fresh, and don't store it.
      - `dimensions` (object | null, optional): Pixel size of an image, read from its header; null for other files and for images uploaded before the size was recorded.
        - `height` (integer, optional)
        - `width` (integer, optional)
      - `preview_state` (string, optional): `ready`: the preview links work. `processing`: an image over 10 MB whose stored preview a worker is still making (seconds); read the file again, or in the web app wait for `media.preview_state_changed` on the team channel. `too_large`: an image over 120 megapixels; it never gets a preview. `failed`: the worker gave up. `none`: not an image. One of: `"ready"`, `"processing"`, `"too_large"`, `"failed"`, `"none"`.
  - `name` (string, required)
  - `needs_review` (boolean, required): True when the preset needs review (shown as "Needs review" in the web app): - `is_valid` is false (a service, service option, saved location, or task preset was deleted) - A team member assigned to one of its tasks was deleted or left the team (assignees on the job itself do not trigger review) A preset that needs review still saves. Creating a job from it omits missing tasks and removed teammates.
  - `note` (string | null, required)
  - `pipeline` (array of objects, required): The tasks.
    - Each item:
      - `assigned_users` (array of objects, optional): Same fields as `data.assigned_users` above.
      - `id` (string, optional)
      - `is_valid` (boolean, optional)
      - `name` (string | null, optional)
      - `note` (string | null, optional)
      - `pipeline` (object | null, optional): The task preset it follows, as `GET /v1/api/store/{team_slug}/setting/pipeline/{hash_id}` returns it: `id`, `label`, `color`, `version`, `enable`, `trashed`, and its `statuses` (deleted ones included).
        - `color` (string, optional)
        - `enable` (boolean, optional)
        - `id` (string, optional)
        - `label` (string, optional)
        - `statuses` (array of objects, optional)
          - Each item:
            - `color` (string, required)
            - `customer_label` (string, required): What customers see in the customer portal. When none is set: `Pending` for `start`, `In Progress` for `in_progress` and `pre_production`, `Completed` for `end`.
            - `id` (string, required)
            - `label` (string, required)
            - `position` (integer, required): Sort order within the list, lowest first.
            - `role` (string, required): Which list the status belongs to: - `order`: sales orders - `quote`: quotes - `job`: jobs - `purchase_order`: purchase orders - `shipment`: shipments - `customer_message`: message threads - `pipeline`: tasks within a task preset One of: `"order"`, `"quote"`, `"job"`, `"purchase_order"`, `"shipment"`, `"customer_message"`, `"pipeline"`.
            - `trashed` (boolean, required): True for a deleted status. Only the full list includes deleted ones.
            - `type` (string, required): The stage of the status in the workflow: `start` (first status in the list), `pre_production`, `in_progress`, or `end` (final status). One of: `"start"`, `"pre_production"`, `"in_progress"`, `"end"`.
            - `pipeline_id` (string, optional): The task preset, for `pipeline` statuses only. Absent for every other role.
        - `trashed` (boolean, optional)
        - `version` (integer, optional)
      - `pipeline_color` (string | null, optional): The task preset's color.
      - `pipeline_id` (string, optional)
      - `pipeline_name` (string | null, optional): The task preset's name.
      - `position` (integer, optional): 0 when none was sent.
      - `trashed` (boolean, optional): True when its task preset was deleted.
  - `position` (string, required): Sort order within the preset list, lowest first. A decimal string, such as `"1.0000000000000000"`; parse it as a decimal.
  - `production_file` (array of objects, required): Production files, in their order. Same fields as `data.mockup` above.
  - `service` (array of objects, required): The service lines.
    - Each item:
      - `version` (integer, optional): Always `1`.
      - `customer_note` (string | null, optional)
      - `id` (string, optional)
      - `location` (object, optional): `type`, `display_name` and `trashed` (true when a saved location was deleted), plus `id` for a saved location or `name` for a custom one.
      - `note` (string | null, optional)
      - `option` (string | null, optional)
      - `position` (integer, optional)
      - `review_reason` (string | null, optional): Why the line needs review: its service was deleted, the service no longer has this option, or its saved location was deleted. Null when the line is fine. One of: `"service_removed"`, `"option_removed"`, `"location_removed"`.
      - `service_id` (string, optional)
      - `service_name` (string | null, optional)
      - `valid` (boolean, optional): False when `review_reason` is set.
  - `updated_at` (string (date-time) | null, required): When the preset was last edited ("Last edited" in the web app). Every save changes it, even one that changes only its lines; reordering presets doesn't.
- `status` (integer, required)
- `success` (boolean, required)

Example response:

```json
{
  "data": {
    "assigned_users": [],
    "id": "fWPTmWjX0LWtNl",
    "is_valid": true,
    "mockup": [
      {
        "collection": "mockup",
        "created_at": "2026-11-04T09:00:00+00:00",
        "custom_properties": {
          "show_in_pdf": true,
          "source_media_id": 1001
        },
        "file_name": "front-logo.png",
        "id": "z7X5WcBkhsQvUZ",
        "is_image": true,
        "job_preset_id": "fWPTmWjX0LWtNl",
        "job_service": [
          "OtVSA8cEfjTUZ7"
        ],
        "mime_type": "image/png",
        "name": "Front logo",
        "position": 1,
        "preview": {
          "large": "https://example.com/media/z7X5WcBkhsQvUZ/preview-1200.png",
          "medium": "https://example.com/media/z7X5WcBkhsQvUZ/preview-800.png",
          "small": "https://example.com/media/z7X5WcBkhsQvUZ/preview-250.png"
        },
        "show_in_pdf": true,
        "size": 48211,
        "source_media_id": null,
        "url": "https://example.com/media/z7X5WcBkhsQvUZ/download",
        "view_url": "https://example.com/media/z7X5WcBkhsQvUZ/view"
      }
    ],
    "name": "Front print, one color (copy)",
    "needs_review": false,
    "note": "Standard tee front print",
    "pipeline": [
      {
        "assigned_users": [
          {
            "avatar_url": null,
            "id": "E6LjYJJimQNFVF",
            "name": "Alex Rivera",
            "removed": false
          }
        ],
        "id": "uA2Q5KwD3jCbFp",
        "is_valid": true,
        "name": "Print",
        "note": null,
        "pipeline": {
          "color": "#FFFFFF",
          "enable": true,
          "id": "eIOQnV5PP0pp7c",
          "label": "Screen printing",
          "statuses": [
            {
              "color": "#f5f5f5",
              "customer_label": "Pending",
              "id": "fA3KDzwnMRc5Cd",
              "label": "To do",
              "pipeline_id": "eIOQnV5PP0pp7c",
              "position": 0,
              "role": "pipeline",
              "trashed": false,
              "type": "start"
            },
            {
              "color": "#424242",
              "customer_label": "Completed",
              "id": "MIJM9QpP6O0whd",
              "label": "Done",
              "pipeline_id": "eIOQnV5PP0pp7c",
              "position": 1,
              "role": "pipeline",
              "trashed": false,
              "type": "end"
            }
          ],
          "trashed": false,
          "version": 1
        },
        "pipeline_color": "#FFFFFF",
        "pipeline_id": "eIOQnV5PP0pp7c",
        "pipeline_name": "Screen printing",
        "position": 1,
        "trashed": false
      }
    ],
    "position": "2.0000000000000000",
    "production_file": [],
    "service": [
      {
        "customer_note": "Printed on the front, centered",
        "id": "OtVSA8cEfjTUZ7",
        "location": {
          "display_name": "Front",
          "id": "t1vO0qwTosoy1d",
          "trashed": false,
          "type": "database"
        },
        "note": null,
        "option": "1 Color",
        "position": 1,
        "review_reason": null,
        "service_id": "sV7LFB1gpCcF8O",
        "service_name": "Screen printing",
        "valid": true,
        "version": 1
      }
    ],
    "updated_at": "2026-11-04T09:00:00+00:00"
  },
  "status": 200,
  "success": true
}
```

## Errors

- `401` The API key is missing or wrong (`unauthenticated`).
- `403` You are not allowed to do this. `api_access_not_in_plan`: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only `{"message": "Insufficient Permission"}`. Other refusals use the error envelope, with `unauthorized` or `user_is_not_authorized`.
  - When: Your role lacks Manage Settings. The body is `{"message": "Insufficient Permission"}`, without the error envelope. Fix: Use the key of a member whose role has Manage Settings, or the owner's.
- `404` Not found. `page_not_found`: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. `code: null`, with a message that starts "No query results for": there is no record with that id.
  - When: No job preset of your team has this id. `error.code` is null; `error.message` names the record type. Fix: Use an id from the list.
- `422` The request was refused and changed nothing. `validation_failed` lists what to fix in `error.fields`; other codes name a business rule, explained in `error.message`. A few checks answer with only `{"message": "..."}`. An operation that calls another service (a payment provider, a carrier, an accounting app) can answer `connect_timeout` ("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.
  - When: A service, saved location or task preset the preset points to can't be found for your team, not even among deleted ones: `error.code` `job_validation_error`, such as "Service not found!". Nothing is copied. Fix: Edit the preset to remove that line, then try again.

## Related

- [Get a job preset](https://developer.yoprint.com/reference/job-presets/v1-job-preset-show.md): `GET /v1/api/store/{team_slug}/setting/job_preset/{hash_id}`
- [Touch a job preset](https://developer.yoprint.com/reference/job-presets/v1-job-preset-update-patch.md): `PATCH /v1/api/store/{team_slug}/setting/job_preset/{hash_id}`
- [List job presets](https://developer.yoprint.com/reference/job-presets/v1-job-preset-index.md): `GET /v1/api/store/{team_slug}/setting/job_preset`
