Search for a command to run...
This is an Enterprise only private endpoint. Checkout the Enterprise Pricing to get access.
Update the content of text and image layers in a studio template. This endpoint allows you to modify parameterized elements directly without re-saving the entire template structure. Supports updating multiple parameters across multiple pages in a single request.
For detailed information about the template data structure, see Anatomy of a Template.
https://api.orshot.com/v1/studio/templates/:templateId/update-modifications// Update text and image on a single page
await fetch("https://api.orshot.com/v1/studio/templates/12345/update-modifications", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
data: [
{
page: 1,
modifications: {
headline: "Flash Sale: 24 Hours Only!",
subtitle: "Don't miss out on amazing deals",
product_image: "https://cdn.example.com/sale-banner.png",
price: "$49.99"
}
}
]
}),
});| Limit | Value |
|---|---|
| Requests per minute | 30 |
| Max modifications per request | 50 |
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | Integer | Yes | The ID of the template to update |
The request body uses a data array format, where each item specifies the page number and modifications to apply:
{
"data": [
{
"page": 1,
"modifications": {
"headline": "New Headline Text",
"product_image": "https://cdn.example.com/new-image.png",
"price": "$99.99"
}
}
]
}| Parameter | Type | Required | Description |
|---|---|---|---|
data | Array | Yes | Array of page modification objects |
Each object in the data array should include:
| Field | Type | Required | Description |
|---|---|---|---|
page | Integer | Yes | Page number (1-indexed) to apply modifications to |
modifications | Object | Yes | Key-value pairs of parameterId to new value |
Update text element content by its parameterId:
{
"page": 1,
"modifications": {
"headline": "Summer Sale 2026!",
"subtitle": "Up to 50% off all items",
"cta_text": "Shop Now"
}
}Update image sources by providing a URL:
{
"page": 1,
"modifications": {
"product_image": "https://cdn.example.com/product.png",
"logo": "https://cdn.example.com/logo.svg",
"background": "https://cdn.example.com/bg.jpg"
}
}Update style properties using dot notation:
{
"page": 1,
"modifications": {
"headline.fontSize": 48,
"headline.color": "#ff0000",
"cta_button.backgroundColor": "#007bff",
"subtitle.fontFamily": "Inter"
}
}| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the operation completed |
template_id | Integer | ID of the updated template |
applied | Array | List of successfully applied modifications |
failed | Array | List of failed modifications (only if any failed) |
| Field | Type | Description |
|---|---|---|
page | Integer | Page number where the modification was applied/failed |
key | String | The parameter ID or style path |
type | String | Type of modification: text, image, or style |
error | String | Error message (only for failed items) |
When using dot notation for style updates, the following properties are commonly supported:
| Property | Type | Description |
|---|---|---|
fontSize | Number | Font size in pixels |
fontFamily | String | Font family name |
color | String | Text color (hex, rgb, rgba) |
backgroundColor | String | Background color |
opacity | Number | Opacity (0-1) |
fontWeight | String/Number | Font weight (normal, bold, 100-900) |
textAlign | String | Text alignment (left, center, right) |
letterSpacing | Number | Letter spacing in pixels |
lineHeight | Number | Line height multiplier |
| Status Code | Error | Description |
|---|---|---|
| 400 | data required | Request body missing data array |
| 400 | data array empty | Empty data array |
| 400 | page must be positive integer | Invalid page number |
| 400 | modifications must be object | Invalid modifications format |
| 403 | Access Forbidden | Invalid API key or template not in workspace |
| 404 | Template not found | Template ID doesn't exist |
| 429 | Rate limit exceeded | Too many requests (max 30/min) |
| 500 | Internal server error | Server-side error |
When modifications are applied:
parameterId set on elements you want to updatefailed array in responses for partial failures