> ## Documentation Index
> Fetch the complete documentation index at: https://loops.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a theme

> Create a new email theme for use across Loops emails.



## OpenAPI

````yaml /openapi.json post /v1/themes
openapi: 3.1.0
info:
  title: Loops OpenAPI Spec
  description: This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
  version: 1.21.0
servers:
  - url: https://app.loops.so/api
security: []
tags:
  - name: API key
  - name: Audience segments
    description: View audience segments
  - name: Campaigns
    description: Create and manage email campaigns
  - name: Campaign groups
    description: Organize campaigns into groups
  - name: Components
    description: View email components
  - name: Configuration
    description: View configuration settings
  - name: Contacts
    description: Manage contacts in your audience
  - name: Contact properties
    description: Manage contact properties
  - name: Email messages
    description: Manage email message content for campaigns
  - name: Events
    description: Trigger workflows with events
  - name: Event patterns
    description: View workflow event patterns
  - name: Mailing lists
    description: View mailing lists
  - name: Themes
    description: View email themes
  - name: Transactional emails
    description: Create, manage, and send transactional emails
  - name: Transactional groups
    description: Organize transactional emails into groups
  - name: Uploads
    description: Upload image assets
  - name: Workflows
    description: View and mutate workflow graphs
  - name: Workflow nodes
    description: View and mutate workflow nodes
paths:
  /v1/themes:
    post:
      tags:
        - Themes
      summary: Create a theme
      description: Create a new email theme for use across Loops emails.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateThemeBody'
      responses:
        '201':
          description: Theme created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeResponse'
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeFailureResponse'
        '401':
          description: Invalid API key or content API not enabled for this team.
        '405':
          description: Wrong HTTP request method.
      security:
        - apiKey: []
components:
  schemas:
    CreateThemeBody:
      type: object
      properties:
        name:
          type: string
          description: The theme name.
        styles:
          $ref: '#/components/schemas/ThemeStyles'
          description: >-
            Style attributes for the theme. Attributes use the same names as the
            LMX [`<Style />`](/creating-emails/lmx#document-styles) tag
            attributes.
      required:
        - name
    ThemeResponse:
      type: object
      properties:
        id:
          type: string
          description: The ID of the theme.
        name:
          type: string
          description: The name of the theme.
        styles:
          $ref: '#/components/schemas/ThemeStyles'
        isDefault:
          type: boolean
          description: Whether this theme is the team's default.
        createdAt:
          type: string
          description: ISO 8601 timestamp for when the theme was created.
        updatedAt:
          type: string
          description: ISO 8601 timestamp for when the theme was last updated.
      required:
        - id
        - name
        - styles
        - isDefault
        - createdAt
        - updatedAt
    ThemeFailureResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    ThemeStyles:
      type: object
      description: >-
        Flat map of style attributes, matching the attribute names accepted by
        the LMX `<Style />` tag.
      properties:
        backgroundColor:
          type: string
        backgroundXPadding:
          type: number
        backgroundYPadding:
          type: number
        bodyColor:
          type: string
        bodyXPadding:
          type: number
        bodyYPadding:
          type: number
        bodyFontFamily:
          type: string
        bodyFontCategory:
          type: string
        borderColor:
          type: string
        borderWidth:
          type: number
        borderRadius:
          type: number
        buttonBodyColor:
          type: string
        buttonBodyXPadding:
          type: number
        buttonBodyYPadding:
          type: number
        buttonBorderColor:
          type: string
        buttonBorderWidth:
          type: number
        buttonBorderRadius:
          type: number
        buttonTextColor:
          type: string
        buttonTextFormat:
          type: number
        buttonTextFontSize:
          type: number
        dividerColor:
          type: string
        dividerBorderWidth:
          type: number
        textBaseColor:
          type: string
        textBaseFontSize:
          type: number
        textBaseLineHeight:
          type: number
        textBaseLetterSpacing:
          type: number
        textLinkColor:
          type: string
        heading1Color:
          type: string
        heading1FontSize:
          type: number
        heading1LineHeight:
          type: number
        heading1LetterSpacing:
          type: number
        heading2Color:
          type: string
        heading2FontSize:
          type: number
        heading2LineHeight:
          type: number
        heading2LetterSpacing:
          type: number
        heading3Color:
          type: string
        heading3FontSize:
          type: number
        heading3LineHeight:
          type: number
        heading3LetterSpacing:
          type: number
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

## Related topics

- [Styling emails](/docs/creating-emails/styles.md)
- [API Introduction](/docs/api-reference/intro.md)
- [Novu integration](/docs/integrations/novu.md)
- [Auth0 integration](/docs/integrations/auth0.md)
- [Supabase SMTP](/docs/smtp/supabase.md)
