# Update a job preset

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

- API version: v1
- Operation ID: `v1_public_job_preset_update_put`
- 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-update-put/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Changes a job preset. Send `name`, `note` or `assigned_users` to change them, and list only the service lines, tasks and files that change, each with an `action`:

- `create`: a new line or task, with the same fields as when creating a preset, or a new file from an upload.
- `update`: an existing line, task or file by `id`, with its fields.
- `delete`: an existing line, task or file by `id`.

Lines and files you leave out stay as they are; an empty list changes nothing. A task `update` without `assigned_users` keeps its people.

Use PUT. PATCH runs no rules and saves nothing but a new `updated_at`.

Returns the updated preset. Jobs already made from it don't change.

## Permission

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

## Business rules

- Everything is checked against your team before anything is saved, and the whole save is one transaction: one refusal saves nothing.
- A new line, task or person, and any reference you change, must be live: a service, saved location and task preset that aren't deleted, and people who are active members of your team. An `update` line that keeps a deleted service, location or task preset, or a person who has left, still saves.
- A service `option` the service doesn't have still saves, but the preset reads `is_valid: false`.
- Top-level `assigned_users` sets the people on the job itself: sent, it replaces them (`[]` removes everyone); left out, they stay. On a task `update` line, `assigned_users` works the same way; a task `create` line without it has nobody.
- Files: a `create` row attaches a file you uploaded with "Upload a file" and not yet attached anywhere; a mockup must be an image. `update` and `delete` rows act only on this preset's own files; one that is already gone is skipped.
- `update` and `delete` line and task ids must be this preset's; another preset's line returns 404 and nothing is saved.

## Side effects

- A `delete` file row removes the file from the preset. Jobs made from the preset earlier keep their copy of it.
- Team members who have YoPrint open see the change 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. Its hash id from an earlier answer; there is no unique key for it. Example `8vxTyCrd1y1gdf`.

## Request body

Content type `application/json`, required.

Fields:

- `assigned_users` (array of objects, optional): The people on the job itself. Sent, the list replaces them (`[]` removes everyone); left out, they stay. People you add must be active members of your team.
  - Each item:
    - `id` (string, required): A team member's id, from `GET /v1/api/store/{team_slug}/setting/user`.
- `mockup` (array of objects, optional): Mockup images. A `create` row must be an image file.
  - Each item:
    - `action` (string, required): `create` attaches a file you uploaded with "Upload a file" (`POST /v1/api/store/{team_slug}/async_upload`). `update` changes one of this preset's files; `delete` removes it. One of: `"create"`, `"update"`, `"delete"`.
    - `id` (string, required): For `create`, the upload's `id`. For `update` and `delete`, the file's `id` from the preset's `mockup` list.
    - `job_service` (string | array, optional): The service line, or a list of them, this file belongs to: a line's `id`, or the `tmpid-` id of a line created in the same request. Ids that are not lines of this preset are ignored. When sent, it replaces the file's links; `[]` removes them.
    - `name` (string, optional): The file's display name. Left out, it keeps its name.
    - `position` (integer, optional): For `update`: where the file sorts among the preset's mockups. A `create` row always goes last.
    - `show_in_pdf` (boolean, optional): Whether the mockup shows on PDFs. Jobs made from the preset keep the setting.
- `name` (string, optional)
- `note` (string | null, optional)
- `pipeline` (array of objects, optional)
  - Each item:
    - `action` (string, required): What to do with this task. One of: `"create"`, `"update"`, `"delete"`.
    - `assigned_users` (array of objects, optional): Who the task is assigned to. A `create` line without it has nobody. On an `update` line, leave it out to keep the task's people, or send the whole list to replace them (`[]` removes everyone). People you add must be active members of your team; people already on the task may stay after they leave.
      - Each item:
        - `id` (string, required): A team member's id, from `GET /v1/api/store/{team_slug}/setting/user`.
    - `id` (string, optional): The task to change, for `update` and `delete`.
    - `name` (string, optional): The task's name.
    - `note` (string | null, optional)
    - `pipeline_id` (string, optional): The task preset this task follows, from `GET /v1/api/store/{team_slug}/setting/pipeline`. Required unless `action` is `delete`. A new task, or one that changes it, needs a task preset that isn't deleted.
    - `position` (integer, optional): Minimum -2147483648. Maximum 2147483647.
- `production_file` (array of objects, optional): Production files, of any type.
  - Each item:
    - `action` (string, required): `create` attaches a file you uploaded with "Upload a file" (`POST /v1/api/store/{team_slug}/async_upload`). `update` changes one of this preset's files; `delete` removes it. One of: `"create"`, `"update"`, `"delete"`.
    - `id` (string, required): For `create`, the upload's `id`. For `update` and `delete`, the file's `id` from the preset's `production_file` list.
    - `job_service` (string | array, optional): The service line, or a list of them, this file belongs to: a line's `id`, or the `tmpid-` id of a line created in the same request. Ids that are not lines of this preset are ignored. When sent, it replaces the file's links; `[]` removes them.
    - `name` (string, optional): The file's display name. Left out, it keeps its name.
    - `position` (integer, optional): For `update`: where the file sorts among the preset's production files. A `create` row always goes last.
    - `show_in_pdf` (boolean, optional): Saved on the file and copied to jobs made from the preset.
- `service` (array of objects, optional)
  - Each item:
    - `action` (string, required): What to do with this service line. One of: `"create"`, `"update"`, `"delete"`.
    - `customer_note` (string | null, optional): A note the customer sees. Jobs made from the preset get it on their service.
    - `id` (string, optional): For `update` and `delete`: the service line to change. On a `create` line you may send a temporary id that starts with `tmpid-` (such as `tmpid-1`), so a file row in the same request can name the new line in `job_service`.
    - `location` (object, optional): Where the service goes on the product. Required unless `action` is `delete`.
      - `type` (string, required): `database`: one of your saved service locations, by `id` (from `GET /v1/api/store/{team_slug}/service_location`). `custom`: a one-off location, by `name`. One of: `"database"`, `"custom"`.
      - `id` (string, optional): Required when `type` is `database`. A new or changed location must not be deleted. Ignored for `custom`.
      - `name` (string, optional): Required when `type` is `custom`.
    - `note` (string | null, optional): A production note for this service.
    - `option` (string, optional): One of the service's options (a column of its price table). Required unless `action` is `delete`. Any value saves, but one the service doesn't have marks the preset `is_valid: false`.
    - `position` (integer, optional): Order of the service lines. Required unless `action` is `delete`. Minimum -2147483648. Maximum 2147483647.
    - `service_id` (string, optional): The decoration service ID. Required unless `action` is `delete`. The service must be active (not deleted). Services are not listed directly on the public API; copy `service_id` from an existing job preset (List job presets) or from a job's services.

### Example request

```bash
curl -X PUT 'https://secure.yoprint.com/v1/api/store/your-team/setting/job_preset/8vxTyCrd1y1gdf' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1' \
  -H 'Content-Type: application/json' \
  -d '{
    "assigned_users": [
      {
        "id": "E6LjYJJimQNFVF"
      }
    ],
    "name": "Front print, two colors",
    "pipeline": [
      {
        "action": "delete",
        "id": "87uNbl9N8J0OPz"
      }
    ],
    "service": [
      {
        "action": "update",
        "customer_note": "Printed on the front, centered",
        "id": "amcoNda0bOuIpO",
        "location": {
          "id": "t1vO0qwTosoy1d",
          "type": "database"
        },
        "option": "2 Colors",
        "position": 1,
        "service_id": "sV7LFB1gpCcF8O"
      },
      {
        "action": "create",
        "location": {
          "name": "Left sleeve",
          "type": "custom"
        },
        "option": "1 Color",
        "position": 2,
        "service_id": "sV7LFB1gpCcF8O"
      }
    ]
  }'
```

## 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": [
      {
        "avatar_url": null,
        "id": "E6LjYJJimQNFVF",
        "name": "Alex Rivera",
        "removed": false
      }
    ],
    "id": "8vxTyCrd1y1gdf",
    "is_valid": true,
    "mockup": [
      {
        "collection": "mockup",
        "created_at": "2026-11-03T09:00:00+00:00",
        "custom_properties": {
          "show_in_pdf": true
        },
        "file_name": "front-logo.png",
        "id": "uAzgeGQMGvaVK3",
        "is_image": true,
        "job_preset_id": "8vxTyCrd1y1gdf",
        "job_service": [
          "amcoNda0bOuIpO"
        ],
        "mime_type": "image/png",
        "name": "Front logo",
        "position": 1,
        "preview": {
          "large": "https://example.com/media/uAzgeGQMGvaVK3/preview-1200.png",
          "medium": "https://example.com/media/uAzgeGQMGvaVK3/preview-800.png",
          "small": "https://example.com/media/uAzgeGQMGvaVK3/preview-250.png"
        },
        "show_in_pdf": true,
        "size": 48211,
        "source_media_id": null,
        "url": "https://example.com/media/uAzgeGQMGvaVK3/download",
        "view_url": "https://example.com/media/uAzgeGQMGvaVK3/view"
      }
    ],
    "name": "Front print, two colors",
    "needs_review": false,
    "note": "Standard tee front print",
    "pipeline": [],
    "position": "1.0000000000000000",
    "production_file": [],
    "service": [
      {
        "customer_note": "Printed on the front, centered",
        "id": "amcoNda0bOuIpO",
        "location": {
          "display_name": "Front",
          "id": "t1vO0qwTosoy1d",
          "trashed": false,
          "type": "database"
        },
        "note": null,
        "option": "2 Colors",
        "position": 1,
        "review_reason": null,
        "service_id": "sV7LFB1gpCcF8O",
        "service_name": "Screen printing",
        "valid": true,
        "version": 1
      },
      {
        "customer_note": null,
        "id": "3G6bb0Whg2ApYW",
        "location": {
          "display_name": "Left sleeve",
          "name": "Left sleeve",
          "trashed": false,
          "type": "custom"
        },
        "note": null,
        "option": "1 Color",
        "position": 2,
        "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: The preset, or a line or task named by `id`, is not found in this preset. Fix: Read the preset first and use its line ids.
  - When: A `create` file row names no upload of your team, or an `update` or `delete` file row names a file that isn't this preset's. `error.code` is null. Fix: Use the upload's `id`, or a file `id` from the preset.
- `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: `name` is missing (create), a line or file row has no `action`, a file row has no `id`, or a service line misses `service_id`, `option`, `location.type` or `position` (`validation_failed`). Fix: Send every required field; see the schema.
  - When: A service, location, task preset or person is not your team's, or is deleted where a live one is needed; or a file row names a file that isn't a free upload, or a mockup that isn't an image. `error.code` `job_validation_error`, with a message such as "Service not found!", "Assigned User not found!", "Please upload this file before adding it to a job preset." or "Mockups must be image files." Fix: Use ids from your own team's lists, and upload files first.

## 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}`
- [Delete a job preset](https://developer.yoprint.com/reference/job-presets/v1-job-preset-destroy.md): `DELETE /v1/api/store/{team_slug}/setting/job_preset/{hash_id}`
- [Upload a file](https://developer.yoprint.com/reference/uploads/v1-async-upload-store.md): `POST /v1/api/store/{team_slug}/async_upload`
