---
title: "Update a theme"
method: POST
path: "/v1/themes/{themeId}"
tags: ["Themes"]
---

# Update a theme

`POST /v1/themes/{themeId}`

Update a theme's name and/or styles. When `styles` change, the update cascades to every email using this theme, and `affectedEmailCount` in the response reports how many emails were affected. Manual style edits made on individual emails are preserved: the cascade only changes properties an email has not overridden. A per-email override is removed only when it becomes identical to the theme's new value, after which that email follows the theme for that property.

## Request body

- UpdateThemeBody — At least one of `name` or `styles` must be provided.
  - `name` string
  - `styles` ThemeStyles — Flat map of style attributes, matching the attribute names accepted by the LMX `<Style />` tag.
    - `backgroundColor` string
    - `backgroundXPadding` number
    - `backgroundYPadding` number
    - `bodyColor` string
    - `bodyXPadding` number
    - `bodyYPadding` number
    - `bodyFontFamily` string
    - `bodyFontCategory` string
    - `borderColor` string
    - `borderWidth` number
    - `borderRadius` number
    - `buttonBodyColor` string
    - `buttonBodyXPadding` number
    - `buttonBodyYPadding` number
    - `buttonBorderColor` string
    - `buttonBorderWidth` number
    - `buttonBorderRadius` number
    - `buttonTextColor` string
    - `buttonTextFormat` number
    - `buttonTextFontSize` number
    - `dividerColor` string
    - `dividerBorderWidth` number
    - `textBaseColor` string
    - `textBaseFontSize` number
    - `textBaseLineHeight` number
    - `textBaseLetterSpacing` number
    - `textLinkColor` string
    - `heading1Color` string
    - `heading1FontSize` number
    - `heading1LineHeight` number
    - `heading1LetterSpacing` number
    - `heading2Color` string
    - `heading2FontSize` number
    - `heading2LineHeight` number
    - `heading2LetterSpacing` number
    - `heading3Color` string
    - `heading3FontSize` number
    - `heading3LineHeight` number
    - `heading3LetterSpacing` number

## Response `200`

Successful.

- UpdateThemeResponse
  - `id` string, required — The ID of the theme.
  - `name` string, required — The name of the theme.
  - `styles` ThemeStyles, required — Flat map of style attributes, matching the attribute names accepted by the LMX `<Style />` tag.
    - `backgroundColor` string
    - `backgroundXPadding` number
    - `backgroundYPadding` number
    - `bodyColor` string
    - `bodyXPadding` number
    - `bodyYPadding` number
    - `bodyFontFamily` string
    - `bodyFontCategory` string
    - `borderColor` string
    - `borderWidth` number
    - `borderRadius` number
    - `buttonBodyColor` string
    - `buttonBodyXPadding` number
    - `buttonBodyYPadding` number
    - `buttonBorderColor` string
    - `buttonBorderWidth` number
    - `buttonBorderRadius` number
    - `buttonTextColor` string
    - `buttonTextFormat` number
    - `buttonTextFontSize` number
    - `dividerColor` string
    - `dividerBorderWidth` number
    - `textBaseColor` string
    - `textBaseFontSize` number
    - `textBaseLineHeight` number
    - `textBaseLetterSpacing` number
    - `textLinkColor` string
    - `heading1Color` string
    - `heading1FontSize` number
    - `heading1LineHeight` number
    - `heading1LetterSpacing` number
    - `heading2Color` string
    - `heading2FontSize` number
    - `heading2LineHeight` number
    - `heading2LetterSpacing` number
    - `heading3Color` string
    - `heading3FontSize` number
    - `heading3LineHeight` number
    - `heading3LetterSpacing` number
  - `isDefault` boolean, required — Whether this theme is the team's default.
  - `createdAt` string, required — ISO 8601 timestamp for when the theme was created.
  - `updatedAt` string, required — ISO 8601 timestamp for when the theme was last updated.
  - `affectedEmailCount` number, required — The number of emails using this theme that are affected by the style change. `0` when only the name changed.

## Other responses

- `400` — Invalid `themeId` or request body.
- `401` — Invalid API key or content API not enabled for this team.
- `404` — Theme not found.
- `405` — Wrong HTTP request method.

---

[API](https://skmtc.net/loops/apis/loops-openapi-spec.md) · [All operations](https://skmtc.net/loops/apis/loops-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loops/loops-openapi-spec/revisions/9cc087257f0d/schema)
