List Component Presets
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/component_presets?per=10&page=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/component_presets?per=10&page=1' \ --header 'Authorization: Bearer <token>'Retrieves the component presets.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Workspace ID
Query Parameters
Section titled “Query Parameters”Email Design System ID
Component name
Number of records per page
Page number
Responses
Section titled “ Responses ”Successful
object
object
The name of the component definition this preset is based on.
object
The name of the component definition this instance is based on.
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.
A conditional definition owned by a single component instance in an email.
object
object
The closing syntax tag for the conditional block.
Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.
object
object
object
A per-DynamicContentProfile syntax entry on a Conditional.
object
The closing syntax tag for the conditional block.
Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.
object
Field values organized by branch key.
object
Field values organized by locale code.
A map of locale codes to boolean values indicating whether this component instance is hidden for that locale.
object
object
Per-component-instance link tracking parameter values, organized by branch key, then by locale code.
object
object
A map of link tracking parameter names to their values for this component instance.
object
The locale used as the default when rendering or screenshotting this preset.
URL of the rendered preset screenshot.
Locales present in the preset content. Derived from the component instance on save; not user-settable.
Branch keys present in the preset content. Derived from the component instance on save; not user-settable.
object
Example
{ "results": [ { "id": 12345, "name": "Black Friday hero", "component_name": "Headline", "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 } }, "email_design_system_id": 12345, "default_locale": "en-US", "screenshot_url": "https://placehold.co/600x400?text=Preset", "locales": [ "en-GB" ], "branches": [ "default" ], "created_at": "2023-08-23T10:30:00.000Z", "updated_at": "2023-08-23T10:30:00.000Z" } ], "pagination": { "per": 10, "page": 1, "total": 100 }}Unauthorized
object
Example
{ "message": "Record not found", "code": "share_link_expired"}Forbidden
object
Example
{ "message": "Record not found", "code": "share_link_expired"}Not Found
object
Example
{ "message": "Record not found", "code": "share_link_expired"}