Skip to main content

Design Edits

design edits

Edits allow you to programmatically alter template properties when calling the design API. Any property that can be edited in the template editor can also be modified through the API using the edits schema.

Making Edits

When calling the design API, edit's can be made to an element in your design by providing an edit object with the name of the element and the properties you wish to modify.

If you'd like to edit the text of an element in your design you tagged with the name title, you would provide the following edit object as part of your request body:

{
"template_id": "123",
"edits": {
"title": {
"value": "New Text"
}
}
}

To change the image of an element tagged with the name logo, you would provide the following edit object:

{
"template_id": "123",
"edits": {
"logo": {
"imageURL": "https://example.com/new-image.png"
}
}
}

Element Types

Templates consist of three primary element types:

Element
Description
text
Represents textual content in the template
image
Represents image elements in the template. Can contain an image, solid color, or gradient.
shape
Similar to images, but masked to a specific shape

Edit Schema

The following tables outline the available modification options for each element type, as well as properties shared across all elements.

All Elements

Name
Type
Description
x
number
The position of the element on the x-axis
y
number
The position of the element on the y-axis
width
number
The width of the element
height
number
The height of the element
rotation
number
The rotation of the element
opacity
number
The opacity of the element

Text Elements

Name
Type
Description
value
string
The text to be processed
fontSize
string (enum)
The font size of the text (13, 16, 18, 24, 28, 36, 48, 64, 80, 96, 104, 120, 136, 160, 192, 200)
effect
The effect applied to the text
fontWeight
string (enum)
The font weight of the text (400, 700)
fontColor
string
The color of the text
columns
number
The number of columns for the text
justify
string (enum)
The justification of the text (left, center, right, justify)
font
string
The font family of the text. See Fonts for available options

Image Elements

Name
Type
Description
backgroundType
string (enum)
The type of background for the image item (image, color)
imageURL
The URL of the image or image generation details (see Image Prompt table below)
backgroundColor
string
The background color of the image item
backgroundGradientColor
string
The gradient color for the background
backgroundGradientStyle
string (enum)
The style of the background gradient (90deg, 180deg, 270deg, 360deg, radial-center, radial-corner)
border
The border properties of the image
imageShadow
The shadow properties of the image

Shape Elements

Name
Type
Description
backgroundType
string (enum)
The type of background for the image item (image, color)
imageURL
The URL of the image or image generation details (see Image Prompt table below)
backgroundColor
string
The background color of the shape
backgroundGradientColor
string
The gradient color for the background
backgroundGradientStyle
string (enum)
The style of the background gradient (90deg, 180deg, 270deg, 360deg, radial-center, radial-corner)

Additional Property Tables

Effect

Name
Type
Description
type
string (enum)
The type of effect applied to the text (none, strokeEffect, highlightEffect, shadowEffect)
properties
Properties specific to the chosen effect type

Stroke Effect

Name
Type
Description
weight
number
The weight of the stroke
color
string
The color of the stroke

Highlight Effect

Name
Type
Description
color
string
The color of the highlight
borderRadius
number
The border radius of the highlight

Shadow Effect

Name
Type
Description
xOffset
number
The x offset of the shadow
yOffset
number
The y offset of the shadow
blur
number
The blur of the shadow
color
string
The color of the shadow

Border

Name
Type
Description
thickness
string (enum)
The thickness of the border (thin, medium, thick)
roundness
string (enum)
The roundness of the border corners (square, soft, round)
corners
string (enum)
Which corners to apply the border to (all, top-left, top-right, bottom-right, bottom-left, top, bottom, left, right)

Shadow

Name
Type
Description
xOffset
number
The x offset of the shadow
yOffset
number
The y offset of the shadow
blur
number
The blur of the shadow
spread
number
The spread of the shadow
color
string
The color of the shadow

Image Prompt

Name
Type
Description
prompt
string
The prompt string for image generation
style
string (enum)
The pre-trained image generation model to use (e.g., ideate/3d, ideate/anime, ideate/photorealistic, etc.) See AI Image Generation for available styles