Skip to content

Import Email Design System from JSON

POST
/api/v1/workspaces/{workspace_id}/email_design_systems/import
curl --request POST \
--url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/email_design_systems/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email_design_system": { "name": "My Email Design System", "description": "My Email Design System", "design_tokens": { "primary_button_color": "#007bff", "secondary_button_color": "#6c757d" }, "custom_styles": [ { "style": "background-color: yellow; font-weight: bold;", "name": "highlight", "label": "Highlight" } ] }, "container_component": { "name": "MyComponent", "label": "My Component", "description": "A hero banner image with a headline and image, body text and a call to action button.", "container": false, "template": "<div>My Component</div>", "field_definitions": [ { "type": "text", "label": "example", "group": "Styling", "liquid_variable": "heading_text", "visible_if": "show_heading == true", "default_value": "example", "validations": { "min_length": 1, "max_length": 1, "must_not_be_blank": true, "must_not_be_default": true }, "hint": "Keep this short and punchy", "hidden_in_editor": true, "hidden_from_ai": true, "feed_field_name": "example" } ], "position": 1, "feed_id": 12345, "deprecated": false }, "components": [ { "name": "MyComponent", "label": "My Component", "description": "A hero banner image with a headline and image, body text and a call to action button.", "container": false, "template": "<div>My Component</div>", "field_definitions": [ { "type": "text", "label": "example", "group": "Styling", "liquid_variable": "heading_text", "visible_if": "show_heading == true", "default_value": "example", "validations": { "min_length": 1, "max_length": 1, "must_not_be_blank": true, "must_not_be_default": true }, "hint": "Keep this short and punchy", "hidden_in_editor": true, "hidden_from_ai": true, "feed_field_name": "example" } ], "position": 1, "feed_id": 12345, "deprecated": false } ] }'

Imports an email design system from JSON data.

  • OAuth2
    email_design_systems:write
workspace_id
required
integer

Workspace ID

Media typeapplication/json
object
email_design_system
required
object
name
required
string
Example
My Email Design System
description
required
string
nullable
Example
My Email Design System
design_tokens
required
object
key
additional properties
any
Example
{
"primary_button_color": "#007bff",
"secondary_button_color": "#6c757d"
}
custom_styles
required
Array<object>
nullable
object
style
required
string
Example
background-color: yellow; font-weight: bold;
name
required
string
Example
highlight
label
required
string
Example
Highlight
container_component
required
object
name
required
string
Example
MyComponent
label
required
string
Example
My Component
description
required
string
nullable
Example
A hero banner image with a headline and image, body text and a call to action button.
container
boolean
nullable
Example
false
template
required
string
Example
<div>My Component</div>
field_definitions
required
Array
One of:
object
type
required
string
Allowed values: text
label
required
string
group

An optional label used to group related fields together in the editor.

string
nullable
Example
Styling
liquid_variable
required

The Liquid variable name used to reference this field in templates.

string
Example
heading_text
visible_if

A Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.

string
Example
show_heading == true
default_value
required
string
validations
object
min_length
integer
max_length
integer
must_not_be_blank
boolean
must_not_be_default
boolean
hint

Helper text displayed below the field in the editor.

string
Example
Keep this short and punchy
hidden_in_editor

Whether this field is hidden from the editor UI.

boolean
hidden_from_ai

Whether this field is hidden from AI Agents.

boolean
feed_field_name

The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.

string
nullable
position
required
integer
nullable
Example
1
feed_id
required
integer
nullable
Example
12345
deprecated
required
boolean
Example
false
components
required
Array<object>
object
name
required
string
Example
MyComponent
label
required
string
Example
My Component
description
required
string
nullable
Example
A hero banner image with a headline and image, body text and a call to action button.
container
boolean
nullable
Example
false
template
required
string
Example
<div>My Component</div>
field_definitions
required
Array
One of:
object
type
required
string
Allowed values: text
label
required
string
group

An optional label used to group related fields together in the editor.

string
nullable
Example
Styling
liquid_variable
required

The Liquid variable name used to reference this field in templates.

string
Example
heading_text
visible_if

A Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.

string
Example
show_heading == true
default_value
required
string
validations
object
min_length
integer
max_length
integer
must_not_be_blank
boolean
must_not_be_default
boolean
hint

Helper text displayed below the field in the editor.

string
Example
Keep this short and punchy
hidden_in_editor

Whether this field is hidden from the editor UI.

boolean
hidden_from_ai

Whether this field is hidden from AI Agents.

boolean
feed_field_name

The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.

string
nullable
position
required
integer
nullable
Example
1
feed_id
required
integer
nullable
Example
12345
deprecated
required
boolean
Example
false

Successful

Media typeapplication/json
object
id
required
integer
name
required
string
description
string
created_at
required
string format: date-time
updated_at
string format: date-time
organization_id
required
integer
workspace_id
required
integer
screenshot_url
required
string
upload_status
required
string
Allowed values: ready processing
require_brand_profile_for_use
required
boolean
archived
required
boolean
design_tokens
required
object
key
additional properties
any
access_scope
required
string
Allowed values: all_workspaces this_workspace_only
custom_styles
required
Array<object>
object
style
required
string
name
required
string
label
required
string
Example
{
"id": 12345,
"name": "My Email Design System",
"description": "My Email Design System",
"created_at": "2023-08-23T10:30:00.000Z",
"updated_at": "2023-08-23T10:30:00.000Z",
"organization_id": 12345,
"workspace_id": 12345,
"screenshot_url": "https://www.example.com/screenshot.png",
"upload_status": "ready",
"require_brand_profile_for_use": false,
"archived": false,
"design_tokens": {
"primary_button_color": "#007bff",
"secondary_button_color": "#6c757d"
},
"access_scope": "all_workspaces",
"custom_styles": [
{
"style": "background-color: yellow; font-weight: bold;",
"name": "highlight",
"label": "Highlight"
}
]
}

Unauthorized

Media typeapplication/json
object
message
required
string
Example
{
"message": "Record not found"
}

Forbidden

Media typeapplication/json
object
message
required
string
Example
{
"message": "Record not found"
}

Unprocessable Entity

Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{
"errors": {
"username": [
"Username is required.",
"Username must be unique."
],
"email": [
"Invalid email format."
]
}
}