---
title: "Patch a preset by layer id"
method: PATCH
path: "/presets/{id}"
---

# Patch a preset by layer id

`PATCH /presets/{id}`

## Request

- Base URL: `https://rendry.io/api/v1`
- URL: `https://rendry.io/api/v1/presets/{id}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Partial edit: layer_patches are merged by layer id, everything else is left alone. Saves a new version and does NOT consume a template slot. Unknown fields are rejected with did-you-mean hints. preview: true returns the rendered image in the same response.

## Path parameters

- `id` string, required

## Headers

- `X-Rendry-Account` string

## Request body

- object
  - `name` string
  - `canvas` Canvas
    - `width` integer
    - `height` integer
    - `background_color` string
    - `output_format` string
    - `quality` integer
    - `max_width` integer
    - `finish_profile` string: Optional whole-canvas finish applied once after composition using the profile-specific paint policy. Use an exact id from the finish_profiles field returned by GET /capabilities; that runtime catalog also declares compatible formats and minimum dimensions.
  - `layers` object[]: Full replacement of the layer tree
  - `layer_patches` object[]: Partial patches merged by layer id
  - `preview` boolean: Also return the rendered preview inline, charged the preview price (0.1 credit) like POST /render/preview; the file is capped at 640 px on the long side. Saving the new version itself costs nothing.

## Response `200`

New version saved

- PresetPatchResult: The reply of PATCH /presets/{id}: the same JSON the MCP tool update_preset returns.
  - `preset_id` string: The template's group id
  - `preset_group_id` string: The template's group id, equal to preset_id
  - `version_id` string: The exact version row written by this patch
  - `parent_id` string: The exact predecessor version read before applying this patch
  - `name` string
  - `variables` string[]: Every {variable} the patched layers accept in dynamic_data
  - `inputs` InputDescriptor[]: Present for a template that computes some of its values (a template or formula definition): the class, mode and dependencies of every name. Absent otherwise.
    - `name` string, required
    - `class` 'required' | 'defaulted' | 'computed' | 'fact', required: required: referenced and never authored — send it, or the render refuses. defaulted: an authored text a caller may replace. computed: a template or formula the template evaluates; a literal a caller sends replaces it for that call and cuts its dependencies. fact: page or pages, the engine's — cannot be supplied.
    - `mode` 'text' | 'template' | 'formula': The authored mode of a definition; absent for a name that has none.
    - `dependencies` string[]: The names a computed definition references, sorted.
    - `used` boolean, required: Content reaches this name, directly or through computed definitions. An unused authored definition is still listed: removing one is an explicit act. Not what a render needs: every template and formula is evaluated on every render, drawn or not, so a required name that only an undrawn definition reads is still required and is listed in `variables`.
    - `format` DisplayFormat: One deterministic display vocabulary. Numbers use exact arithmetic and half away from zero rounding. Currency needs symbol (a symbol or ISO code), with explicit spacing in that text. Percent multiplies a raw ratio by 100. Dates accept strict YYYY-MM-DD only and patterns D, DD, M, MM, MMM, MMMM, YY, YYYY with English month names. upper/lower use Unicode simple case mapping; no locale or multi-character expansions. No format leaves existing text untouched. Fields unrelated to the selected type are refused.
      - `type` 'number' | 'currency' | 'percent' | 'date' | 'upper' | 'lower', required
      - `decimals` integer
      - `grouping` boolean
      - `decimal_mark` string
      - `group_mark` string
      - `symbol` string
      - `symbol_position` 'prefix' | 'suffix'
      - `prefix` string
      - `suffix` string
      - `pattern` string
  - `hint` string
  - `warnings` string[]: Findings about the FINAL state after the patch; empty when the layout checks found nothing
  - `warnings_note` string: What the warnings list covers
  - `chart_fit` object[]: Measured geometry of every chart layer; sent only when the preset has one
  - `palettes` object: The data palettes in force, when the preset declares any
  - `autofixed_fields` string[]: Fields renamed on the way in
  - `autofix_note` string
  - `image_base64` string: With preview: true — the updated design as a JPEG
  - `mime_type` string
  - `look_at_it` string: With preview: true — what to check on the picture
  - `preview_note` string: With preview: true — why no picture came back

## Other responses

- `401`: Missing/invalid API key
- `404`: `preset_not_found` — absent, deleted or another account's, alike.

---

[API](https://skmtc.dev/rendry/apis/rendry-api.md) · [All operations](https://skmtc.dev/rendry/apis/rendry-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rendry/apis/rendry-api/revisions/c4fb572c26c9?raw)
