Skip to content

Update Layout

PATCH
/api/v1/workspaces/{workspace_id}/layouts/{id}
curl --request PATCH \
--url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/layouts/1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "email_design_system_id": 1, "brand_profile_id": 1, "content": { "container_component_instance": { "id": "bd1c1b82-1a7b-4f0f-b079-30c1d4189bed", "name": "My Component", "component_name": "Headline", "conditional_id": 1, "inline_conditional": { "default_syntax": { "closing": "{% endif %}", "branch_values": { "gold_membership": "{% if membership == '\''gold'\'' %}", "silver_membership": "{% elsif membership == '\''silver'\'' %}" } }, "branches": [ { "key": "gold_membership", "label": "Gold Membership" } ], "dynamic_content_profile_syntaxes": { "additionalProperty": { "closing": "{% endif %}", "branch_values": { "gold_membership": "{% if membership == '\''gold'\'' %}", "silver_membership": "{% elsif membership == '\''silver'\'' %}" } } } }, "field_values": { "additionalProperty": { "additionalProperty": { "additionalProperty": { "value": "example", "link_tracking_parameters": { "additionalProperty": "example" } } } } }, "hidden_from_locales": { "additionalProperty": true }, "link_tracking_parameters": { "branch_content": { "additionalProperty": { "additionalProperty": { "additionalProperty": "example" } } } } }, "component_instances": [ { "id": "bd1c1b82-1a7b-4f0f-b079-30c1d4189bed", "name": "My Component", "component_name": "Headline", "conditional_id": 1, "inline_conditional": { "default_syntax": { "closing": "{% endif %}", "branch_values": { "gold_membership": "{% if membership == '\''gold'\'' %}", "silver_membership": "{% elsif membership == '\''silver'\'' %}" } }, "branches": [ { "key": "gold_membership", "label": "Gold Membership" } ], "dynamic_content_profile_syntaxes": { "additionalProperty": { "closing": "{% endif %}", "branch_values": { "gold_membership": "{% if membership == '\''gold'\'' %}", "silver_membership": "{% elsif membership == '\''silver'\'' %}" } } } }, "field_values": { "additionalProperty": { "additionalProperty": { "additionalProperty": { "value": "example", "link_tracking_parameters": { "additionalProperty": "example" } } } } }, "hidden_from_locales": { "additionalProperty": true }, "link_tracking_parameters": { "branch_content": { "additionalProperty": { "additionalProperty": { "additionalProperty": "example" } } } } } ] } }'

Updates a layout.

workspace_id
required
integer

Workspace ID

id
required
integer

Layout ID

Media typeapplication/json
object
name
string
email_design_system_id
integer
brand_profile_id
integer | null
content
object
container_component_instance
required
object
id
required
string format: uuid
Example
bd1c1b82-1a7b-4f0f-b079-30c1d4189bed
name
string
Example
My Component
component_name
required

The name of the component definition this instance is based on.

string
Example
Headline
conditional_id

The ID of a saved conditional applied to this component instance. When set, inline_conditional must not be set. The component renders a separate variant for each branch of the conditional.

integer | null
Example
1
inline_conditional
One of:

A conditional definition owned by a single component instance in an email.

object
default_syntax
required
object
closing
required

The closing syntax tag for the conditional block.

string
Example
{% endif %}
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
Example
{
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
branches
required
Array<object>
object
key
required
string
Example
gold_membership
label
required
string
Example
Gold Membership
dynamic_content_profile_syntaxes
required
object
key
additional properties

A per-DynamicContentProfile syntax entry on a Conditional.

object
closing

The closing syntax tag for the conditional block.

string
Example
{% endif %}
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
Example
{
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
field_values

Field values organized by branch key.

object
key
additional properties

Field values organized by locale code.

object
key
additional properties

Field values keyed by liquid variable name.

object
key
additional properties
object
value
required
One of:
string
link_tracking_parameters

Link tracking parameter values specific to this field.

object
key
additional properties
string
hidden_from_locales

A map of locale codes to boolean values indicating whether this component instance is hidden for that locale.

object
key
additional properties
boolean
Example
true
link_tracking_parameters
object
branch_content

Per-component-instance link tracking parameter values, organized by branch key, then by locale code.

object
key
additional properties
object
key
additional properties

A map of link tracking parameter names to their values for this component instance.

object
key
additional properties
string
component_instances
required
Array<object>
object
id
required
string format: uuid
Example
bd1c1b82-1a7b-4f0f-b079-30c1d4189bed
name
string
Example
My Component
component_name
required

The name of the component definition this instance is based on.

string
Example
Headline
conditional_id

The ID of a saved conditional applied to this component instance. When set, inline_conditional must not be set. The component renders a separate variant for each branch of the conditional.

integer | null
Example
1
inline_conditional
One of:

A conditional definition owned by a single component instance in an email.

object
default_syntax
required
object
closing
required

The closing syntax tag for the conditional block.

string
Example
{% endif %}
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
Example
{
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
branches
required
Array<object>
object
key
required
string
Example
gold_membership
label
required
string
Example
Gold Membership
dynamic_content_profile_syntaxes
required
object
key
additional properties

A per-DynamicContentProfile syntax entry on a Conditional.

object
closing

The closing syntax tag for the conditional block.

string
Example
{% endif %}
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
Example
{
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
field_values

Field values organized by branch key.

object
key
additional properties

Field values organized by locale code.

object
key
additional properties

Field values keyed by liquid variable name.

object
key
additional properties
object
value
required
One of:
string
link_tracking_parameters

Link tracking parameter values specific to this field.

object
key
additional properties
string
hidden_from_locales

A map of locale codes to boolean values indicating whether this component instance is hidden for that locale.

object
key
additional properties
boolean
Example
true
link_tracking_parameters
object
branch_content

Per-component-instance link tracking parameter values, organized by branch key, then by locale code.

object
key
additional properties
object
key
additional properties

A map of link tracking parameter names to their values for this component instance.

object
key
additional properties
string

Successful

Media typeapplication/json
object
id
required
integer
name
required
string
content
required
object
container_component_instance
required
object
id
required
string format: uuid
name
string
component_name
required

The name of the component definition this instance is based on.

string
conditional_id

The ID of a saved conditional applied to this component instance. When set, inline_conditional must not be set. The component renders a separate variant for each branch of the conditional.

integer | null
inline_conditional
One of:

A conditional definition owned by a single component instance in an email.

object
default_syntax
required
object
closing
required

The closing syntax tag for the conditional block.

string
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
branches
required
Array<object>
object
key
required
string
label
required
string
dynamic_content_profile_syntaxes
required
object
key
additional properties

A per-DynamicContentProfile syntax entry on a Conditional.

object
closing

The closing syntax tag for the conditional block.

string
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
field_values

Field values organized by branch key.

object
key
additional properties

Field values organized by locale code.

object
key
additional properties

Field values keyed by liquid variable name.

object
key
additional properties
object
value
required
One of:
string
link_tracking_parameters

Link tracking parameter values specific to this field.

object
key
additional properties
string
hidden_from_locales

A map of locale codes to boolean values indicating whether this component instance is hidden for that locale.

object
key
additional properties
boolean
link_tracking_parameters
object
branch_content

Per-component-instance link tracking parameter values, organized by branch key, then by locale code.

object
key
additional properties
object
key
additional properties

A map of link tracking parameter names to their values for this component instance.

object
key
additional properties
string
component_instances
required
Array<object>
object
id
required
string format: uuid
name
string
component_name
required

The name of the component definition this instance is based on.

string
conditional_id

The ID of a saved conditional applied to this component instance. When set, inline_conditional must not be set. The component renders a separate variant for each branch of the conditional.

integer | null
inline_conditional
One of:

A conditional definition owned by a single component instance in an email.

object
default_syntax
required
object
closing
required

The closing syntax tag for the conditional block.

string
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
branches
required
Array<object>
object
key
required
string
label
required
string
dynamic_content_profile_syntaxes
required
object
key
additional properties

A per-DynamicContentProfile syntax entry on a Conditional.

object
closing

The closing syntax tag for the conditional block.

string
branch_values

Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.

object
key
additional properties
string
field_values

Field values organized by branch key.

object
key
additional properties

Field values organized by locale code.

object
key
additional properties

Field values keyed by liquid variable name.

object
key
additional properties
object
value
required
One of:
string
link_tracking_parameters

Link tracking parameter values specific to this field.

object
key
additional properties
string
hidden_from_locales

A map of locale codes to boolean values indicating whether this component instance is hidden for that locale.

object
key
additional properties
boolean
link_tracking_parameters
object
branch_content

Per-component-instance link tracking parameter values, organized by branch key, then by locale code.

object
key
additional properties
object
key
additional properties

A map of link tracking parameter names to their values for this component instance.

object
key
additional properties
string
email_design_system_id
required
integer
brand_profile_id
required
integer | null
locales
required
Array<string>
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"id": 12345,
"name": "Admin",
"content": {
"container_component_instance": {
"id": "bd1c1b82-1a7b-4f0f-b079-30c1d4189bed",
"name": "My Component",
"component_name": "Headline",
"conditional_id": 1,
"inline_conditional": {
"default_syntax": {
"closing": "{% endif %}",
"branch_values": {
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
},
"branches": [
{
"key": "gold_membership",
"label": "Gold Membership"
}
],
"dynamic_content_profile_syntaxes": {
"additionalProperty": {
"closing": "{% endif %}",
"branch_values": {
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
}
}
},
"hidden_from_locales": {
"additionalProperty": true
}
},
"component_instances": [
{
"id": "bd1c1b82-1a7b-4f0f-b079-30c1d4189bed",
"name": "My Component",
"component_name": "Headline",
"conditional_id": 1,
"inline_conditional": {
"default_syntax": {
"closing": "{% endif %}",
"branch_values": {
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
},
"branches": [
{
"key": "gold_membership",
"label": "Gold Membership"
}
],
"dynamic_content_profile_syntaxes": {
"additionalProperty": {
"closing": "{% endif %}",
"branch_values": {
"gold_membership": "{% if membership == 'gold' %}",
"silver_membership": "{% elsif membership == 'silver' %}"
}
}
}
},
"hidden_from_locales": {
"additionalProperty": true
}
}
]
},
"email_design_system_id": 12345,
"brand_profile_id": 12345,
"locales": [
"en-GB"
],
"created_at": "2023-08-23T10:30:00.000Z",
"updated_at": "2023-08-23T10:30:00.000Z"
}

Unauthorized

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

Forbidden

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

Not Found

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

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."
]
}
}