Modifications
modifications is the object you send with a render request to override a template's parameters. It's a flat map from variableName to a replacement value — every key must match a variable name that exists on the template (see GET /v1/templates/:id/parameters to discover them — the MCP tool list_template_parameters returns the same data for MCP clients).
{
"headline": "50% off today",
"backgroundImage": "https://example.com/sale-bg.jpg",
"accentColor": "#ff5a1f"
}| Param | Type | Notes |
|---|---|---|
| format | string | Every value is passed as a string, regardless of the underlying layer type — image URLs and hex colors included. |
| unmatched keys | — | A key that doesn't match any variableName on the template is ignored, not rejected. |
| grouped layers | — | Layers inside a group are filled in too — a key reaches its layer however deeply it is grouped. |
In a multi-page design (a carousel), a plain key applies to every page that has that variable. Prefix a key with a page to set it on one slide only — page2@headline by position (from 1), or s2@headline by page id. On each page a page-id key beats a position key, which beats the plain key. Every value must be a string, or the render is refused with 400 INVALID_MODIFICATIONS.
{
"headline": "Used on every slide without its own value",
"page1@headline": "Slide one",
"s3@headline": "The slide whose id is s3"
}Variables inside groups work like any other. Brand templates often group a headline with its backing shape; the grouped headline is still listed as a parameter and still replaced:
{
"type": "Group",
"objects": [
{ "type": "Rect", "fill": "#1d3b63" },
{ "type": "Textbox", "variableName": "quote_text", "text": "Sample quote" }
]
}
// modifications: { "quote_text": "Markets reward patience." }
// → the grouped Textbox renders "Markets reward patience."Was this page helpful?