> For the complete documentation index, see [llms.txt](https://fusionauth.io/docs/llms.txt)

# Simple Themes

Learn about the APIs for creating, retrieving, updating, and deleting simple themes for hosted login pages.

> **VERSION:** Available since version `1.51.0`

Simple UI login themes can be configured to enable custom styling for your FusionAuth login workflow. Themes are configured per Tenant or optionally by Application.

The following APIs are provided to manage Simple Themes.

## Create a Simple Theme

This API is used to create a new Simple Theme.

### Request

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Create a new Simple Theme with a randomly generated Id

`POST /api/theme`

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Create a Simple Theme with the provided unique Id

`POST /api/theme/{themeId}`

#### Request Parameters

`themeId`

*   UUID
*   optional
*   Defaults to secure random UUID

The Id to use for the new Simple Theme. If not specified a secure random UUID will be generated.

#### Request Body

> **NOTE:** Note that the rest of this page will assume that the **theme.type** of this theme is `simple`.

`theme.data`

*   Object
*   optional

An object that can hold any information about the Theme that should be persisted.

`theme.defaultMessages`

*   String
*   optional

A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file.

`theme.localizedMessages`

*   Map<Locale,String>
*   optional

A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.

`theme.name`

*   String
*   required

A unique name for the Theme.

`theme.type`

*   String
*   optional
*   Defaults to advanced
*   Available since 1.51.0

The type of the Theme. This value determines what content is required for the Theme. There are two distinct values.

*   `advanced` - This is the default FusionAuth theme type. This type allows for full customization of the html, css, and messaging via [Freemarker](https://freemarker.apache.org) templates. If a Theme is `advanced` then the **theme.defaultMessages** and **theme.templates** fields are required. The **theme.defaultMessages** should specify every message in the message bundle. See [Theme Localization](https://fusionauth.io/docs/customize/look-and-feel/localization.md).
*   `simple` - A simple theme only requires a set of variables that will applied to css across the theme. If a Theme is `simple` then the **theme.variables** field is required. If a theme is `simple` then the **theme.defaultMessages** need only specify any text that you would like to change from what is included in theme.

`theme.variables.alertBackgroundColor`

*   String
*   required

The background color of the alert message. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.alertFontColor`

*   String
*   required

The color of the font in the alert message. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.backgroundImageURL`

*   String
*   optional

The url of the background image. Will replace the page background color. Must be a valid absolute URL.

`theme.variables.backgroundSize`

*   String
*   optional

Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image. Valid values are `repeat`, `contain`, and `cover`.

Required if **theme.variables.backgroundImageURL** is provided.

`theme.variables.borderRadius`

*   String
*   required

Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme. Must be a valid numeric value with a `px`, `em`, or `rem` suffix.

`theme.variables.deleteButtonColor`

*   String
*   required

The color of the delete button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.deleteButtonFocusColor`

*   String
*   required

The color of the delete button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.deleteButtonTextColor`

*   String
*   required

The color of the text in the delete button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.deleteButtonTextFocusColor`

*   String
*   required

The color of the text in the delete button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.errorIconColor`

*   String
*   required

The color of the icon in error alert messages in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.errorFontColor`

*   String
*   required

The color of the font for error messages. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.favicons`

*   Array
*   optional
*   Available since 1.65.0

The favicons to use for all hosted pages. Currently only a single favicon is supported.

`theme.variables.favicons[x].href`

*   String
*   optional
*   Available since 1.65.0

The url of the favicon. Must be a valid absolute URL.

`theme.variables.favicons[x].rel`

*   String
*   optional
*   Available since 1.65.0

The `rel` attribute for the favicon HTML element. Currently only `icon` is supported.

`theme.variables.favicons[x].sizes`

*   String
*   optional
*   Available since 1.65.0

The `sizes` attribute for the favicon HTML element. Currently not supported and must be omitted from the request.

`theme.variables.favicons[x].type`

*   String
*   optional
*   Available since 1.65.0

The `type` attribute for the favicon HTML element. Currently only `image/x-icon` is supported.

`theme.variables.fontColor`

*   String
*   required

The color of the text in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.fontFamily`

*   String
*   required

Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.

`theme.variables.footerDisplay`

*   Boolean
*   optional

Determines if the "powered by FusionAuth" footer is displayed in the theme. A valid license is required to set this value to `false`.

`theme.variables.iconBackgroundColor`

*   String
*   required

The color of the form field icon background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.iconColor`

*   String
*   required

The color of the icons in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.infoIconColor`

*   String
*   required

The color of the icon in info alert messages in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.inputBackgroundColor`

*   String
*   required

The color of the form field background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.inputIconColor`

*   String
*   required

The color of the form field icon. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.inputTextColor`

*   String
*   required

The color of the form field text. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.linkTextColor`

*   String
*   required

The color of the text in hyperlinks. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.linkTextFocusColor`

*   String
*   required

The color of the text in hyperlinks that have been visited. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.logoImageSize`

*   String
*   optional

The size of the logo image. Must be a valid numeric value with a `px`, `em`, or `rem` suffix.

Required if **theme.variables.logoImageURL** is provided.

`theme.variables.logoImageURL`

*   String
*   optional

The url of the logo image. Must be a valid absolute URL. Can be `null`.

`theme.variables.monoFontColor`

*   String
*   required

The color of the monospaced text. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.monoFontFamily`

*   String
*   required

The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).

`theme.variables.pageBackgroundColor`

*   String
*   required

The color of the page background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.panelBackgroundColor`

*   String
*   required

The color of the panels in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonColor`

*   String
*   required

The color of the primary button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonFocusColor`

*   String
*   required

The color of primary button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonTextColor`

*   String
*   required

The color of the text in the primary button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonTextFocusColor`

*   String
*   required

The color of the text in the primary button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

*Example Simple Theme Request JSON*

```json
{
  "theme": {
    "data": {
      "addedBy": "richard"
    },
    "defaultMessages": "title=Login",
    "localizedMessages": {
      "fr": "title=Identifiant",
      "es": "title=Iniciar sesión"
    },
    "name": "White Theme",
    "type": "simple",
    "variables": {
      "alertBackgroundColor": "#ffffff",
      "alertFontColor": "#ffffff",
      "backgroundImageURL": "https://example.com/mybackground.png",
      "backgroundRepeat": "no-repeat",
      "backgroundSize": "cover",
      "borderRadius": "1.00rem",
      "deleteButtonColor": "#ffffff",
      "deleteButtonFocusColor": "#cccccc",
      "deleteButtonTextColor": "#ffffff",
      "deleteButtonTextFocusColor": "#cccccc",
      "errorFontColor": "#ffffff",
      "fontColor": "#ffffff",
      "fontFamily": "sans-serif",
      "footerDisplay": "flex",
      "iconBackgroundColor": "#ffffff",
      "iconColor": "#ffffff",
      "inputBackgroundColor": "#ffffff",
      "inputIconColor": "#ffffff",
      "inputTextColor": "#ffffff",
      "linkTextColor": "#ffffff",
      "linkTextFocusColor": "#cccccc",
      "logoImageDisplay": "flex",
      "logoImageSize": "7rem",
      "logoImageURL": "https://example.com/mylogo.png",
      "monoFontColor": "#ffffff",
      "monoFontFamily": "monospace",
      "pageBackgroundColor": "#ffffff",
      "panelBackgroundColor": "#ffffff",
      "primaryButtonColor": "#ffffff",
      "primaryButtonFocusColor": "#cccccc",
      "primaryButtonTextColor": "#ffffff",
      "primaryButtonTextFocusColor": "#cccccc"
    }
  }
}
```

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Create a Simple Theme from an existing Simple Theme with a randomly generated Id

`POST /api/theme`

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Create a Simple Theme from an existing Simple Theme with the provided unique Id

`POST /api/theme/{themeId}`

#### Request Parameters

`themeId`

*   UUID
*   optional
*   Defaults to secure random UUID

The Id to use for the new Theme. If not specified a secure random UUID will be generated.

#### Request Body

`sourceThemeId`

*   UUID
*   required

The Id of an existing Theme from which a copy will be made.

The **defaultMessages**, **localizedMessages**, and **variables** from the source Theme will be copied to the new Theme.

`theme.name`

*   String
*   required

A unique name for the Theme.

*Example request JSON*

```json
{
  "sourceThemeId": "64773453-bb11-457b-a3d6-7475ec2259d0",
  "theme": {
    "name": "Orange Theme - copied"
  }
}
```

### Response

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 404 | The object you requested doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

#### Response Body

`theme.data`

*   Object

An object that can hold any information about the Theme that should be persisted.

`theme.defaultMessages`

*   String

A properties file formatted String containing messages used within the templates.

`theme.id`

*   UUID

The unique Id of the Theme.

`theme.insertInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was added to the FusionAuth database.

`theme.lastUpdateInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was last updated in the FusionAuth database.

`theme.localizedMessages`

*   Map<Locale,String>

A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.

`theme.name`

*   String

A unique name for the Theme.

`theme.variables.alertBackgroundColor`

*   String

The background color of the alert message.

`theme.variables.alertFontColor`

*   String

The color of the font in the alert message.

`theme.variables.backgroundImageURL`

*   String
*   optional

The url of the background image. Will replace the page background color.

`theme.variables.backgroundSize`

*   String
*   optional

Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image.

`theme.variables.borderRadius`

*   String

Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme.

`theme.variables.deleteButtonColor`

*   String

The color of the delete button.

`theme.variables.deleteButtonFocusColor`

*   String

The color of the delete button when clicked.

`theme.variables.deleteButtonTextColor`

*   String

The color of the text in the delete button.

`theme.variables.deleteButtonTextFocusColor`

*   String

The color of the text in the delete button when clicked.

`theme.variables.errorIconColor`

*   String

The color of the icon in error alert messages in the theme.

`theme.variables.errorFontColor`

*   String

The color of the font for error messages.

`theme.variables.favicons`

*   Array
*   Available since 1.65.0

The favicons for all hosted pages.

`theme.variables.favicons[x].href`

*   String
*   Available since 1.65.0

The url of the favicon.

`theme.variables.favicons[x].rel`

*   String
*   Available since 1.65.0

The `rel` attribute for the favicon HTML element.

`theme.variables.favicons[x].sizes`

*   String
*   Available since 1.65.0

The `sizes` attribute for the favicon HTML element.

`theme.variables.favicons[x].type`

*   String
*   Available since 1.65.0

The `type` attribute for the favicon HTML element.

`theme.variables.fontColor`

*   String

The color of the text in the theme.

`theme.variables.fontFamily`

*   String

Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.

`theme.variables.footerDisplay`

*   Boolean
*   optional

Determines if the "powered by FusionAuth" footer is displayed in the theme.

`theme.variables.iconBackgroundColor`

*   String

The color of the form field icon background.

`theme.variables.iconColor`

*   String

The color of the icons in the theme.

`theme.variables.infoIconColor`

*   String

The color of the icon in info alert messages in the theme.

`theme.variables.inputBackgroundColor`

*   String

The color of the form field background.

`theme.variables.inputIconColor`

*   String

The color of the form field icon.

`theme.variables.inputTextColor`

*   String

The color of the form field text.

`theme.variables.linkTextColor`

*   String

The color of the text in hyperlinks.

`theme.variables.linkTextFocusColor`

*   String

The color of the text in hyperlinks that have been visited.

`theme.variables.logoImageSize`

*   String
*   optional

The size of the logo image.

`theme.variables.logoImageURL`

*   String
*   optional

The url of the logo image.

`theme.variables.monoFontColor`

*   String

The color of the monospaced text.

`theme.variables.monoFontFamily`

*   String

The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).

`theme.variables.pageBackgroundColor`

*   String

The color of the page background.

`theme.variables.panelBackgroundColor`

*   String

The color of the panels in the theme.

`theme.variables.primaryButtonColor`

*   String

The color of the primary button.

`theme.variables.primaryButtonFocusColor`

*   String

The color of primary button when clicked.

`theme.variables.primaryButtonTextColor`

*   String

The color of the text in the primary button.

`theme.variables.primaryButtonTextFocusColor`

*   String

The color of the text in the primary button when clicked.

*Example Simple Theme Response JSON*

```json
{
  "theme": {
    "data": {
      "addedBy": "richard"
    },
    "defaultMessages": "title=Login",
    "id": "58324824-6539-4305-8117-b28f26466ab9",
    "insertInstant": 1716401547557,
    "lastUpdateInstant": 1716401606387,
    "localizedMessages": {
      "fr": "title=Identifiant",
      "es": "title=Iniciar sesión"
    },
    "name": "White Theme",
    "type": "simple",
    "variables": {
      "alertBackgroundColor": "#ffffff",
      "alertFontColor": "#ffffff",
      "backgroundImageURL": "https://example.com/mybackground.png",
      "backgroundRepeat": "no-repeat",
      "backgroundSize": "cover",
      "borderRadius": "1.00rem",
      "deleteButtonColor": "#ffffff",
      "deleteButtonFocusColor": "#cccccc",
      "deleteButtonTextColor": "#ffffff",
      "deleteButtonTextFocusColor": "#cccccc",
      "errorFontColor": "#ffffff",
      "fontColor": "#ffffff",
      "fontFamily": "sans-serif",
      "footerDisplay": "flex",
      "iconBackgroundColor": "#ffffff",
      "iconColor": "#ffffff",
      "inputBackgroundColor": "#ffffff",
      "inputIconColor": "#ffffff",
      "inputTextColor": "#ffffff",
      "linkTextColor": "#ffffff",
      "linkTextFocusColor": "#cccccc",
      "logoImageDisplay": "flex",
      "logoImageSize": "7rem",
      "logoImageURL": "https://example.com/mylogo.png",
      "monoFontColor": "#ffffff",
      "monoFontFamily": "monospace",
      "pageBackgroundColor": "#ffffff",
      "panelBackgroundColor": "#ffffff",
      "primaryButtonColor": "#ffffff",
      "primaryButtonFocusColor": "#cccccc",
      "primaryButtonTextColor": "#ffffff",
      "primaryButtonTextFocusColor": "#cccccc"
    }
  }
}
```

## Retrieve a Simple Theme

This API is used to retrieve a single Theme by unique Id or all of the Themes.

### Request

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Retrieve all of the Themes

`GET /api/theme`

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Retrieve a Theme by Id

`GET /api/theme/{themeId}`

#### Request Parameters

`themeId`

*   UUID
*   required

The unique Id of the Theme to retrieve.

### Response

The response for this API contains either a single Theme or all of the Themes. When you call this API with an Id the response will contain a single Theme. When you call this API without an Id the response will contain all of the themes. Both response types are defined below along with an example JSON response.

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 404 | The object you requested doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

#### Response Body

`theme.data`

*   Object

An object that can hold any information about the Theme that should be persisted.

`theme.defaultMessages`

*   String

A properties file formatted String containing messages used within the templates.

`theme.id`

*   UUID

The unique Id of the Theme.

`theme.insertInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was added to the FusionAuth database.

`theme.lastUpdateInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was last updated in the FusionAuth database.

`theme.localizedMessages`

*   Map<Locale,String>

A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.

`theme.name`

*   String

A unique name for the Theme.

`theme.variables.alertBackgroundColor`

*   String

The background color of the alert message.

`theme.variables.alertFontColor`

*   String

The color of the font in the alert message.

`theme.variables.backgroundImageURL`

*   String
*   optional

The url of the background image. Will replace the page background color.

`theme.variables.backgroundSize`

*   String
*   optional

Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image.

`theme.variables.borderRadius`

*   String

Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme.

`theme.variables.deleteButtonColor`

*   String

The color of the delete button.

`theme.variables.deleteButtonFocusColor`

*   String

The color of the delete button when clicked.

`theme.variables.deleteButtonTextColor`

*   String

The color of the text in the delete button.

`theme.variables.deleteButtonTextFocusColor`

*   String

The color of the text in the delete button when clicked.

`theme.variables.errorIconColor`

*   String

The color of the icon in error alert messages in the theme.

`theme.variables.errorFontColor`

*   String

The color of the font for error messages.

`theme.variables.favicons`

*   Array
*   Available since 1.65.0

The favicons for all hosted pages.

`theme.variables.favicons[x].href`

*   String
*   Available since 1.65.0

The url of the favicon.

`theme.variables.favicons[x].rel`

*   String
*   Available since 1.65.0

The `rel` attribute for the favicon HTML element.

`theme.variables.favicons[x].sizes`

*   String
*   Available since 1.65.0

The `sizes` attribute for the favicon HTML element.

`theme.variables.favicons[x].type`

*   String
*   Available since 1.65.0

The `type` attribute for the favicon HTML element.

`theme.variables.fontColor`

*   String

The color of the text in the theme.

`theme.variables.fontFamily`

*   String

Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.

`theme.variables.footerDisplay`

*   Boolean
*   optional

Determines if the "powered by FusionAuth" footer is displayed in the theme.

`theme.variables.iconBackgroundColor`

*   String

The color of the form field icon background.

`theme.variables.iconColor`

*   String

The color of the icons in the theme.

`theme.variables.infoIconColor`

*   String

The color of the icon in info alert messages in the theme.

`theme.variables.inputBackgroundColor`

*   String

The color of the form field background.

`theme.variables.inputIconColor`

*   String

The color of the form field icon.

`theme.variables.inputTextColor`

*   String

The color of the form field text.

`theme.variables.linkTextColor`

*   String

The color of the text in hyperlinks.

`theme.variables.linkTextFocusColor`

*   String

The color of the text in hyperlinks that have been visited.

`theme.variables.logoImageSize`

*   String
*   optional

The size of the logo image.

`theme.variables.logoImageURL`

*   String
*   optional

The url of the logo image.

`theme.variables.monoFontColor`

*   String

The color of the monospaced text.

`theme.variables.monoFontFamily`

*   String

The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).

`theme.variables.pageBackgroundColor`

*   String

The color of the page background.

`theme.variables.panelBackgroundColor`

*   String

The color of the panels in the theme.

`theme.variables.primaryButtonColor`

*   String

The color of the primary button.

`theme.variables.primaryButtonFocusColor`

*   String

The color of primary button when clicked.

`theme.variables.primaryButtonTextColor`

*   String

The color of the text in the primary button.

`theme.variables.primaryButtonTextFocusColor`

*   String

The color of the text in the primary button when clicked.

*Example Simple Theme Response JSON*

```json
{
  "theme": {
    "data": {
      "addedBy": "richard"
    },
    "defaultMessages": "title=Login",
    "id": "58324824-6539-4305-8117-b28f26466ab9",
    "insertInstant": 1716401547557,
    "lastUpdateInstant": 1716401606387,
    "localizedMessages": {
      "fr": "title=Identifiant",
      "es": "title=Iniciar sesión"
    },
    "name": "White Theme",
    "type": "simple",
    "variables": {
      "alertBackgroundColor": "#ffffff",
      "alertFontColor": "#ffffff",
      "backgroundImageURL": "https://example.com/mybackground.png",
      "backgroundRepeat": "no-repeat",
      "backgroundSize": "cover",
      "borderRadius": "1.00rem",
      "deleteButtonColor": "#ffffff",
      "deleteButtonFocusColor": "#cccccc",
      "deleteButtonTextColor": "#ffffff",
      "deleteButtonTextFocusColor": "#cccccc",
      "errorFontColor": "#ffffff",
      "fontColor": "#ffffff",
      "fontFamily": "sans-serif",
      "footerDisplay": "flex",
      "iconBackgroundColor": "#ffffff",
      "iconColor": "#ffffff",
      "inputBackgroundColor": "#ffffff",
      "inputIconColor": "#ffffff",
      "inputTextColor": "#ffffff",
      "linkTextColor": "#ffffff",
      "linkTextFocusColor": "#cccccc",
      "logoImageDisplay": "flex",
      "logoImageSize": "7rem",
      "logoImageURL": "https://example.com/mylogo.png",
      "monoFontColor": "#ffffff",
      "monoFontFamily": "monospace",
      "pageBackgroundColor": "#ffffff",
      "panelBackgroundColor": "#ffffff",
      "primaryButtonColor": "#ffffff",
      "primaryButtonFocusColor": "#cccccc",
      "primaryButtonTextColor": "#ffffff",
      "primaryButtonTextFocusColor": "#cccccc"
    }
  }
}
```

> **CAUTION:** Responses from the theme API can contain [Advanced Themes](https://fusionauth.io/docs/apis/themes/advanced-themes.md) as well.

#### Response Body

`themes`

*   Array

The list of Theme objects.

`themes[x].data`

*   Object

An object that can hold any information about the Theme that should be persisted.

`themes[x].defaultMessages`

*   Integer

A properties file formatted String containing messages used within the templates.

`themes[x].id`

*   UUID

The unique Id of the Theme.

`themes[x].insertInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was added to the FusionAuth database.

`themes[x].lastUpdateInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was last updated in the FusionAuth database.

`themes[x].localizedMessages`

*   Map<Locale,String>

A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.

`themes[x].name`

*   String

A unique name for the Theme.

`themes[x].variables.alertBackgroundColor`

*   String

The background color of the alert message.

`themes[x].variables.alertFontColor`

*   String

The color of the font in the alert message.

`themes[x].variables.backgroundImageURL`

*   String
*   optional

The url of the background image. Will replace the page background color.

`themes[x].variables.backgroundSize`

*   String
*   optional

Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image.

`themes[x].variables.borderRadius`

*   String

Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme.

`themes[x].variables.deleteButtonColor`

*   String

The color of the delete button.

`themes[x].variables.deleteButtonFocusColor`

*   String

The color of the delete button when clicked.

`themes[x].variables.deleteButtonTextColor`

*   String

The color of the text in the delete button.

`themes[x].variables.deleteButtonTextFocusColor`

*   String

The color of the text in the delete button when clicked.

`themes[x].variables.errorIconColor`

*   String

The color of the icon in error alert messages in the theme.

`themes[x].variables.errorFontColor`

*   String

The color of the font for error messages.

`themes[x].variables.favicons`

*   Array
*   Available since 1.65.0

The favicons for all hosted pages.

`themes[x].variables.favicons[x].href`

*   String
*   Available since 1.65.0

The url of the favicon.

`themes[x].variables.favicons[x].rel`

*   String
*   Available since 1.65.0

The `rel` attribute for the favicon HTML element.

`themes[x].variables.favicons[x].sizes`

*   String
*   Available since 1.65.0

The `sizes` attribute for the favicon HTML element.

`themes[x].variables.favicons[x].type`

*   String
*   Available since 1.65.0

The `type` attribute for the favicon HTML element.

`themes[x].variables.fontColor`

*   String

The color of the text in the theme.

`themes[x].variables.fontFamily`

*   String

Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.

`themes[x].variables.footerDisplay`

*   Boolean
*   optional

Determines if the "powered by FusionAuth" footer is displayed in the theme.

`themes[x].variables.iconBackgroundColor`

*   String

The color of the form field icon background.

`themes[x].variables.iconColor`

*   String

The color of the icons in the theme.

`themes[x].variables.infoIconColor`

*   String

The color of the icon in info alert messages in the theme.

`themes[x].variables.inputBackgroundColor`

*   String

The color of the form field background.

`themes[x].variables.inputIconColor`

*   String

The color of the form field icon.

`themes[x].variables.inputTextColor`

*   String

The color of the form field text.

`themes[x].variables.linkTextColor`

*   String

The color of the text in hyperlinks.

`themes[x].variables.linkTextFocusColor`

*   String

The color of the text in hyperlinks that have been visited.

`themes[x].variables.logoImageSize`

*   String
*   optional

The size of the logo image.

`themes[x].variables.logoImageURL`

*   String
*   optional

The url of the logo image.

`themes[x].variables.monoFontColor`

*   String

The color of the monospaced text.

`themes[x].variables.monoFontFamily`

*   String

The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).

`themes[x].variables.pageBackgroundColor`

*   String

The color of the page background.

`themes[x].variables.panelBackgroundColor`

*   String

The color of the panels in the theme.

`themes[x].variables.primaryButtonColor`

*   String

The color of the primary button.

`themes[x].variables.primaryButtonFocusColor`

*   String

The color of primary button when clicked.

`themes[x].variables.primaryButtonTextColor`

*   String

The color of the text in the primary button.

`themes[x].variables.primaryButtonTextFocusColor`

*   String

The color of the text in the primary button when clicked.

*Example Response JSON*

```json
{
  "themes": [
    {
      "data": {
        "addedBy": "richard"
      },
      "defaultMessages": "title=Login",
      "id": "64773453-bb11-457b-a3d6-7475ec2259d0",
      "insertInstant": 1564006815352,
      "lastUpdateInstant": 1564084258150,
      "localizedMessages": {
        "fr": "title=Identifiant",
        "es": "title=Iniciar sesión"
      },
      "name": "Orange Theme",
      "stylesheet": "h1 {\r\n  color: orange;\r\n  text-align: center;\r\n}",
      "templates": {
        "accountEdit": "[#ftl/]",
        "accountIndex": "[#ftl/]",
        "accountTwoFactorDisable": "[#ftl/]",
        "accountTwoFactorEnable": "[#ftl/]",
        "accountTwoFactorIndex": "[#ftl/]",
        "accountWebAuthnAdd": "[#ftl/]",
        "accountWebAuthnDelete": "[#ftl/]",
        "accountWebAuthnIndex": "[#ftl/]",
        "emailComplete": "[#ftl/]",
        "emailSent": "[#ftl/]",
        "emailVerificationRequired": "[#ftl/]",
        "emailVerify": "[#ftl/]",
        "helpers": "[#ftl/]",
        "index": "[#ftl/]",
        "oauth2Authorize": "[#ftl/]",
        "oauth2AuthorizedNotRegistered": "[#ftl/]",
        "oauth2ChildRegistrationNotAllowed": "[#ftl/]",
        "oauth2ChildRegistrationNotAllowedComplete": "[#ftl/]",
        "oauth2CompleteRegistration": "[#ftl/]",
        "oauth2Device": "[#ftl/]",
        "oauth2DeviceComplete": "[#ftl/]",
        "oauth2Error": "[#ftl/]",
        "oauth2Logout": "[#ftl/]",
        "oauth2Passwordless": "[#ftl/]",
        "oauth2Register": "[#ftl/]",
        "oauth2StartIdPLink": "[#ftl/]",
        "oauth2TwoFactor": "[#ftl/]",
        "oauth2TwoFactorEnable": "[#ftl/]",
        "oauth2TwoFactorEnableComplete": "[#ftl/]",
        "oauth2TwoFactorMethods": "[#ftl/]",
        "oauth2Wait": "[#ftl/]",
        "oauth2WebAuthn": "[#ftl/]",
        "oauth2WebAuthnReauth": "[#ftl/]",
        "oauth2WebAuthnReauthEnable": "[#ftl/]",
        "passwordChange": "[#ftl/]",
        "passwordComplete": "[#ftl/]",
        "passwordForgot": "[#ftl/]",
        "passwordSent": "[#ftl/]",
        "registrationComplete": "[#ftl/]",
        "registrationSent": "[#ftl/]",
        "registrationVerificationRequired": "[#ftl/]",
        "registrationVerify": "[#ftl/]",
        "samlv2Logout": "[#ftl/]",
        "unauthorized": "[#ftl/]"
      },
      "type": "advanced"
    },
    {
      "data": {},
      "defaultMessages": "login=Please Log in",
      "id": "58324824-6539-4305-8117-b28f26466ab9",
      "insertInstant": 1716401547557,
      "lastUpdateInstant": 1716401606387,
      "localizedMessages": {},
      "name": "White Theme",
      "type": "simple",
      "variables": {
        "alertBackgroundColor": "#ffffff",
        "alertFontColor": "#ffffff",
        "backgroundImageURL": "https://example.com/mybackground.png",
        "backgroundRepeat": "no-repeat",
        "backgroundSize": "cover",
        "borderRadius": "1.00rem",
        "deleteButtonColor": "#ffffff",
        "deleteButtonFocusColor": "#cccccc",
        "deleteButtonTextColor": "#ffffff",
        "deleteButtonTextFocusColor": "#cccccc",
        "errorFontColor": "#ffffff",
        "fontColor": "#ffffff",
        "fontFamily": "sans-serif",
        "footerDisplay": "flex",
        "iconBackgroundColor": "#ffffff",
        "iconColor": "#ffffff",
        "inputBackgroundColor": "#ffffff",
        "inputIconColor": "#ffffff",
        "inputTextColor": "#ffffff",
        "linkTextColor": "#ffffff",
        "linkTextFocusColor": "#cccccc",
        "logoImageDisplay": "flex",
        "logoImageSize": "7rem",
        "logoImageURL": "https://example.com/mylogo.png",
        "monoFontColor": "#ffffff",
        "monoFontFamily": "monospace",
        "pageBackgroundColor": "#ffffff",
        "panelBackgroundColor": "#ffffff",
        "primaryButtonColor": "#ffffff",
        "primaryButtonFocusColor": "#cccccc",
        "primaryButtonTextColor": "#ffffff",
        "primaryButtonTextFocusColor": "#cccccc"
      }
    },
    {
      "id": "75a068fd-e94b-451a-9aeb-3ddb9a3b5987",
      "insertInstant": 1563999505859,
      "lastUpdateInstant": 1564005677559,
      "name": "Default Theme",
      "type": "advanced"
    },
    {
      "data": {},
      "id": "3c717291-5d83-4014-bd51-97c76475dc86",
      "insertInstant": 1716251105423,
      "lastUpdateInstant": 1716251105423,
      "localizedMessages": {},
      "name": "Default Simple Theme",
      "type": "simple"
    }
  ]
}
```

## Search for Themes

This API is used to search for Themes and may be called using the `GET` or `POST` HTTP methods. Examples of each are provided below. The `POST` method is provided to allow for a richer request object without worrying about exceeding the maximum length of a URL. Calling this API with either the `GET` or `POST` HTTP method will provide the same search results given the same query parameters.

### Request

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Search for Themes

`GET /api/theme/search?name={name}?name={name}`

#### Request Parameters

`name`

*   String
*   optional

The case-insensitive string to search for in the Theme name. This can contain wildcards using the asterisk character (`*`). If no wildcards are present, the search criteria will be interpreted as `*value*`.

`numberOfResults`

*   Integer
*   optional
*   Defaults to 25

The number of results to return from the search.

`orderBy`

*   String
*   optional
*   Defaults to name ASC

The database field to order the search results as well as an order direction.

The possible values are:

*   `id` - the unique Id of the Theme
*   `insertInstant` - the [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the Theme was created
*   `name` - the Theme name

The order direction is optional. Possible values of the order direction are `ASC` or `DESC`. If omitted, the default sort order is `ASC`.

For example, to order the results by the insert instant in a descending order, use `insertInstant DESC`.

`startRow`

*   Integer
*   optional
*   Defaults to 0

The offset into the total results. In order to paginate the results, increment this value by the **numberOfResults** for subsequent requests.

For example, if the total search results are greater than the page size designated by **numberOfResults**, set this value to `25` to retrieve results `26-50`, assuming the default page size.

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Search for Themes

`POST /api/theme/search`

When calling the API using a `POST` request you will send the search criteria in a JSON request body.

#### Request Body

`search.name`

*   String
*   optional

The case-insensitive string to search for in the Theme name. This can contain wildcards using the asterisk character (`*`). If no wildcards are present, the search criteria will be interpreted as `*value*`.

`search.numberOfResults`

*   Integer
*   optional
*   Defaults to 25

The number of results to return from the search.

`search.orderBy`

*   String
*   optional
*   Defaults to name ASC

The database field to order the search results as well as an order direction.

The possible values are:

*   `id` - the unique Id of the Theme
*   `insertInstant` - the [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the Theme was created
*   `name` - the Theme name

The order direction is optional. Possible values of the order direction are `ASC` or `DESC`. If omitted, the default sort order is `ASC`.

For example, to order the results by the insert instant in a descending order, use `insertInstant DESC`.

`search.startRow`

*   Integer
*   optional
*   Defaults to 0

The offset into the total results. In order to paginate the results, increment this value by the **numberOfResults** for subsequent requests.

For example, if the total search results are greater than the page size designated by **numberOfResults**, set this value to `25` to retrieve results `26-50`, assuming the default page size.

*Example JSON Request*

```json
{
  "search": {
    "name": "Orange",
    "numberOfResults": 25,
    "orderBy": "insertInstant",
    "startRow": 0
  }
}
```

### Response

The response for this API contains the Themes matching the search criteria in paginated format.

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

> **CAUTION:** Responses from the theme API can contain [Advanced Themes](https://fusionauth.io/docs/apis/themes/advanced-themes.md) as well.

#### Response Body

`themes`

*   Array

The list of Theme objects.

`themes[x].data`

*   Object

An object that can hold any information about the Theme that should be persisted.

`themes[x].defaultMessages`

*   Integer

A properties file formatted String containing messages used within the templates.

`themes[x].id`

*   UUID

The unique Id of the Theme.

`themes[x].insertInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was added to the FusionAuth database.

`themes[x].lastUpdateInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was last updated in the FusionAuth database.

`themes[x].localizedMessages`

*   Map<Locale,String>

A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.

`themes[x].name`

*   String

A unique name for the Theme.

`themes[x].variables.alertBackgroundColor`

*   String

The background color of the alert message.

`themes[x].variables.alertFontColor`

*   String

The color of the font in the alert message.

`themes[x].variables.backgroundImageURL`

*   String
*   optional

The url of the background image. Will replace the page background color.

`themes[x].variables.backgroundSize`

*   String
*   optional

Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image.

`themes[x].variables.borderRadius`

*   String

Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme.

`themes[x].variables.deleteButtonColor`

*   String

The color of the delete button.

`themes[x].variables.deleteButtonFocusColor`

*   String

The color of the delete button when clicked.

`themes[x].variables.deleteButtonTextColor`

*   String

The color of the text in the delete button.

`themes[x].variables.deleteButtonTextFocusColor`

*   String

The color of the text in the delete button when clicked.

`themes[x].variables.errorIconColor`

*   String

The color of the icon in error alert messages in the theme.

`themes[x].variables.errorFontColor`

*   String

The color of the font for error messages.

`themes[x].variables.favicons`

*   Array
*   Available since 1.65.0

The favicons for all hosted pages.

`themes[x].variables.favicons[x].href`

*   String
*   Available since 1.65.0

The url of the favicon.

`themes[x].variables.favicons[x].rel`

*   String
*   Available since 1.65.0

The `rel` attribute for the favicon HTML element.

`themes[x].variables.favicons[x].sizes`

*   String
*   Available since 1.65.0

The `sizes` attribute for the favicon HTML element.

`themes[x].variables.favicons[x].type`

*   String
*   Available since 1.65.0

The `type` attribute for the favicon HTML element.

`themes[x].variables.fontColor`

*   String

The color of the text in the theme.

`themes[x].variables.fontFamily`

*   String

Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.

`themes[x].variables.footerDisplay`

*   Boolean
*   optional

Determines if the "powered by FusionAuth" footer is displayed in the theme.

`themes[x].variables.iconBackgroundColor`

*   String

The color of the form field icon background.

`themes[x].variables.iconColor`

*   String

The color of the icons in the theme.

`themes[x].variables.infoIconColor`

*   String

The color of the icon in info alert messages in the theme.

`themes[x].variables.inputBackgroundColor`

*   String

The color of the form field background.

`themes[x].variables.inputIconColor`

*   String

The color of the form field icon.

`themes[x].variables.inputTextColor`

*   String

The color of the form field text.

`themes[x].variables.linkTextColor`

*   String

The color of the text in hyperlinks.

`themes[x].variables.linkTextFocusColor`

*   String

The color of the text in hyperlinks that have been visited.

`themes[x].variables.logoImageSize`

*   String
*   optional

The size of the logo image.

`themes[x].variables.logoImageURL`

*   String
*   optional

The url of the logo image.

`themes[x].variables.monoFontColor`

*   String

The color of the monospaced text.

`themes[x].variables.monoFontFamily`

*   String

The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).

`themes[x].variables.pageBackgroundColor`

*   String

The color of the page background.

`themes[x].variables.panelBackgroundColor`

*   String

The color of the panels in the theme.

`themes[x].variables.primaryButtonColor`

*   String

The color of the primary button.

`themes[x].variables.primaryButtonFocusColor`

*   String

The color of primary button when clicked.

`themes[x].variables.primaryButtonTextColor`

*   String

The color of the text in the primary button.

`themes[x].variables.primaryButtonTextFocusColor`

*   String

The color of the text in the primary button when clicked.

`total`

*   Integer

The total number of Themes matching the search criteria. Use this value along with the **numberOfResults** and **startRow** in the Search request to perform pagination.

*Example Response JSON for Theme Search*

```json
{
  "themes": [
    {
      "data": {
        "addedBy": "richard"
      },
      "defaultMessages": "title=Login",
      "id": "64773453-bb11-457b-a3d6-7475ec2259d0",
      "insertInstant": 1564006815352,
      "lastUpdateInstant": 1564084258150,
      "localizedMessages": {
        "fr": "title=Identifiant",
        "es": "title=Iniciar sesión"
      },
      "name": "Orange Theme",
      "stylesheet": "h1 {\r\n  color: orange;\r\n  text-align: center;\r\n}",
      "templates": {
        "accountEdit": "[#ftl/]",
        "accountIndex": "[#ftl/]",
        "accountTwoFactorDisable": "[#ftl/]",
        "accountTwoFactorEnable": "[#ftl/]",
        "accountTwoFactorIndex": "[#ftl/]",
        "accountWebAuthnAdd": "[#ftl/]",
        "accountWebAuthnDelete": "[#ftl/]",
        "accountWebAuthnIndex": "[#ftl/]",
        "emailComplete": "[#ftl/]",
        "emailSent": "[#ftl/]",
        "emailVerificationRequired": "[#ftl/]",
        "emailVerify": "[#ftl/]",
        "helpers": "[#ftl/]",
        "index": "[#ftl/]",
        "oauth2Authorize": "[#ftl/]",
        "oauth2AuthorizedNotRegistered": "[#ftl/]",
        "oauth2ChildRegistrationNotAllowed": "[#ftl/]",
        "oauth2ChildRegistrationNotAllowedComplete": "[#ftl/]",
        "oauth2CompleteRegistration": "[#ftl/]",
        "oauth2Device": "[#ftl/]",
        "oauth2DeviceComplete": "[#ftl/]",
        "oauth2Error": "[#ftl/]",
        "oauth2Logout": "[#ftl/]",
        "oauth2Passwordless": "[#ftl/]",
        "oauth2Register": "[#ftl/]",
        "oauth2StartIdPLink": "[#ftl/]",
        "oauth2TwoFactor": "[#ftl/]",
        "oauth2TwoFactorEnable": "[#ftl/]",
        "oauth2TwoFactorEnableComplete": "[#ftl/]",
        "oauth2TwoFactorMethods": "[#ftl/]",
        "oauth2Wait": "[#ftl/]",
        "oauth2WebAuthn": "[#ftl/]",
        "oauth2WebAuthnReauth": "[#ftl/]",
        "oauth2WebAuthnReauthEnable": "[#ftl/]",
        "passwordChange": "[#ftl/]",
        "passwordComplete": "[#ftl/]",
        "passwordForgot": "[#ftl/]",
        "passwordSent": "[#ftl/]",
        "registrationComplete": "[#ftl/]",
        "registrationSent": "[#ftl/]",
        "registrationVerificationRequired": "[#ftl/]",
        "registrationVerify": "[#ftl/]",
        "samlv2Logout": "[#ftl/]",
        "unauthorized": "[#ftl/]"
      },
      "type": "advanced"
    },
    {
      "data": {},
      "defaultMessages": "login=Please Log in",
      "id": "58324824-6539-4305-8117-b28f26466ab9",
      "insertInstant": 1716401547557,
      "lastUpdateInstant": 1716401606387,
      "localizedMessages": {},
      "name": "White Theme",
      "type": "simple",
      "variables": {
        "alertBackgroundColor": "#ffffff",
        "alertFontColor": "#ffffff",
        "backgroundImageURL": "https://example.com/mybackground.png",
        "backgroundRepeat": "no-repeat",
        "backgroundSize": "cover",
        "borderRadius": "1.00rem",
        "deleteButtonColor": "#ffffff",
        "deleteButtonFocusColor": "#cccccc",
        "deleteButtonTextColor": "#ffffff",
        "deleteButtonTextFocusColor": "#cccccc",
        "errorFontColor": "#ffffff",
        "fontColor": "#ffffff",
        "fontFamily": "sans-serif",
        "footerDisplay": "flex",
        "iconBackgroundColor": "#ffffff",
        "iconColor": "#ffffff",
        "inputBackgroundColor": "#ffffff",
        "inputIconColor": "#ffffff",
        "inputTextColor": "#ffffff",
        "linkTextColor": "#ffffff",
        "linkTextFocusColor": "#cccccc",
        "logoImageDisplay": "flex",
        "logoImageSize": "7rem",
        "logoImageURL": "https://example.com/mylogo.png",
        "monoFontColor": "#ffffff",
        "monoFontFamily": "monospace",
        "pageBackgroundColor": "#ffffff",
        "panelBackgroundColor": "#ffffff",
        "primaryButtonColor": "#ffffff",
        "primaryButtonFocusColor": "#cccccc",
        "primaryButtonTextColor": "#ffffff",
        "primaryButtonTextFocusColor": "#cccccc"
      }
    }
  ],
  "total": 2
}
```

## Update a Simple Theme

This API is used to update an existing Theme.

You must specify all of the properties of the Theme when calling this API with the `PUT` HTTP method. When used with `PUT`, this API doesn't merge the existing Theme and your new data. It replaces the existing Theme with your new data.

Utilize the `PATCH` HTTP method to send specific changes to merge into an existing Theme.

### Request

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Update the Theme with the given Id

`PUT /api/theme/{themeId}`

`PATCH /api/theme/{themeId}`

> **NOTE:** For backward compatibility, the `PATCH` method accepts the same media type (specified by a `Content-Type` of `application/json`) and body as the `PUT` request. You can also use the following media types for different behavior:
> 
> *   [JSON Patch/RFC 6902](https://www.rfc-editor.org/rfc/rfc6902): `application/json-patch+json`
> *   [JSON Merge Patch/RFC 7396](https://www.rfc-editor.org/rfc/rfc7396): `merge-patch+json`
> 
> For details, see the [PATCH documentation](https://fusionauth.io/docs/apis.md#the-patch-http-method).
> 
> Using a media type of `application/json` merges the provided request parameters into the existing object. As a result, all parameters are optional with `PATCH`: only provide the values you want to change. To remove a value, provide a `null` value. Patching an `Array` appends all values in the new list to the old list.

#### Request Parameters

`themeId`

*   UUID
*   required

The unique Id of the Theme to update.

#### Request Body

`theme.data`

*   Object
*   optional

An object that can hold any information about the Theme that should be persisted.

`theme.defaultMessages`

*   String
*   required

A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file.

`theme.localizedMessages`

*   Map<Locale,String>
*   optional

A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.

`theme.name`

*   String
*   required

A unique name for the Theme.

`theme.variables.alertBackgroundColor`

*   String
*   required

The background color of the alert message. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.alertFontColor`

*   String
*   required

The color of the font in the alert message. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.backgroundImageURL`

*   String
*   optional

The url of the background image. Will replace the page background color. Must be a valid absolute URL.

`theme.variables.backgroundSize`

*   String
*   optional

Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image. Valid values are `repeat`, `contain`, and `cover`.

Required if **theme.variables.backgroundImageURL** is provided.

`theme.variables.borderRadius`

*   String
*   required

Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme. Must be a valid numeric value with a `px`, `em`, or `rem` suffix.

`theme.variables.deleteButtonColor`

*   String
*   required

The color of the delete button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.deleteButtonFocusColor`

*   String
*   required

The color of the delete button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.deleteButtonTextColor`

*   String
*   required

The color of the text in the delete button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.deleteButtonTextFocusColor`

*   String
*   required

The color of the text in the delete button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.errorIconColor`

*   String
*   required

The color of the icon in error alert messages in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.errorFontColor`

*   String
*   required

The color of the font for error messages. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.favicons`

*   Array
*   optional
*   Available since 1.65.0

The favicons to use for all hosted pages. Currently only a single favicon is supported.

`theme.variables.favicons[x].href`

*   String
*   optional
*   Available since 1.65.0

The url of the favicon. Must be a valid absolute URL.

`theme.variables.favicons[x].rel`

*   String
*   optional
*   Available since 1.65.0

The `rel` attribute for the favicon HTML element. Currently only `icon` is supported.

`theme.variables.favicons[x].sizes`

*   String
*   optional
*   Available since 1.65.0

The `sizes` attribute for the favicon HTML element. Currently not supported and must be omitted from the request.

`theme.variables.favicons[x].type`

*   String
*   optional
*   Available since 1.65.0

The `type` attribute for the favicon HTML element. Currently only `image/x-icon` is supported.

`theme.variables.fontColor`

*   String
*   required

The color of the text in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.fontFamily`

*   String
*   required

Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.

`theme.variables.footerDisplay`

*   Boolean
*   optional

Determines if the "powered by FusionAuth" footer is displayed in the theme. A valid license is required to set this value to `false`.

`theme.variables.iconBackgroundColor`

*   String
*   required

The color of the form field icon background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.iconColor`

*   String
*   required

The color of the icons in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.infoIconColor`

*   String
*   required

The color of the icon in info alert messages in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.inputBackgroundColor`

*   String
*   required

The color of the form field background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.inputIconColor`

*   String
*   required

The color of the form field icon. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.inputTextColor`

*   String
*   required

The color of the form field text. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.linkTextColor`

*   String
*   required

The color of the text in hyperlinks. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.linkTextFocusColor`

*   String
*   required

The color of the text in hyperlinks that have been visited. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.logoImageSize`

*   String
*   optional

The size of the logo image. Must be a valid numeric value with a `px`, `em`, or `rem` suffix.

Required if **theme.variables.logoImageURL** is provided.

`theme.variables.logoImageURL`

*   String
*   optional

The url of the logo image. Must be a valid absolute URL. Can be `null`.

`theme.variables.monoFontColor`

*   String
*   required

The color of the monospaced text. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.monoFontFamily`

*   String
*   required

The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).

`theme.variables.pageBackgroundColor`

*   String
*   required

The color of the page background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.panelBackgroundColor`

*   String
*   required

The color of the panels in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonColor`

*   String
*   required

The color of the primary button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonFocusColor`

*   String
*   required

The color of primary button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonTextColor`

*   String
*   required

The color of the text in the primary button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

`theme.variables.primaryButtonTextFocusColor`

*   String
*   required

The color of the text in the primary button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.

*Example Simple Theme Request JSON*

```json
{
  "theme": {
    "data": {
      "addedBy": "richard"
    },
    "defaultMessages": "title=Login",
    "localizedMessages": {
      "fr": "title=Identifiant",
      "es": "title=Iniciar sesión"
    },
    "name": "White Theme",
    "type": "simple",
    "variables": {
      "alertBackgroundColor": "#ffffff",
      "alertFontColor": "#ffffff",
      "backgroundImageURL": "https://example.com/mybackground.png",
      "backgroundRepeat": "no-repeat",
      "backgroundSize": "cover",
      "borderRadius": "1.00rem",
      "deleteButtonColor": "#ffffff",
      "deleteButtonFocusColor": "#cccccc",
      "deleteButtonTextColor": "#ffffff",
      "deleteButtonTextFocusColor": "#cccccc",
      "errorFontColor": "#ffffff",
      "fontColor": "#ffffff",
      "fontFamily": "sans-serif",
      "footerDisplay": "flex",
      "iconBackgroundColor": "#ffffff",
      "iconColor": "#ffffff",
      "inputBackgroundColor": "#ffffff",
      "inputIconColor": "#ffffff",
      "inputTextColor": "#ffffff",
      "linkTextColor": "#ffffff",
      "linkTextFocusColor": "#cccccc",
      "logoImageDisplay": "flex",
      "logoImageSize": "7rem",
      "logoImageURL": "https://example.com/mylogo.png",
      "monoFontColor": "#ffffff",
      "monoFontFamily": "monospace",
      "pageBackgroundColor": "#ffffff",
      "panelBackgroundColor": "#ffffff",
      "primaryButtonColor": "#ffffff",
      "primaryButtonFocusColor": "#cccccc",
      "primaryButtonTextColor": "#ffffff",
      "primaryButtonTextFocusColor": "#cccccc"
    }
  }
}
```

### Response

The response for this API contains the Theme that was updated.

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 404 | The object you are trying to update doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |
| 503 | The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body. |

#### Response Body

`theme.data`

*   Object

An object that can hold any information about the Theme that should be persisted.

`theme.defaultMessages`

*   String

A properties file formatted String containing messages used within the templates.

`theme.id`

*   UUID

The unique Id of the Theme.

`theme.insertInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was added to the FusionAuth database.

`theme.lastUpdateInstant`

*   Long

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the theme was last updated in the FusionAuth database.

`theme.localizedMessages`

*   Map<Locale,String>

A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.

`theme.name`

*   String

A unique name for the Theme.

`theme.variables.alertBackgroundColor`

*   String

The background color of the alert message.

`theme.variables.alertFontColor`

*   String

The color of the font in the alert message.

`theme.variables.backgroundImageURL`

*   String
*   optional

The url of the background image. Will replace the page background color.

`theme.variables.backgroundSize`

*   String
*   optional

Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image.

`theme.variables.borderRadius`

*   String

Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme.

`theme.variables.deleteButtonColor`

*   String

The color of the delete button.

`theme.variables.deleteButtonFocusColor`

*   String

The color of the delete button when clicked.

`theme.variables.deleteButtonTextColor`

*   String

The color of the text in the delete button.

`theme.variables.deleteButtonTextFocusColor`

*   String

The color of the text in the delete button when clicked.

`theme.variables.errorIconColor`

*   String

The color of the icon in error alert messages in the theme.

`theme.variables.errorFontColor`

*   String

The color of the font for error messages.

`theme.variables.favicons`

*   Array
*   Available since 1.65.0

The favicons for all hosted pages.

`theme.variables.favicons[x].href`

*   String
*   Available since 1.65.0

The url of the favicon.

`theme.variables.favicons[x].rel`

*   String
*   Available since 1.65.0

The `rel` attribute for the favicon HTML element.

`theme.variables.favicons[x].sizes`

*   String
*   Available since 1.65.0

The `sizes` attribute for the favicon HTML element.

`theme.variables.favicons[x].type`

*   String
*   Available since 1.65.0

The `type` attribute for the favicon HTML element.

`theme.variables.fontColor`

*   String

The color of the text in the theme.

`theme.variables.fontFamily`

*   String

Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.

`theme.variables.footerDisplay`

*   Boolean
*   optional

Determines if the "powered by FusionAuth" footer is displayed in the theme.

`theme.variables.iconBackgroundColor`

*   String

The color of the form field icon background.

`theme.variables.iconColor`

*   String

The color of the icons in the theme.

`theme.variables.infoIconColor`

*   String

The color of the icon in info alert messages in the theme.

`theme.variables.inputBackgroundColor`

*   String

The color of the form field background.

`theme.variables.inputIconColor`

*   String

The color of the form field icon.

`theme.variables.inputTextColor`

*   String

The color of the form field text.

`theme.variables.linkTextColor`

*   String

The color of the text in hyperlinks.

`theme.variables.linkTextFocusColor`

*   String

The color of the text in hyperlinks that have been visited.

`theme.variables.logoImageSize`

*   String
*   optional

The size of the logo image.

`theme.variables.logoImageURL`

*   String
*   optional

The url of the logo image.

`theme.variables.monoFontColor`

*   String

The color of the monospaced text.

`theme.variables.monoFontFamily`

*   String

The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).

`theme.variables.pageBackgroundColor`

*   String

The color of the page background.

`theme.variables.panelBackgroundColor`

*   String

The color of the panels in the theme.

`theme.variables.primaryButtonColor`

*   String

The color of the primary button.

`theme.variables.primaryButtonFocusColor`

*   String

The color of primary button when clicked.

`theme.variables.primaryButtonTextColor`

*   String

The color of the text in the primary button.

`theme.variables.primaryButtonTextFocusColor`

*   String

The color of the text in the primary button when clicked.

*Example Simple Theme Response JSON*

```json
{
  "theme": {
    "data": {
      "addedBy": "richard"
    },
    "defaultMessages": "title=Login",
    "id": "58324824-6539-4305-8117-b28f26466ab9",
    "insertInstant": 1716401547557,
    "lastUpdateInstant": 1716401606387,
    "localizedMessages": {
      "fr": "title=Identifiant",
      "es": "title=Iniciar sesión"
    },
    "name": "White Theme",
    "type": "simple",
    "variables": {
      "alertBackgroundColor": "#ffffff",
      "alertFontColor": "#ffffff",
      "backgroundImageURL": "https://example.com/mybackground.png",
      "backgroundRepeat": "no-repeat",
      "backgroundSize": "cover",
      "borderRadius": "1.00rem",
      "deleteButtonColor": "#ffffff",
      "deleteButtonFocusColor": "#cccccc",
      "deleteButtonTextColor": "#ffffff",
      "deleteButtonTextFocusColor": "#cccccc",
      "errorFontColor": "#ffffff",
      "fontColor": "#ffffff",
      "fontFamily": "sans-serif",
      "footerDisplay": "flex",
      "iconBackgroundColor": "#ffffff",
      "iconColor": "#ffffff",
      "inputBackgroundColor": "#ffffff",
      "inputIconColor": "#ffffff",
      "inputTextColor": "#ffffff",
      "linkTextColor": "#ffffff",
      "linkTextFocusColor": "#cccccc",
      "logoImageDisplay": "flex",
      "logoImageSize": "7rem",
      "logoImageURL": "https://example.com/mylogo.png",
      "monoFontColor": "#ffffff",
      "monoFontFamily": "monospace",
      "pageBackgroundColor": "#ffffff",
      "panelBackgroundColor": "#ffffff",
      "primaryButtonColor": "#ffffff",
      "primaryButtonFocusColor": "#cccccc",
      "primaryButtonTextColor": "#ffffff",
      "primaryButtonTextFocusColor": "#cccccc"
    }
  }
}
```

## Delete a Simple Theme

This API is used to permanently delete a Theme.

### Request

[Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Delete a Theme by Id

`DELETE /api/theme/{themeId}`

#### Request Parameters

`themeId`

*   UUID
*   required

The unique Id of the Theme to delete.

### Response

This API does not return a JSON response body.

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 404 | The object you requested doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |
| 503 | The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body. |