Simple Themes

Overview

This API has been available since 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

API Key Authentication
Create a new Simple Theme with a randomly generated Id
POST /api/theme
API Key Authentication
Create a Simple Theme with the provided unique Id
POST /api/theme/{themeId}

Request Parameters

themeIdUUIDDefaults 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 that the rest of this page will assume that the theme.type of this theme is simple.

theme.dataObject

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

theme.defaultMessagesString

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

theme.localizedMessagesMap<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.nameStringrequired

A unique name for the Theme.

theme.typeStringDefaults to advancedAvailable 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 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.
  • 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.alertBackgroundColorStringrequired

The background color of the alert message. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.alertFontColorStringrequired

The color of the font in the alert message. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.backgroundImageURLString

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

theme.variables.backgroundSizeString

Specifies the background-size of the background image. Valid values are repeat, contain, and cover.

Required if theme.variables.backgroundImageURL is provided.

theme.variables.borderRadiusStringrequired

Specifies the 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.deleteButtonColorStringrequired

The color of the delete button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.deleteButtonFocusColorStringrequired

The color of the delete button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.deleteButtonTextColorStringrequired

The color of the text in the delete button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.deleteButtonTextFocusColorStringrequired

The color of the text in the delete button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.errorIconColorStringrequired

The color of the icon in error alert messages in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.errorFontColorStringrequired

The color of the font for error messages. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.fontColorStringrequired

The color of the text in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.fontFamilyStringrequired

Specifies the font-family for the theme.

theme.variables.footerDisplayBoolean

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.iconBackgroundColorStringrequired

The color of the form field icon background. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.iconColorStringrequired

The color of the icons in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.infoIconColorStringrequired

The color of the icon in info alert messages in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.inputBackgroundColorStringrequired

The color of the form field background. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.inputIconColorStringrequired

The color of the form field icon. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.inputTextColorStringrequired

The color of the form field text. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.linkTextColorStringrequired

The color of the text in hyperlinks. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.linkTextFocusColorStringrequired

The color of the text in hyperlinks that have been visited. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.logoImageSizeString

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.logoImageURLString

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

theme.variables.monoFontColorStringrequired

The color of the monospaced text. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.monoFontFamilyStringrequired

The font font-family.

theme.variables.pageBackgroundColorStringrequired

The color of the page background. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.panelBackgroundColorStringrequired

The color of the panels in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonColorStringrequired

The color of the primary button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonFocusColorStringrequired

The color of primary button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonTextColorStringrequired

The color of the text in the primary button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonTextFocusColorStringrequired

The color of the text in the primary button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

Example Simple Theme Request 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"
    }
  }
}
API Key Authentication
Create a Simple Theme from an existing Simple Theme with a randomly generated Id
POST /api/theme
API Key Authentication
Create a Simple Theme from an existing Simple Theme with the provided unique Id
POST /api/theme/{themeId}

Request Parameters

themeIdUUIDDefaults to secure random UUID

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

Request Body

sourceThemeIdUUIDrequired

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.nameStringrequired

A unique name for the Theme.

Example request 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 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.
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.dataObject

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

theme.defaultMessagesString

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

theme.idUUID

The unique Id of the Theme.

theme.insertInstantLong

The instant that the theme was added to the FusionAuth database.

theme.lastUpdateInstantLong

The instant that the theme was last updated in the FusionAuth database.

theme.localizedMessagesMap<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.nameString

A unique name for the Theme.

theme.variables.alertBackgroundColorString

The background color of the alert message.

theme.variables.alertFontColorString

The color of the font in the alert message.

theme.variables.backgroundImageURLString

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

theme.variables.backgroundSizeString

Specifies the background-size of the background image.

theme.variables.borderRadiusString

Specifies the border-radius property which is applied to buttons, panels, and form fields in the theme.

theme.variables.deleteButtonColorString

The color of the delete button.

theme.variables.deleteButtonFocusColorString

The color of the delete button when clicked.

theme.variables.deleteButtonTextColorString

The color of the text in the delete button.

theme.variables.deleteButtonTextFocusColorString

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

theme.variables.errorIconColorString

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

theme.variables.errorFontColorString

The color of the font for error messages.

theme.variables.fontColorString

The color of the text in the theme.

theme.variables.fontFamilyString

Specifies the font-family for the theme.

theme.variables.footerDisplayBoolean

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

theme.variables.iconBackgroundColorString

The color of the form field icon background.

theme.variables.iconColorString

The color of the icons in the theme.

theme.variables.infoIconColorString

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

theme.variables.inputBackgroundColorString

The color of the form field background.

theme.variables.inputIconColorString

The color of the form field icon.

theme.variables.inputTextColorString

The color of the form field text.

theme.variables.linkTextColorString

The color of the text in hyperlinks.

theme.variables.linkTextFocusColorString

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

theme.variables.logoImageSizeString

The size of the logo image.

theme.variables.logoImageURLString

The url of the logo image.

theme.variables.monoFontColorString

The color of the monospaced text.

theme.variables.monoFontFamilyString

The font font-family.

theme.variables.pageBackgroundColorString

The color of the page background.

theme.variables.panelBackgroundColorString

The color of the panels in the theme.

theme.variables.primaryButtonColorString

The color of the primary button.

theme.variables.primaryButtonFocusColorString

The color of primary button when clicked.

theme.variables.primaryButtonTextColorString

The color of the text in the primary button.

theme.variables.primaryButtonTextFocusColorString

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

Example Simple Theme Response 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

API Key Authentication
Retrieve all of the Themes
GET /api/theme
API Key Authentication
Retrieve a Theme by Id
GET /api/theme/{themeId}

Request Parameters

themeIdUUIDrequired

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 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.
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.dataObject

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

theme.defaultMessagesString

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

theme.idUUID

The unique Id of the Theme.

theme.insertInstantLong

The instant that the theme was added to the FusionAuth database.

theme.lastUpdateInstantLong

The instant that the theme was last updated in the FusionAuth database.

theme.localizedMessagesMap<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.nameString

A unique name for the Theme.

theme.variables.alertBackgroundColorString

The background color of the alert message.

theme.variables.alertFontColorString

The color of the font in the alert message.

theme.variables.backgroundImageURLString

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

theme.variables.backgroundSizeString

Specifies the background-size of the background image.

theme.variables.borderRadiusString

Specifies the border-radius property which is applied to buttons, panels, and form fields in the theme.

theme.variables.deleteButtonColorString

The color of the delete button.

theme.variables.deleteButtonFocusColorString

The color of the delete button when clicked.

theme.variables.deleteButtonTextColorString

The color of the text in the delete button.

theme.variables.deleteButtonTextFocusColorString

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

theme.variables.errorIconColorString

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

theme.variables.errorFontColorString

The color of the font for error messages.

theme.variables.fontColorString

The color of the text in the theme.

theme.variables.fontFamilyString

Specifies the font-family for the theme.

theme.variables.footerDisplayBoolean

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

theme.variables.iconBackgroundColorString

The color of the form field icon background.

theme.variables.iconColorString

The color of the icons in the theme.

theme.variables.infoIconColorString

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

theme.variables.inputBackgroundColorString

The color of the form field background.

theme.variables.inputIconColorString

The color of the form field icon.

theme.variables.inputTextColorString

The color of the form field text.

theme.variables.linkTextColorString

The color of the text in hyperlinks.

theme.variables.linkTextFocusColorString

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

theme.variables.logoImageSizeString

The size of the logo image.

theme.variables.logoImageURLString

The url of the logo image.

theme.variables.monoFontColorString

The color of the monospaced text.

theme.variables.monoFontFamilyString

The font font-family.

theme.variables.pageBackgroundColorString

The color of the page background.

theme.variables.panelBackgroundColorString

The color of the panels in the theme.

theme.variables.primaryButtonColorString

The color of the primary button.

theme.variables.primaryButtonFocusColorString

The color of primary button when clicked.

theme.variables.primaryButtonTextColorString

The color of the text in the primary button.

theme.variables.primaryButtonTextFocusColorString

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

Example Simple Theme Response 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"
    }
  }
}

Responses from the theme api can contain Advanced Themes as well.

Response Body

themesArray

The list of Theme objects.

themes[x].dataObject

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

themes[x].defaultMessagesInteger

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

themes[x].idUUID

The unique Id of the Theme.

themes[x].insertInstantLong

The instant that the theme was added to the FusionAuth database.

themes[x].lastUpdateInstantLong

The instant that the theme was last updated in the FusionAuth database.

themes[x].localizedMessagesMap<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].nameString

A unique name for the Theme.

themes[x].variables.alertBackgroundColorString

The background color of the alert message.

themes[x].variables.alertFontColorString

The color of the font in the alert message.

themes[x].variables.backgroundImageURLString

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

themes[x].variables.backgroundSizeString

Specifies the background-size of the background image.

themes[x].variables.borderRadiusString

Specifies the border-radius property which is applied to buttons, panels, and form fields in the theme.

themes[x].variables.deleteButtonColorString

The color of the delete button.

themes[x].variables.deleteButtonFocusColorString

The color of the delete button when clicked.

themes[x].variables.deleteButtonTextColorString

The color of the text in the delete button.

themes[x].variables.deleteButtonTextFocusColorString

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

themes[x].variables.errorIconColorString

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

themes[x].variables.errorFontColorString

The color of the font for error messages.

themes[x].variables.fontColorString

The color of the text in the theme.

themes[x].variables.fontFamilyString

Specifies the font-family for the theme.

themes[x].variables.footerDisplayBoolean

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

themes[x].variables.iconBackgroundColorString

The color of the form field icon background.

themes[x].variables.iconColorString

The color of the icons in the theme.

themes[x].variables.infoIconColorString

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

themes[x].variables.inputBackgroundColorString

The color of the form field background.

themes[x].variables.inputIconColorString

The color of the form field icon.

themes[x].variables.inputTextColorString

The color of the form field text.

themes[x].variables.linkTextColorString

The color of the text in hyperlinks.

themes[x].variables.linkTextFocusColorString

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

themes[x].variables.logoImageSizeString

The size of the logo image.

themes[x].variables.logoImageURLString

The url of the logo image.

themes[x].variables.monoFontColorString

The color of the monospaced text.

themes[x].variables.monoFontFamilyString

The font font-family.

themes[x].variables.pageBackgroundColorString

The color of the page background.

themes[x].variables.panelBackgroundColorString

The color of the panels in the theme.

themes[x].variables.primaryButtonColorString

The color of the primary button.

themes[x].variables.primaryButtonFocusColorString

The color of primary button when clicked.

themes[x].variables.primaryButtonTextColorString

The color of the text in the primary button.

themes[x].variables.primaryButtonTextFocusColorString

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

Example Response 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

API Key Authentication
Search for Themes
GET /api/theme/search?name={name}

Request Parameters

nameString

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*.

numberOfResultsIntegerDefaults to 25

The number of results to return from the search.

orderByStringDefaults 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 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.

startRowIntegerDefaults 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.

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.nameString

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.numberOfResultsIntegerDefaults to 25

The number of results to return from the search.

search.orderByStringDefaults 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 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.startRowIntegerDefaults 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

{
  "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 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.
500 There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.

Responses from the theme api can contain Advanced Themes as well.

Response Body

themesArray

The list of Theme objects.

themes[x].dataObject

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

themes[x].defaultMessagesInteger

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

themes[x].idUUID

The unique Id of the Theme.

themes[x].insertInstantLong

The instant that the theme was added to the FusionAuth database.

themes[x].lastUpdateInstantLong

The instant that the theme was last updated in the FusionAuth database.

themes[x].localizedMessagesMap<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].nameString

A unique name for the Theme.

themes[x].variables.alertBackgroundColorString

The background color of the alert message.

themes[x].variables.alertFontColorString

The color of the font in the alert message.

themes[x].variables.backgroundImageURLString

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

themes[x].variables.backgroundSizeString

Specifies the background-size of the background image.

themes[x].variables.borderRadiusString

Specifies the border-radius property which is applied to buttons, panels, and form fields in the theme.

themes[x].variables.deleteButtonColorString

The color of the delete button.

themes[x].variables.deleteButtonFocusColorString

The color of the delete button when clicked.

themes[x].variables.deleteButtonTextColorString

The color of the text in the delete button.

themes[x].variables.deleteButtonTextFocusColorString

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

themes[x].variables.errorIconColorString

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

themes[x].variables.errorFontColorString

The color of the font for error messages.

themes[x].variables.fontColorString

The color of the text in the theme.

themes[x].variables.fontFamilyString

Specifies the font-family for the theme.

themes[x].variables.footerDisplayBoolean

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

themes[x].variables.iconBackgroundColorString

The color of the form field icon background.

themes[x].variables.iconColorString

The color of the icons in the theme.

themes[x].variables.infoIconColorString

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

themes[x].variables.inputBackgroundColorString

The color of the form field background.

themes[x].variables.inputIconColorString

The color of the form field icon.

themes[x].variables.inputTextColorString

The color of the form field text.

themes[x].variables.linkTextColorString

The color of the text in hyperlinks.

themes[x].variables.linkTextFocusColorString

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

themes[x].variables.logoImageSizeString

The size of the logo image.

themes[x].variables.logoImageURLString

The url of the logo image.

themes[x].variables.monoFontColorString

The color of the monospaced text.

themes[x].variables.monoFontFamilyString

The font font-family.

themes[x].variables.pageBackgroundColorString

The color of the page background.

themes[x].variables.panelBackgroundColorString

The color of the panels in the theme.

themes[x].variables.primaryButtonColorString

The color of the primary button.

themes[x].variables.primaryButtonFocusColorString

The color of primary button when clicked.

themes[x].variables.primaryButtonTextColorString

The color of the text in the primary button.

themes[x].variables.primaryButtonTextFocusColorString

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

totalInteger
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

{
  "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

API Key Authentication
Update the Theme with the given Id
PUT /api/theme/{themeId}
PATCH /api/theme/{themeId}

When using the PATCH method, you can either use the same request body documentation that is provided for the PUT request for backward compatibility. Or you may use either JSON Patch/RFC 6902] or JSON Merge Patch/RFC 7396. See the PATCH documentation for more information.

When using the PATCH method with a Content-Type of application/json the provided request parameters will be merged into the existing object, this means all parameters are optional when using the PATCH method and you only provide the values you want changed. A null value can be used to remove a value. Patching an Array will result in all values from the new list being appended to the existing list, this is a known limitation to the current implementation of PATCH.

Request Parameters

themeIdUUIDrequired

The unique Id of the Theme to update.

Request Body

theme.dataObject

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

theme.defaultMessagesStringrequired

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

theme.localizedMessagesMap<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.nameStringrequired

A unique name for the Theme.

theme.variables.alertBackgroundColorStringrequired

The background color of the alert message. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.alertFontColorStringrequired

The color of the font in the alert message. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.backgroundImageURLString

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

theme.variables.backgroundSizeString

Specifies the background-size of the background image. Valid values are repeat, contain, and cover.

Required if theme.variables.backgroundImageURL is provided.

theme.variables.borderRadiusStringrequired

Specifies the 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.deleteButtonColorStringrequired

The color of the delete button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.deleteButtonFocusColorStringrequired

The color of the delete button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.deleteButtonTextColorStringrequired

The color of the text in the delete button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.deleteButtonTextFocusColorStringrequired

The color of the text in the delete button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.errorIconColorStringrequired

The color of the icon in error alert messages in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.errorFontColorStringrequired

The color of the font for error messages. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.fontColorStringrequired

The color of the text in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.fontFamilyStringrequired

Specifies the font-family for the theme.

theme.variables.footerDisplayBoolean

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.iconBackgroundColorStringrequired

The color of the form field icon background. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.iconColorStringrequired

The color of the icons in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.infoIconColorStringrequired

The color of the icon in info alert messages in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.inputBackgroundColorStringrequired

The color of the form field background. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.inputIconColorStringrequired

The color of the form field icon. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.inputTextColorStringrequired

The color of the form field text. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.linkTextColorStringrequired

The color of the text in hyperlinks. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.linkTextFocusColorStringrequired

The color of the text in hyperlinks that have been visited. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.logoImageSizeString

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.logoImageURLString

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

theme.variables.monoFontColorStringrequired

The color of the monospaced text. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.monoFontFamilyStringrequired

The font font-family.

theme.variables.pageBackgroundColorStringrequired

The color of the page background. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.panelBackgroundColorStringrequired

The color of the panels in the theme. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonColorStringrequired

The color of the primary button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonFocusColorStringrequired

The color of primary button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonTextColorStringrequired

The color of the text in the primary button. Colors must be a valid hex color code, RGB, or HSL value.

theme.variables.primaryButtonTextFocusColorStringrequired

The color of the text in the primary button when clicked. Colors must be a valid hex color code, RGB, or HSL value.

Example Simple Theme Request 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 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.
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.dataObject

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

theme.defaultMessagesString

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

theme.idUUID

The unique Id of the Theme.

theme.insertInstantLong

The instant that the theme was added to the FusionAuth database.

theme.lastUpdateInstantLong

The instant that the theme was last updated in the FusionAuth database.

theme.localizedMessagesMap<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.nameString

A unique name for the Theme.

theme.variables.alertBackgroundColorString

The background color of the alert message.

theme.variables.alertFontColorString

The color of the font in the alert message.

theme.variables.backgroundImageURLString

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

theme.variables.backgroundSizeString

Specifies the background-size of the background image.

theme.variables.borderRadiusString

Specifies the border-radius property which is applied to buttons, panels, and form fields in the theme.

theme.variables.deleteButtonColorString

The color of the delete button.

theme.variables.deleteButtonFocusColorString

The color of the delete button when clicked.

theme.variables.deleteButtonTextColorString

The color of the text in the delete button.

theme.variables.deleteButtonTextFocusColorString

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

theme.variables.errorIconColorString

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

theme.variables.errorFontColorString

The color of the font for error messages.

theme.variables.fontColorString

The color of the text in the theme.

theme.variables.fontFamilyString

Specifies the font-family for the theme.

theme.variables.footerDisplayBoolean

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

theme.variables.iconBackgroundColorString

The color of the form field icon background.

theme.variables.iconColorString

The color of the icons in the theme.

theme.variables.infoIconColorString

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

theme.variables.inputBackgroundColorString

The color of the form field background.

theme.variables.inputIconColorString

The color of the form field icon.

theme.variables.inputTextColorString

The color of the form field text.

theme.variables.linkTextColorString

The color of the text in hyperlinks.

theme.variables.linkTextFocusColorString

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

theme.variables.logoImageSizeString

The size of the logo image.

theme.variables.logoImageURLString

The url of the logo image.

theme.variables.monoFontColorString

The color of the monospaced text.

theme.variables.monoFontFamilyString

The font font-family.

theme.variables.pageBackgroundColorString

The color of the page background.

theme.variables.panelBackgroundColorString

The color of the panels in the theme.

theme.variables.primaryButtonColorString

The color of the primary button.

theme.variables.primaryButtonFocusColorString

The color of primary button when clicked.

theme.variables.primaryButtonTextColorString

The color of the text in the primary button.

theme.variables.primaryButtonTextFocusColorString

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

Example Simple Theme Response 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

API Key Authentication
Delete a Theme by Id
DELETE /api/theme/{themeId}

Request Parameters

themeIdUUIDrequired

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. The response will contain a JSON body.
400 The request was invalid and/or malformed. The response will contain an Errors 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.
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.