Import Email Design System from JSON
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/email_design_systems/import';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Workspace ID
Request Body
Section titled “Request Body”object
object
Example
My Email Design SystemExample
My Email Design Systemobject
Example
{ "primary_button_color": "#007bff", "secondary_button_color": "#6c757d"}object
Example
background-color: yellow; font-weight: bold;Example
highlightExample
Highlightobject
Example
MyComponentExample
My ComponentExample
A hero banner image with a headline and image, body text and a call to action button.Example
falseExample
<div>My Component</div>object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
object
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
Whether to skip link tracking for URLs in this field.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
object
object
object
object
object
Example
{ "bold": { "enabled": true }, "italic": { "enabled": true }, "link": { "enabled": true }, "bullet_list": { "enabled": true }, "numbered_list": { "enabled": true }}Names of custom rich text styles available for this field.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
Example
1Example
12345Example
falseobject
Example
MyComponentExample
My ComponentExample
A hero banner image with a headline and image, body text and a call to action button.Example
falseExample
<div>My Component</div>object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
object
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
Whether to skip link tracking for URLs in this field.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
object
object
object
object
object
Example
{ "bold": { "enabled": true }, "italic": { "enabled": true }, "link": { "enabled": true }, "bullet_list": { "enabled": true }, "numbered_list": { "enabled": true }}Names of custom rich text styles available for this field.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
object
An optional label used to group related fields together in the editor.
Example
StylingThe Liquid variable name used to reference this field in templates.
Example
heading_textA Liquid expression (without the surrounding {% %}) that determines when this field is visible in the editor.
Example
show_heading == trueobject
Helper text displayed below the field in the editor.
Example
Keep this short and punchyWhether this field is hidden from the editor UI.
Whether this field is hidden from AI Agents.
The name of the feed field that populates this field’s value. If null, this field is not populated from a feed.
Example
1Example
12345Example
falseResponses
Section titled “Responses”Successful
object
object
object
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
object
Example
{ "message": "Record not found"}Forbidden
object
Example
{ "message": "Record not found"}Unprocessable Entity
object
object
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}