---
title: "Create a theme"
method: POST
path: "/v1/themes"
tags: ["Themes"]
---

# Create a theme

`POST /v1/themes`

Create a new email theme for use across Loops emails.

## Request body

- CreateThemeBody
  - `name` string, required — The theme name.
  - `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 `201`

Theme created.

- ThemeResponse
  - `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.

## Other responses

- `400` — Invalid request body.
- `401` — Invalid API key or content API not enabled for this team.
- `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)
