Create a template from JSON DSL

Full DSL reference: https://rendry.io/docs. Canvas up to 6144x6144, up to 40 layers.

post/presets

Request

  • Base URL: https://rendry.io/api/v1
  • URL: https://rendry.io/api/v1/presets
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Headers

X-Rendry-Accountstring

Browser/OAuth current member account selector. API keys/embed credentials are bound to their persisted account and reject another account. Omitting this header selects the browser actor personal account.

Request body

sample_rowsobject

Sample rows of repeat groups and tables, drawn until a render passes real rows

derivedobject[]

Colours FROM a photo: [{"name": "hero", "from": "<image layer id>"}]; then $hero.bg | .support | .accent | .on | .0..5 as any colour

namestring required
descriptionstring
layersobject[] required
modificationsobject

Sources of the template's variables: the sample (default) value of each {name} when dynamic_data does not supply one — or, with a mode in variable_modes, the template or formula that computes it.

variable_modesobject

How each modifications source is read (grammar and limits: GET /capabilities nested_variables). Missing, null or {} means every source is text, literal. template: {name} inserts that variable's value, {{ and }} print one brace. formula: exact decimal arithmetic (+ - * /, unary signs, parentheses, round(x[, decimals]), min(a,b,...), max(a,b,...), abs(x)) over numbers and {name}; additive grammar 3 adds count({items}) and sum({items},{amount}) over the effective whole rows source. Aggregate brace arguments are source/field handles, not variable edges. Empty count/sum is zero; every needed sum cell must be decimal, with a private one-based row/field refusal before charge. Unused, hidden and overridden aggregates read nothing; table and aggregate sources share the fetch cache/budget. Aggregate-dependent visible_if inside link_dest/follows refuses before reads; a literal controller override is allowed; a terminating result prints in full, a repeating one is rounded to nested_variables.projection_digits significant digits. A mode needs a source under the same name; page and pages are engine facts and take no mode; row.* names take none. A save refuses a schema problem (VariableDiagnosticCode invalid_mode, invalid_name, reserved_name, unsupported_row_scope, source_limit) and writes nothing; a definition that does not resolve from the saved values is saved and named in warnings, and a render refuses it before any charge unless dynamic_data supplies a literal for it. dynamic_data is always literal: a supplied value replaces the definition of that name for the call and is never parsed as a template or a formula. What a caller sends and what the template computes is told apart by InputDescriptor.

palettesobject

Colours a field takes from data: {"tier": {"gold": "#C9A227", "default": "#444444"}}. A colour field then refers to one by the variable that chooses it — "fill_color": "{tier}" reads dynamic_data.tier, and inside a repeat the row's own tier field. An unknown value takes "default"; a palette without one refuses the render and names the values it admits.

variable_formatsobject nullable

Sparse name -> display format beside modifications and variable_modes. A name needs a source in modifications and cannot be page, pages or row.*. Applied after source evaluation and also to caller overrides; formulas consume raw exact values while templates insert formatted text. Invalid schema refuses save; invalid data refuses dry run and render before any charge, without echoing values. update_preset patches: absent or {} keeps; name:null removes; top-level null clears. Whole preset and document saves replace the map.

Response

Created. preset_id is the template's GROUP id (what the render doors take); version_id is the version row.

preset_idstring required

The template's group id (equal to preset_group_id)

preset_group_idstring required
version_idstring required

The version written: the id GET /presets rows show

status'created' | 'updated' required
autofixesstring[]

Fields renamed on the way in (e.g. font_size read as size) — send the canonical names from now on

warningsstring[]

What will look broken in the output; fix before rendering

Changes

No recorded changes to this operation across all 1 revision of this API.