Update a template (new version)
Send only what changes: the body is merged over the current version, and a field it leaves out keeps its value ({"width": 1080, "height": 1080} is a whole update); "" empties css or description. variables, when not sent, stay as they are unless html or css changes, and are then derived from the new markup. Same limits as create. Never edits in place: the template moves to version + 1 — every PUT does, a rename included — and the previous bytes stay readable as {id}@{version}, so a job or automation that pinned a version keeps rendering exactly that. Built-in ids are 403; to start from one, create your own with its html.
Request
- Base URL: https://api.imagestep.dev
- URL: https://api.imagestep.dev/api/v1/templates/{id}
- Auth: API key in header Authorization
Path parameters
Template id or your own slug
Headers
Optional. A client-generated unique key (typically a UUID). Same key + the same request (method, path, query string and body) replays the first response verbatim with Idempotency-Replayed: true, without executing again. Same key + a different one returns 409 idempotency_key_reuse. A repeat that arrives while the first is still running returns 409 request_in_progress, which is retryable. Keys are retained 24 hours. At most 255 characters; a longer one is a 400 invalid_param with param: "Idempotency-Key".
Request body
Example request
{
"name": "Quote card",
"width": 1080,
"height": 1350,
"html": "<main><blockquote>{{ quote }}</blockquote><cite>{{ author }}</cite></main>",
"css": "main{display:grid;place-items:center;height:100%;font-family:system-ui}",
"variables": [
"quote",
"author"
]
}Response
The template, at its new version
Changes
No recorded changes to this operation across all 1 revision of this API.