Skip to content
v1.0.0
OpenAPI 3.0.3

Template Themes API

A template theme is a reusable set of email design settings, such as colors, fonts, spacing and button styles. Use this API to create and manage themes, apply a theme to one or more emails, and see which emails use it.

Enable Template Themes in your plugin settings and authenticate requests with a plugin token that has the API role. You can use this API without opening the editor. Unlinking an email from a theme is also available when Template Themes is disabled.

Themes can be shared across your plugin or separated by brand, customer or another value using the plugin's keyTemplate setting. If that setting contains placeholders, supply their values in the Es-Plugin-Ui-Data header. See that header's description for details and an example. Send the data for the operation itself in the request body where one is required.

Server:https://plugins.stripo.email

Stripo Plugin API server

Client Libraries

Methods

​

List template themes

​

Returns the themes available for your plugin and the values supplied in Es-Plugin-Ui-Data. Requires READ permission for TEMPLATE_THEMES.

Query Parameters

  • Set to true to include a theme preview as SVG markup in the response. Omit this parameter, set it to false or leave its value empty to exclude the preview. Only true, false or an empty value is accepted. Include this parameter at most once.

Headers

  • Values used to select a group of themes, such as themes for a particular brand or customer. Send a URL-encoded JSON object with string values. This header is required only if your plugin's keyTemplate setting contains placeholders that need these values. For example, tenant_${tenantId} needs a tenantId value identifying the customer. All placeholders must have values, and the resulting key may contain only ASCII letters, digits, underscores and hyphens.

    To access the same themes as the editor, use the same values supplied in uiData when opening the editor. If keyTemplate uses ${emailId}, supply emailId here as well. An emailId in this header selects the group of themes; emailId or emailIds in the request body selects the emails to change.

    The example is the URL-encoded form of {"tenantId":"qa-theme-api"}.

Responses

  • The list of available themes.

    • Unique theme ID assigned by Stripo. Use this value as themeId in other requests.

    • Email design settings encoded as a JSON string. Numeric values are preserved when creating a theme. Later responses may use different JSON formatting, so read this value as JSON rather than comparing the text character by character.

    • The theme's name, including any spaces supplied at the beginning or end.

    • When the theme was last updated, as milliseconds since January 1, 1970, 00:00:00 UTC.

    • Theme version, starting at 1. Increases when design settings change. Renaming the theme or changing only JSON formatting does not increase it. Use this value as expectedVersion when updating the theme.

    • A preview of the theme as SVG markup. Included only when withPreview=true.

    application/json
  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for get/coediting/v1/template-themes
curl 'https://plugins.stripo.email/coediting/v1/template-themes?withPreview=false' \
  --header 'Es-Plugin-Ui-Data: %7B%22tenantId%22%3A%22qa-theme-api%22%7D' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN'
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "string",
    "json": "string",
    "version": 1,
    "preview": "string",
    "updatedAt": 1
  }
]

Create a template theme

​

Creates a reusable theme without changing any email. Requires MODIFY permission for TEMPLATE_THEMES. The theme limit applies to the whole plugin, including themes separated by brand, customer or other values. Sending the same request again may create another theme.

Query Parameters

  • Set to true to include a theme preview as SVG markup in the response. Omit this parameter, set it to false or leave its value empty to exclude the preview. Only true, false or an empty value is accepted. Include this parameter at most once.

Headers

  • Values used to select a group of themes, such as themes for a particular brand or customer. Send a URL-encoded JSON object with string values. This header is required only if your plugin's keyTemplate setting contains placeholders that need these values. For example, tenant_${tenantId} needs a tenantId value identifying the customer. All placeholders must have values, and the resulting key may contain only ASCII letters, digits, underscores and hyphens.

    To access the same themes as the editor, use the same values supplied in uiData when opening the editor. If keyTemplate uses ${emailId}, supply emailId here as well. An emailId in this header selects the group of themes; emailId or emailIds in the request body selects the emails to change.

    The example is the URL-encoded form of {"tenantId":"qa-theme-api"}.

Body·

required
application/json

Provide a name and a complete set of email design settings in a single JSON object. The json field accepts either a JSON object or a string containing that object.

  • Complete email design settings, using the structure shown below. Supply either the object itself or a JSON string containing the same object. Include all required fields; a partial set of settings is not accepted. This field does not accept email content, HTML, CSS or other brand information.

    Complete design settings for the email as a whole, its sections, headings and buttons. The lightTheme and darkTheme sections contain settings for light and dark display modes. Include all required fields in both. If a required field allows null and you do not set a value, include that field with null. Missing required values are not filled in automatically. The create-theme example provides a complete object.

    Use fixed CSS color values, such as #ffffff or rgb(255, 255, 255), rather than CSS variables. Background fields also accept a gradient followed by a fallback color for email clients that cannot display the gradient. Image paths and background image sizes must be nonempty strings without leading or trailing whitespace. Font names must not be blank.

    • Button appearance, including text, background, borders, spacing and hover styles.

      Properties: 13
    • Settings for the whole email, including its width, alignment, spacing and background.

      Properties: 13
    • Font, size, spacing and color settings for heading levels h1 through h6.

      Properties: 10
    • Text and background styles for email sections, such as the header, main content and footer.

      Properties: 10
  • Theme name. It cannot be empty or contain only spaces or other whitespace. The length limit is 100 UTF-16 code units; most letters count as one, while characters such as emoji can count as two. Leading and trailing spaces are kept.

Responses

  • The newly created theme.

    • Unique theme ID assigned by Stripo. Use this value as themeId in other requests.

    • Email design settings encoded as a JSON string. Numeric values are preserved when creating a theme. Later responses may use different JSON formatting, so read this value as JSON rather than comparing the text character by character.

    • The theme's name, including any spaces supplied at the beginning or end.

    • When the theme was last updated, as milliseconds since January 1, 1970, 00:00:00 UTC.

    • Theme version, starting at 1. Increases when design settings change. Renaming the theme or changing only JSON formatting does not increase it. Use this value as expectedVersion when updating the theme.

    • A preview of the theme as SVG markup. Included only when withPreview=true.

    application/json
  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • The maximum number of themes allowed for your plugin has been reached.

    • Maximum number of themes allowed across your entire plugin.

    application/json
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for post/coediting/v1/template-themes
curl 'https://plugins.stripo.email/coediting/v1/template-themes?withPreview=false' \
  --request POST \
  --header 'Es-Plugin-Ui-Data: %7B%22tenantId%22%3A%22qa-theme-api%22%7D' \
  --header 'Content-Type: application/json' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN' \
  --data '{
  "name": "QA API theme",
  "json": {
    "general": {
      "defaultStyles": true,
      "hideImageDownloadIcons": true,
      "underlineLinks": true,
      "responsiveDesign": true,
      "messageAlignment": "center",
      "messageContentWidth": 600,
      "backgroundImage": null,
      "rightToLeftTextDirection": false,
      "marginsAroundMessage": {
        "desktop": {
          "top": 0,
          "right": 0,
          "bottom": 0,
          "left": 0
        },
        "mobile": {
          "top": 0,
          "right": 0,
          "bottom": 0,
          "left": 0
        }
      },
      "defaultStructurePadding": {
        "desktop": {
          "top": 10,
          "right": 10,
          "bottom": 10,
          "left": 10
        },
        "mobile": {
          "top": 5,
          "right": 5,
          "bottom": 5,
          "left": 5
        }
      },
      "customListStyles": {
        "leftIndent": 40,
        "listItemsBottomSpace": 15,
        "listTopBottomMargin": 15
      },
      "lightTheme": {
        "backgroundColor": "#f6f6f6",
        "customListStyles": {
          "listMarkerColor": "#112233",
          "listNumberMarkerColor": "transparent"
        }
      },
      "darkTheme": {
        "backgroundColor": null,
        "customListStyles": {
          "listMarkerColor": null,
          "listNumberMarkerColor": null
        }
      }
    },
    "stripes": {
      "letterSpacing": {
        "value": 0,
        "unit": "px"
      },
      "lineHeight": {
        "desktop": 1.5,
        "mobile": 1.5
      },
      "fontFamily": "Arial, sans-serif",
      "fontWeight": 400,
      "header": {
        "fontSize": {
          "desktop": 16,
          "mobile": 16
        },
        "paragraphBottomSpace": null,
        "backgroundImage": {
          "path": "https://example.com/header.png",
          "repeat": false,
          "x": "center",
          "y": "top",
          "sizeX": "auto",
          "sizeY": "auto"
        }
      },
      "content": {
        "fontSize": {
          "desktop": 14,
          "mobile": 14
        },
        "paragraphBottomSpace": null
      },
      "footer": {
        "fontSize": {
          "desktop": 14,
          "mobile": 14
        },
        "paragraphBottomSpace": null,
        "backgroundImage": null
      },
      "infoArea": {
        "fontSize": {
          "desktop": 12,
          "mobile": 12
        },
        "paragraphBottomSpace": null
      },
      "lightTheme": {
        "header": {
          "stripeBackgroundColor": "transparent",
          "contentBackgroundColor": "#ffffff",
          "fontColor": "#101010",
          "linkColor": "#202020",
          "linkColorHover": "#303030"
        },
        "content": {
          "contentBackgroundColor": "#ffffff",
          "fontColor": "#404040",
          "linkColor": "#505050",
          "linkColorHover": "#606060"
        },
        "footer": {
          "stripeBackgroundColor": "transparent",
          "contentBackgroundColor": "#ffffff",
          "fontColor": "#707070",
          "linkColor": "#808080",
          "linkColorHover": "#909090"
        },
        "infoArea": {
          "fontColor": "#a0a0a0",
          "linkColor": "#b0b0b0",
          "linkColorHover": "#c0c0c0"
        }
      },
      "darkTheme": {
        "header": {
          "stripeBackgroundColor": null,
          "contentBackgroundColor": null,
          "fontColor": null,
          "linkColor": null,
          "linkColorHover": null
        },
        "content": {
          "contentBackgroundColor": null,
          "fontColor": null,
          "linkColor": null,
          "linkColorHover": null
        },
        "footer": {
          "stripeBackgroundColor": null,
          "contentBackgroundColor": null,
          "fontColor": null,
          "linkColor": null,
          "linkColorHover": null
        },
        "infoArea": {
          "fontColor": null,
          "linkColor": null,
          "linkColorHover": null
        }
      }
    },
    "headings": {
      "letterSpacing": {
        "value": 0,
        "unit": "px"
      },
      "fontFamily": "Arial, sans-serif",
      "h1": {
        "textAlign": {
          "mobile": "left"
        },
        "textStyle": {
          "italic": false
        },
        "fontWeight": null,
        "fontSize": {
          "desktop": 40,
          "mobile": 40
        },
        "lineHeight": {
          "desktop": 1.2,
          "mobile": 1.2
        },
        "paragraphBottomSpace": null
      },
      "h2": {
        "textAlign": {
          "mobile": "left"
        },
        "textStyle": {
          "italic": false
        },
        "fontWeight": null,
        "fontSize": {
          "desktop": 32,
          "mobile": 32
        },
        "lineHeight": {
          "desktop": 1.2,
          "mobile": 1.2
        },
        "paragraphBottomSpace": null
      },
      "h3": {
        "textAlign": {
          "mobile": "left"
        },
        "textStyle": {
          "italic": false
        },
        "fontWeight": null,
        "fontSize": {
          "desktop": 28,
          "mobile": 28
        },
        "lineHeight": {
          "desktop": 1.2,
          "mobile": 1.2
        },
        "paragraphBottomSpace": null
      },
      "h4": {
        "textAlign": {
          "mobile": "left"
        },
        "textStyle": {
          "italic": false
        },
        "fontWeight": null,
        "fontSize": {
          "desktop": 24,
          "mobile": 24
        },
        "lineHeight": {
          "desktop": 1.2,
          "mobile": 1.2
        },
        "paragraphBottomSpace": null
      },
      "h5": {
        "textAlign": {
          "mobile": "left"
        },
        "textStyle": {
          "italic": false
        },
        "fontWeight": null,
        "fontSize": {
          "desktop": 20,
          "mobile": 20
        },
        "lineHeight": {
          "desktop": 1.2,
          "mobile": 1.2
        },
        "paragraphBottomSpace": null
      },
      "h6": {
        "textAlign": {
          "mobile": "left"
        },
        "textStyle": {
          "italic": false
        },
        "fontWeight": null,
        "fontSize": {
          "desktop": 16,
          "mobile": 16
        },
        "lineHeight": {
          "desktop": 1.2,
          "mobile": 1.2
        },
        "paragraphBottomSpace": null
      },
      "lightTheme": {
        "h1": {
          "fontColor": "#111111"
        },
        "h2": {
          "fontColor": "#222222"
        },
        "h3": {
          "fontColor": "#333333"
        },
        "h4": {
          "fontColor": "#444444"
        },
        "h5": {
          "fontColor": "#555555"
        },
        "h6": {
          "fontColor": "#666666"
        }
      },
      "darkTheme": {
        "h1": {
          "fontColor": null
        },
        "h2": {
          "fontColor": null
        },
        "h3": {
          "fontColor": null
        },
        "h4": {
          "fontColor": null
        },
        "h5": {
          "fontColor": null
        },
        "h6": {
          "fontColor": null
        }
      }
    },
    "buttons": {
      "outlookSupport": false,
      "textStyle": {
        "bold": false,
        "italic": false
      },
      "textTransform": "none",
      "fontFamily": "arial,'\''helvetica neue'\'',helvetica,sans-serif",
      "letterSpacing": {
        "value": 0,
        "unit": "px"
      },
      "fontSize": {
        "desktop": 14,
        "mobile": 14
      },
      "borderRadius": {
        "topLeft": 15,
        "topRight": 15,
        "bottomRight": 15,
        "bottomLeft": 15
      },
      "fitContainer": {
        "desktop": false,
        "mobile": false
      },
      "border": {
        "top": {
          "width": 1
        },
        "right": {
          "width": 2
        },
        "bottom": {
          "width": 3
        },
        "left": {
          "width": 4
        },
        "style": "solid"
      },
      "hoverButtonStyles": true,
      "padding": {
        "desktop": {
          "top": 10,
          "right": 20,
          "bottom": 10,
          "left": 20
        },
        "mobile": {
          "top": 10,
          "right": 20,
          "bottom": 10,
          "left": 20
        }
      },
      "lightTheme": {
        "buttonColor": "#31cb4b",
        "fontColor": "#ffffff",
        "hoverButtonStyles": {
          "backgroundColor": "#2cb543",
          "fontColor": "#eeeeee",
          "borderColor": {
            "top": "#555555",
            "right": "#666666",
            "bottom": "#777777",
            "left": "#888888"
          }
        },
        "borderColor": {
          "top": "#111111",
          "right": "#222222",
          "bottom": "#333333",
          "left": "#444444"
        }
      },
      "darkTheme": {
        "buttonColor": null,
        "fontColor": null,
        "hoverButtonStyles": {
          "backgroundColor": null,
          "fontColor": null,
          "borderColor": {
            "top": null,
            "right": null,
            "bottom": null,
            "left": null
          }
        },
        "borderColor": {
          "top": null,
          "right": null,
          "bottom": null,
          "left": null
        }
      }
    }
  }
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "string",
  "json": "string",
  "version": 1,
  "preview": "string",
  "updatedAt": 1
}

Update a template theme

​

Changes a theme's name, design settings or both. Requires MODIFY permission for TEMPLATE_THEMES. Set expectedVersion to the theme's current version and provide name, json or both. The json field must contain the complete design settings as a JSON string.

Changing a setting increases the version. Renaming the theme or changing only JSON formatting does not. If expectedVersion no longer matches, the request returns HTTP 409. Retrieve the theme list again, review the latest settings and retry with the current version.

Path Parameters

  • The theme's id returned when you create or list themes.

Query Parameters

  • Set to true to include a theme preview as SVG markup in the response. Omit this parameter, set it to false or leave its value empty to exclude the preview. Only true, false or an empty value is accepted. Include this parameter at most once.

Headers

  • Values used to select a group of themes, such as themes for a particular brand or customer. Send a URL-encoded JSON object with string values. This header is required only if your plugin's keyTemplate setting contains placeholders that need these values. For example, tenant_${tenantId} needs a tenantId value identifying the customer. All placeholders must have values, and the resulting key may contain only ASCII letters, digits, underscores and hyphens.

    To access the same themes as the editor, use the same values supplied in uiData when opening the editor. If keyTemplate uses ${emailId}, supply emailId here as well. An emailId in this header selects the group of themes; emailId or emailIds in the request body selects the emails to change.

    The example is the URL-encoded form of {"tenantId":"qa-theme-api"}.

Body·

required
application/json

Provide the current theme version and a new name, complete design settings or both.

Responses

  • The theme after the update.

    • Unique theme ID assigned by Stripo. Use this value as themeId in other requests.

    • Email design settings encoded as a JSON string. Numeric values are preserved when creating a theme. Later responses may use different JSON formatting, so read this value as JSON rather than comparing the text character by character.

    • The theme's name, including any spaces supplied at the beginning or end.

    • When the theme was last updated, as milliseconds since January 1, 1970, 00:00:00 UTC.

    • Theme version, starting at 1. Increases when design settings change. Renaming the theme or changing only JSON formatting does not increase it. Use this value as expectedVersion when updating the theme.

    • A preview of the theme as SVG markup. Included only when withPreview=true.

    application/json
  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • expectedVersion does not match the theme's current version. Retrieve the latest theme before retrying.

    text/plain
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for patch/coediting/v1/template-themes/{themeId}
curl 'https://plugins.stripo.email/coediting/v1/template-themes/{themeId}?withPreview=false' \
  --request PATCH \
  --header 'Es-Plugin-Ui-Data: %7B%22tenantId%22%3A%22qa-theme-api%22%7D' \
  --header 'Content-Type: application/json' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN' \
  --data '{
  "expectedVersion": 1,
  "name": "Updated theme"
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "string",
  "json": "string",
  "version": 1,
  "preview": "string",
  "updatedAt": 1
}

Delete a template theme

​

Deletes the theme and unlinks all emails that use it. Requires MODIFY permission for TEMPLATE_THEMES.

Path Parameters

  • The theme's id returned when you create or list themes.

Headers

  • Values used to select a group of themes, such as themes for a particular brand or customer. Send a URL-encoded JSON object with string values. This header is required only if your plugin's keyTemplate setting contains placeholders that need these values. For example, tenant_${tenantId} needs a tenantId value identifying the customer. All placeholders must have values, and the resulting key may contain only ASCII letters, digits, underscores and hyphens.

    To access the same themes as the editor, use the same values supplied in uiData when opening the editor. If keyTemplate uses ${emailId}, supply emailId here as well. An emailId in this header selects the group of themes; emailId or emailIds in the request body selects the emails to change.

    The example is the URL-encoded form of {"tenantId":"qa-theme-api"}.

Responses

  • The theme was deleted. There is no response body.

  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for delete/coediting/v1/template-themes/{themeId}
curl 'https://plugins.stripo.email/coediting/v1/template-themes/{themeId}' \
  --request DELETE \
  --header 'Es-Plugin-Ui-Data: %7B%22tenantId%22%3A%22qa-theme-api%22%7D' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN'
No Body

List emails using a theme

​

Returns the IDs of emails currently using this theme, in the same form as the email IDs in your application. Emails that are still being copied are not included. If no emails use the theme, returns an empty array. Requires READ permission for TEMPLATE_THEMES. This request does not accept a body.

Path Parameters

  • The theme's id returned when you create or list themes.

Headers

  • Values used to select a group of themes, such as themes for a particular brand or customer. Send a URL-encoded JSON object with string values. This header is required only if your plugin's keyTemplate setting contains placeholders that need these values. For example, tenant_${tenantId} needs a tenantId value identifying the customer. All placeholders must have values, and the resulting key may contain only ASCII letters, digits, underscores and hyphens.

    To access the same themes as the editor, use the same values supplied in uiData when opening the editor. If keyTemplate uses ${emailId}, supply emailId here as well. An emailId in this header selects the group of themes; emailId or emailIds in the request body selects the emails to change.

    The example is the URL-encoded form of {"tenantId":"qa-theme-api"}.

Responses

  • The email IDs using this theme, or an empty array if there are none.

    IDs of emails currently using the theme, as used in your application. Returns an empty array if no emails use the theme.

    application/json
  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for get/coediting/v1/template-themes/{themeId}/emails
curl 'https://plugins.stripo.email/coediting/v1/template-themes/{themeId}/emails' \
  --header 'Es-Plugin-Ui-Data: %7B%22tenantId%22%3A%22qa-theme-api%22%7D' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN'
[
  "Welcome_2026"
]

Apply a template theme

​

Selects a theme for the specified email. Requires READ permission for TEMPLATE_THEMES and access to that email. The selection is saved when the request succeeds. The new design appears the next time the email's HTML and CSS are generated. Repeating the request with the same theme and version does not make further changes.

Query Parameters

  • Set to true to include a theme preview as SVG markup in the response. Omit this parameter, set it to false or leave its value empty to exclude the preview. Only true, false or an empty value is accepted. Include this parameter at most once.

Headers

  • Values used to select a group of themes, such as themes for a particular brand or customer. Send a URL-encoded JSON object with string values. This header is required only if your plugin's keyTemplate setting contains placeholders that need these values. For example, tenant_${tenantId} needs a tenantId value identifying the customer. All placeholders must have values, and the resulting key may contain only ASCII letters, digits, underscores and hyphens.

    To access the same themes as the editor, use the same values supplied in uiData when opening the editor. If keyTemplate uses ${emailId}, supply emailId here as well. An emailId in this header selects the group of themes; emailId or emailIds in the request body selects the emails to change.

    The example is the URL-encoded form of {"tenantId":"qa-theme-api"}.

Body·

required
application/json
  • Email ID used by your application for this plugin. Its length must be 1–100 bytes when encoded as UTF-8. Double quotes, backslashes, line breaks and tabs are not allowed. The combined length of your plugin ID and email ID must not exceed 253 bytes. Letter case and leading zeroes are kept.

  • ID of a theme available for the values supplied in Es-Plugin-Ui-Data.

Responses

  • The theme selected for the email.

    • Unique theme ID assigned by Stripo. Use this value as themeId in other requests.

    • Email design settings encoded as a JSON string. Numeric values are preserved when creating a theme. Later responses may use different JSON formatting, so read this value as JSON rather than comparing the text character by character.

    • The theme's name, including any spaces supplied at the beginning or end.

    • When the theme was last updated, as milliseconds since January 1, 1970, 00:00:00 UTC.

    • Theme version, starting at 1. Increases when design settings change. Renaming the theme or changing only JSON formatting does not increase it. Use this value as expectedVersion when updating the theme.

    • A preview of the theme as SVG markup. Included only when withPreview=true.

    application/json
  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for put/coediting/v1/model/theme
curl 'https://plugins.stripo.email/coediting/v1/model/theme?withPreview=false' \
  --request PUT \
  --header 'Es-Plugin-Ui-Data: %7B%22tenantId%22%3A%22qa-theme-api%22%7D' \
  --header 'Content-Type: application/json' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN' \
  --data '{
  "emailId": "qa-theme-1",
  "themeId": "a37dc20f-f2ce-4c4f-938a-57fc3e27e0be"
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "string",
  "json": "string",
  "version": 1,
  "preview": "string",
  "updatedAt": 1
}

Unlink a template theme

​

Stops an email from using a theme while keeping the design settings already applied to that email. Requires access to the email, but no TEMPLATE_THEMES permission or Es-Plugin-Ui-Data header. This operation is available even if Template Themes is disabled or the theme is no longer available.

Body·

required
application/json
  • Email ID used by your application for this plugin. Its length must be 1–100 bytes when encoded as UTF-8. Double quotes, backslashes, line breaks and tabs are not allowed. The combined length of your plugin ID and email ID must not exceed 253 bytes. Letter case and leading zeroes are kept.

Responses

  • The email is no longer linked to a theme.

  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for delete/coediting/v1/model/theme
curl https://plugins.stripo.email/coediting/v1/model/theme \
  --request DELETE \
  --header 'Content-Type: application/json' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN' \
  --data '{
  "emailId": "qa-theme-1"
}'
No Body

Apply a template theme to multiple emails

​

Applies one theme to multiple existing emails. Requires READ permission for TEMPLATE_THEMES and access to the target emails. The Es-Plugin-Ui-Data header selects the available themes for the entire request. The emailIds list must meet the request requirements before any emails are changed. Duplicate IDs are handled once. Missing emails are not created.

Each email has its own result. HTTP 200 can include failed emails, even if none succeeded. Check successfulEmailIds and failedEmails to see the outcome. A failure does not undo successful changes. If the request is interrupted, completed changes are kept and you can retry the same batch.

The new design appears the next time each email's HTML and CSS are generated. If an email is open in the editor, you may need to reopen it to see the change.

Headers

  • Values used to select a group of themes, such as themes for a particular brand or customer. Send a URL-encoded JSON object with string values. This header is required only if your plugin's keyTemplate setting contains placeholders that need these values. For example, tenant_${tenantId} needs a tenantId value identifying the customer. All placeholders must have values, and the resulting key may contain only ASCII letters, digits, underscores and hyphens.

    To access the same themes as the editor, use the same values supplied in uiData when opening the editor. If keyTemplate uses ${emailId}, supply emailId here as well. An emailId in this header selects the group of themes; emailId or emailIds in the request body selects the emails to change.

    The example is the URL-encoded form of {"tenantId":"qa-theme-api"}.

Body·

required
application/json

Provide one theme ID and a list of email IDs in a single JSON object.

  • IDs of existing emails in your application. Include at least one ID. The default limit is 25 entries per request and may be configured differently. Repeated IDs count toward that limit, but each email is updated only once, in the order it first appears.

  • ID of a theme available for the values supplied in Es-Plugin-Ui-Data.

Responses

  • Results for each email. Check both successfulEmailIds and failedEmails; HTTP 200 does not mean every email succeeded.

    • Emails for which the theme could not be selected, with an error code explaining each failure. Each email ID appears once. Always included; empty if no emails failed.

      Properties: 2
    • IDs of emails for which the theme was selected successfully. Each ID appears once, in the order of its first appearance in the request. Empty if none succeeded.

    application/json
  • The request data or Es-Plugin-Ui-Data values are invalid, or Template Themes is disabled for your plugin. Unlinking is allowed even when Template Themes is disabled.

    Headers
    Headers: 1
    text/plain
  • The plugin token is missing or invalid. Check the ES-PLUGIN-AUTH header.

    Headers
    Headers: 1
    text/plain
  • Your token does not have the API role, or you do not have permission for this operation.

    Headers
    Headers: 1
    text/plain
  • The requested theme or plugin settings could not be found. Check the theme ID and the values supplied in Es-Plugin-Ui-Data.

    Headers
    Headers: 1
    text/plain
  • This endpoint does not support the HTTP method used in the request.

    Headers
    Headers: 1
    text/plain
  • Too many requests were sent to this endpoint. Wait for the time specified in Retry-After before trying again.

    Headers
    Headers: 2
    text/plain
  • A server error prevented the request from completing. If you contact Stripo Support, include the X-Trace-Id value from the response headers.

    Headers
    Headers: 1
    text/plain
Request Example for post/coediting/v1/model/theme/bulk-apply
curl https://plugins.stripo.email/coediting/v1/model/theme/bulk-apply \
  --request POST \
  --header 'Es-Plugin-Ui-Data: %7B%22tenantId%22%3A%22qa-theme-api%22%7D' \
  --header 'Content-Type: application/json' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN' \
  --data '{
  "themeId": "a37dc20f-f2ce-4c4f-938a-57fc3e27e0be",
  "emailIds": [
    "qa-theme-1",
    "qa-theme-2"
  ]
}'
{
  "successfulEmailIds": [
    "qa-theme-1"
  ],
  "failedEmails": [
    {
      "emailId": "qa-theme-2",
      "code": "MODEL_NOT_FOUND"
    }
  ]
}

Resource permissions

​

Control access to themes and other plugin resources through your own application.

Resource permissions Operations

Check access to plugin resources

​

This endpoint belongs to your application. When the Permissions API is enabled, Stripo calls it to ask whether an operation is allowed. Protect the endpoint with HTTP Basic authentication.

To allow access to a theme, return a grantPermissions entry with exactly the same type, action and key as the requested permission. READ and MODIFY are separate permissions; granting MODIFY does not also grant READ. Any permission not explicitly granted is denied. Access is also denied if your endpoint cannot be reached, returns a response outside the HTTP 2xx range or returns an invalid response. This check is not used when the Permissions API is disabled in your plugin settings.

For TEMPLATE_THEMES, READ allows opening the editor with themes, listing themes, listing emails that use a theme and applying a theme to one or more emails. MODIFY allows creating, updating and deleting themes. Unlinking requires access to the email only. keyTemplate explains how themes are grouped; you do not need to include it in grantPermissions.

Body·

required
application/json
  • ID of the plugin requesting access.

  • Permissions Stripo asks your application to approve for this request.

    Properties: 4
  • Values supplied in uiData when opening the editor or in the Es-Plugin-Ui-Data header of an API request. All values are strings. Empty object if no values were supplied.

    Properties: 1

Responses

  • The permissions your application grants for this request.

    • Permissions your application allows. Include a matching type, action and key for each permission you grant. An empty array grants no access.

      Properties: 4
    application/json
Request Example for post/
curl 'https://{YOUR_RESOURCE_PERMISSIONS_CHECKER_URL}/' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic username:password' \
  --data '{
  "pluginId": "123",
  "uiData": {
    "brandId": "acme"
  },
  "requestPermissions": [
    {
      "type": "TEMPLATE_THEMES",
      "action": "READ",
      "key": "pluginId123_brand_acme",
      "keyTemplate": "brand_${brandId}"
    }
  ]
}'
{
  "grantPermissions": [
    {
      "type": "TEMPLATE_THEMES",
      "action": "READ",
      "key": "pluginId123_brand_acme"
    }
  ]
}

Models

​
  • Unique theme ID assigned by Stripo. Use this value as themeId in other requests.

  • Email design settings encoded as a JSON string. Numeric values are preserved when creating a theme. Later responses may use different JSON formatting, so read this value as JSON rather than comparing the text character by character.

  • The theme's name, including any spaces supplied at the beginning or end.

  • When the theme was last updated, as milliseconds since January 1, 1970, 00:00:00 UTC.

  • Theme version, starting at 1. Increases when design settings change. Renaming the theme or changing only JSON formatting does not increase it. Use this value as expectedVersion when updating the theme.

  • A preview of the theme as SVG markup. Included only when withPreview=true.

​
  • Maximum number of themes allowed across your entire plugin.

​

Provide a name and a complete set of email design settings in a single JSON object. The json field accepts either a JSON object or a string containing that object.

  • Complete email design settings, using the structure shown below. Supply either the object itself or a JSON string containing the same object. Include all required fields; a partial set of settings is not accepted. This field does not accept email content, HTML, CSS or other brand information.

    Complete design settings for the email as a whole, its sections, headings and buttons. The lightTheme and darkTheme sections contain settings for light and dark display modes. Include all required fields in both. If a required field allows null and you do not set a value, include that field with null. Missing required values are not filled in automatically. The create-theme example provides a complete object.

    Use fixed CSS color values, such as #ffffff or rgb(255, 255, 255), rather than CSS variables. Background fields also accept a gradient followed by a fallback color for email clients that cannot display the gradient. Image paths and background image sizes must be nonempty strings without leading or trailing whitespace. Font names must not be blank.

    • Button appearance, including text, background, borders, spacing and hover styles.

      Properties: 13
    • Settings for the whole email, including its width, alignment, spacing and background.

      Properties: 13
    • Font, size, spacing and color settings for heading levels h1 through h6.

      Properties: 10
    • Text and background styles for email sections, such as the header, main content and footer.

      Properties: 10
  • Theme name. It cannot be empty or contain only spaces or other whitespace. The length limit is 100 UTF-16 code units; most letters count as one, while characters such as emoji can count as two. Leading and trailing spaces are kept.

​

Complete design settings for the email as a whole, its sections, headings and buttons. The lightTheme and darkTheme sections contain settings for light and dark display modes. Include all required fields in both. If a required field allows null and you do not set a value, include that field with null. Missing required values are not filled in automatically. The create-theme example provides a complete object.

Use fixed CSS color values, such as #ffffff or rgb(255, 255, 255), rather than CSS variables. Background fields also accept a gradient followed by a fallback color for email clients that cannot display the gradient. Image paths and background image sizes must be nonempty strings without leading or trailing whitespace. Font names must not be blank.

  • Button appearance, including text, background, borders, spacing and hover styles.

    Properties: 13
  • Settings for the whole email, including its width, alignment, spacing and background.

    Properties: 13
  • Font, size, spacing and color settings for heading levels h1 through h6.

    Properties: 10
  • Text and background styles for email sections, such as the header, main content and footer.

    Properties: 10
​

Provide the current theme version and a new name, complete design settings or both.

​
​
  • Email ID used by your application for this plugin. Its length must be 1–100 bytes when encoded as UTF-8. Double quotes, backslashes, line breaks and tabs are not allowed. The combined length of your plugin ID and email ID must not exceed 253 bytes. Letter case and leading zeroes are kept.

  • ID of a theme available for the values supplied in Es-Plugin-Ui-Data.

​
​
  • Email ID used by your application for this plugin. Its length must be 1–100 bytes when encoded as UTF-8. Double quotes, backslashes, line breaks and tabs are not allowed. The combined length of your plugin ID and email ID must not exceed 253 bytes. Letter case and leading zeroes are kept.

​
  • Emails for which the theme could not be selected, with an error code explaining each failure. Each email ID appears once. Always included; empty if no emails failed.

    Properties: 2
  • IDs of emails for which the theme was selected successfully. Each ID appears once, in the order of its first appearance in the request. Empty if none succeeded.

​
  • Reason the theme could not be applied to this email.

    • MODEL_NOT_FOUND: the email does not exist.
    • THEME_NOT_FOUND: the theme became unavailable while the request was being handled.
    • APPLY_FAILED: the theme could not be applied for another reason.
    • CANCELED: the request was canceled before this email could be completed.
    • TIMEOUT: the request exceeded its time limit before this email could be completed.
    values
    MODEL_NOT_FOUNDTHEME_NOT_FOUNDAPPLY_FAILEDCANCELEDTIMEOUT
  • Email ID used by your application for this plugin. Its length must be 1–100 bytes when encoded as UTF-8. Double quotes, backslashes, line breaks and tabs are not allowed. The combined length of your plugin ID and email ID must not exceed 253 bytes. Letter case and leading zeroes are kept.

​

Provide one theme ID and a list of email IDs in a single JSON object.

  • IDs of existing emails in your application. Include at least one ID. The default limit is 25 entries per request and may be configured differently. Repeated IDs count toward that limit, but each email is updated only once, in the order it first appears.

  • ID of a theme available for the values supplied in Es-Plugin-Ui-Data.

​
  • ID of the plugin requesting access.

  • Permissions Stripo asks your application to approve for this request.

    Properties: 4
  • Values supplied in uiData when opening the editor or in the Es-Plugin-Ui-Data header of an API request. All values are strings. Empty object if no values were supplied.

    Properties: 1
​
  • Requested access. For themes, READ allows viewing and applying; MODIFY allows creating, updating and deleting. Each permission must be granted separately.

  • Identifies the resources this permission applies to. Copy the requested value exactly when granting access.

  • Resource to which the permission applies. Use TEMPLATE_THEMES for email themes.

  • Your plugin's setting for grouping themes. For example, brand_${brandId} creates separate groups for different brandId values supplied in uiData. An empty string means themes are shared across the plugin. This field is always included in requests for TEMPLATE_THEMES and is optional in grantPermissions.

    Maximum length is 200 characters. Use ASCII letters, digits, underscores, hyphens and placeholders such as ${brandId}. Placeholder names must be nonempty and use the same letters, digits, underscores or hyphens. Supply a value for every placeholder; after substitution, only those characters are allowed. The full key sent in permission requests, including the plugin identifier, must not exceed 255 bytes.

​
  • Permissions your application allows. Include a matching type, action and key for each permission you grant. An empty array grants no access.

    Properties: 4