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

# Advanced Themes

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

# Advanced Themes

version

Available since version `1.8.0`

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

caution

Theme templates have access to sensitive configuration data including SSO cookies, tenant settings, JWT configuration, SMTP credentials, and user information. Only use themes from trusted sources and review all custom theme code before deployment.

The following APIs are provided to manage Themes.

## Create an Advanced Theme

This API is used to create a new Theme.

### Request

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

Create a new Theme with a randomly generated Id

POST/api/theme

OpenAPI Spec

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

Create a Theme with the provided unique Id

POST/api/theme/{themeId}

OpenAPI Spec

#### Request Parameters

`themeId`UUIDoptionalDefaults to secure random UUID

The Id to use for the new 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 `advanced`.

`theme.data`Objectoptional

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

`theme.defaultMessages`Stringoptional

A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file. Required if not copying an existing Theme.

`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`Stringrequired

A unique name for the Theme.

`theme.stylesheet`Stringoptional

A CSS stylesheet used to style the templates.

`theme.type`StringoptionalDefaults 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](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.templates.accountEdit`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/edit` path.

This page contains a form that enables authenticated users to update their profile.

`theme.templates.accountIndex`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account` path.

This is the self-service account landing page. An authenticated user may use this as a starting point for operations such as updating their profile or configuring multi-factor authentication.

`theme.templates.accountTwoFactorDisable`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/disable` path.

This page contains a form that accepts a verification code used to disable a multi-factor authentication method.

`theme.templates.accountTwoFactorEdit`StringoptionalAvailable since 1.68.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/edit` path.

This page contains a form that accepts a verification code used to edit a multi-factor authentication method.

`theme.templates.accountTwoFactorEnable`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/enable` path.

This page contains a form that accepts a verification code used to enable a multi-factor authentication method. Additionally, this page displays recovery codes when a user enables multi-factor authentication for the first time.

`theme.templates.accountTwoFactorIndex`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor` path.

This page displays an authenticated user's configured multi-factor authentication methods. Additionally, it provides links to enable and disable a method.

`theme.templates.accountWebAuthnAdd`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/add` path.

This page contains a form that allows a user to register a new WebAuthn passkey.

`theme.templates.accountWebAuthnDelete`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/delete` path.

This page contains a form that allows a user to delete a WebAuthn passkey.

`theme.templates.accountWebAuthnIndex`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/` path.

This page displays an authenticated user's registered WebAuthn passkeys. Additionally, it provides links to delete an existing passkey and register a new passkey.

`theme.templates.confirmationRequired`StringoptionalAvailable since 1.49.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/confirmation-required` path.

This page is displayed when a user attempts to complete an email based workflow that did not begin in the same browser. For example, if the user starts a forgot password workflow, and then opens the link in a separate browser the user will be shown this panel.

`theme.templates.emailComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/complete` path.

This page is used after a user has verified their email address by clicking the URL in the email. After FusionAuth has updated their user object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.emailSent`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/sent` path.

This page is used after a user has asked for the verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.emailVerificationRequired`StringoptionalAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verification-required` path.

This page is rendered when a user is required to verify their email address prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in email verification settings on the Tenant.

`theme.templates.emailVerify`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verify` path.

This page is rendered when a user clicks the URL from the verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.helpers`Stringoptional

A https://freemarker.apache.org\[FreeMarker\] template that contains all of the macros and templates used by the rest of the login Theme FreeMarker templates. This allows you to configure the general layout of your UI configuration and login theme without having to copy and paste HTML into each of the templates.

`theme.templates.index`StringoptionalAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/` path.

This is the root landing page. This page is available to unauthenticated users and will be displayed whenever someone navigates to the FusionAuth host's root page. Prior to version `1.27.0`, navigating to this URL would redirect to `/admin` and would subsequently render the FusionAuth admin login page.

`theme.templates.oauth2Authorize`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorize` path.

This is the main login page for FusionAuth and is used for all interactive OAuth2 and OpenID Connect workflows.

`theme.templates.oauth2AuthorizedNotRegistered`StringoptionalAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorized-not-registered` path.

This page is rendered when a user is not registered and the Application configuration requires registration before FusionAuth will complete the redirect.

`theme.templates.oauth2ChildRegistrationNotAllowed`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed` path.

This page contains a form where a child must provide their parent's email address to ask their parent to create an account for them in a Consent workflow.

`theme.templates.oauth2ChildRegistrationNotAllowedComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed-complete` path.

This page is rendered after a child provides their parent's email address for parental consent in a Consent workflow.

`theme.templates.oauth2CompleteRegistration`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/complete-registration` path.

This page contains a form that is used for users that have accounts but might be missing required fields.

`theme.templates.oauth2Consent`StringoptionalAvailable since 1.50.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/consent` path.

This page contains a form for capturing a user's OAuth scope consent choices. If there are no scopes that require a prompt, the user is redirected automatically.

`theme.templates.oauth2Device`StringoptionalAvailable since 1.11.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device` path.

This page contains a form for accepting an end user's short code for the interactive portion of the OAuth Device Authorization Grant workflow.

`theme.templates.oauth2DeviceComplete`StringoptionalAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device-complete` path.

This page contains a complete message indicating the device authentication has completed.

`theme.templates.oauth2Error`Stringoptional

This page is used if the user starts or is in the middle of the OAuth workflow and any type of error occurs. This could be caused by the user messing with the URL or internally some type of information wasn't passed between the OAuth endpoints correctly. For example, if you are federating login to an external IdP and that IdP does not properly echo the state parameter, FusionAuth's OAuth workflow will break and this page will be displayed.

`theme.templates.oauth2Logout`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/logout` path.

This page is used if the user initiates an OAuth logout. This page causes the user to be logged out of all associated applications or just the initiating application, as configured, via a front-channel mechanism before being redirected.

`theme.templates.oauth2Passwordless`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/passwordless` path.

This page is rendered when the user starts the passwordless login workflow. The page renders the form where the user types in their email address.

`theme.templates.oauth2Register`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/register` path.

This page is used to register or sign up the user for the application when self-service registration is enabled.

`theme.templates.oauth2StartIdPLink`StringoptionalAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/start-idp-link` path.

This page is used if the linking strategy of the Identity Provider is set to create a pending link. The user is presented with the option to link their account with an existing FusionAuth user account or create a new FusionAuth user.

`theme.templates.oauth2TwoFactor`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor` path.

This page is used if the user has two-factor authentication enabled or two factor authentication is required and they need to type in their code again. FusionAuth will properly handle the processing on the back end. This page contains the form that the user will put their code into.

`theme.templates.oauth2TwoFactorEnable`StringoptionalAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable` path.

This page contains a form providing a user with the Oauth2 two-factor enable form

`theme.templates.oauth2TwoFactorEnableComplete`StringoptionalAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable-complete` path.

This page contains a form providing a user with the Oauth2 two-factor enable complete form

`theme.templates.oauth2TwoFactorMethods`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-methods` path.

This page contains a form providing a user with their configured multi-factor authentication options that they may use to complete the authentication challenge.

`theme.templates.oauth2Wait`StringoptionalAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/wait` path.

This page is rendered when FusionAuth is waiting for an external provider to complete an out of band authentication request. For example, during a HYPR login this page will be displayed until the user completes authentication.

`theme.templates.oauth2WebAuthn`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn` path.

This page contains a form where a user can enter their `loginId` (username or email address) to authenticate with one of their registered WebAuthn passkeys. This page uses the WebAuthn bootstrap workflow.

`theme.templates.oauth2WebAuthnReauth`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth` path.

This page contains a form that lists the WebAuthn passkeys currently available for re-authentication. A user can select one of the listed passkeys to authenticate using the corresponding passkey and user account.

`theme.templates.oauth2WebAuthnReauthEnable`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth-enable` path.

This page contains two forms. One allows the user to select one of their existing WebAuthn passkeys to use for re-authentication. The other allows the user to register a new WebAuthn passkey for re-authentication.

`theme.templates.passwordChange`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/change` path.

This page is used if the user is required to change their password or if they have requested a password reset. This page contains the form that allows the user to provide a new password.

`theme.templates.passwordComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/complete` path.

This page is used after the user has successfully updated their password, or reset it. This page should instruct the user that their password was updated and that they need to login again.

`theme.templates.passwordForgot`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/forgot` path.

This page is used when a user starts the forgot password workflow. This page renders the form where the user types in their email address.

`theme.templates.passwordSent`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/sent` path.

This page is used when a user has submitted the forgot password form with their email. FusionAuth does not indicate back to the user if their email address was valid in order to prevent malicious activity that could reveal valid email addresses. Therefore, this page should indicate to the user that if their email was valid, they will receive an email shortly with a link to reset their password.

`theme.templates.phoneComplete`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/complete` path.

This page is used after a user has verified their phone number by clicking the URL in the message. After FusionAuth has updated their user object to indicate that their phone number was verified, the browser is redirected to this page.

`theme.templates.phoneSent`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/sent` path.

This page is used after a user has asked for the verification message to be resent. This can happen if the URL in the message expired and the user clicked it. In this case, the user can provide their phone number again and FusionAuth will resend the message. After the user submits their phone number and FusionAuth re-sends a verification message to them, the browser is redirected to this page.

`theme.templates.phoneVerificationRequired`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verification-required` path.

This page is rendered when a user is required to verify their phone number prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in identities/phone verification settings on the Tenant.

`theme.templates.phoneVerify`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verify` path.

This page is rendered when a user clicks the URL from the verification message and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification message that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.registrationComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/complete` path.

This page is used after a user has verified their email address for a specific application (i.e. a user registration) by clicking the URL in the email. After FusionAuth has updated their registration object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.registrationSent`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/sent` path.

This page is used after a user has asked for the application specific verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.registrationVerificationRequired`StringoptionalAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verification-required` path.

This page is rendered when a user is required to verify their registration prior to being allowed to proceed with the registration flow. This occurs when `Unverified behavior` is set to `Gated` in registration verification settings on the Application.

`theme.templates.registrationVerify`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verify` path.

This page is used when a user clicks the URL from the application specific verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.samlv2Logout`StringoptionalAvailable since 1.25.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/samlv2/logout` path.

This page is used if the user initiates a SAML logout. This page causes the user to be logged out of all associated applications via a front-channel mechanism before being redirected.

`theme.templates.unauthorized`StringoptionalAvailable since 1.30.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/unauthorized` path.

This page is used if the user is not authorized to use the application or page. If you have advanced threat detection enabled, this page is generally made available to you.

*Example Advanced Theme Request JSON*

```json
{
  "theme": {
    "data": {
      "addedBy": "richard"
    },
    "defaultMessages": "title=Login",
    "localizedMessages": {
      "fr": "title=Identifiant",
      "es": "title=Iniciar sesión"
    },
    "name": "Orange Theme",
    "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/]"
    }
  }
}
```

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

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

POST/api/theme

OpenAPI Spec

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

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

POST/api/theme/{themeId}

OpenAPI Spec

#### Request Parameters

`themeId`UUIDoptionalDefaults 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`UUIDrequired

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

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

`theme.name`Stringrequired

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.stylesheet`String

A CSS stylesheet used to style the templates.

`theme.templates.accountEdit`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/edit` path.

This page contains a form that enables authenticated users to update their profile.

`theme.templates.accountIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account` path.

This is the self-service account landing page. An authenticated user may use this as a starting point for operations such as updating their profile or configuring multi-factor authentication.

`theme.templates.accountTwoFactorDisable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/disable` path.

This page contains a form that accepts a verification code used to disable a multi-factor authentication method.

`theme.templates.accountTwoFactorEdit`StringAvailable since 1.68.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/edit` path.

This page contains a form that accepts a verification code used to edit a multi-factor authentication method.

`theme.templates.accountTwoFactorEnable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/enable` path.

This page contains a form that accepts a verification code used to enable a multi-factor authentication method. Additionally, this page displays recovery codes when a user enables multi-factor authentication for the first time.

`theme.templates.accountTwoFactorIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor` path.

This page displays an authenticated user's configured multi-factor authentication methods. Additionally, it provides links to enable and disable a method.

`theme.templates.accountWebAuthnAdd`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/add` path.

This page contains a form that allows a user to register a new WebAuthn passkey.

`theme.templates.accountWebAuthnDelete`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/delete` path.

This page contains a form that allows a user to delete a WebAuthn passkey.

`theme.templates.accountWebAuthnIndex`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/` path.

This page displays an authenticated user's registered WebAuthn passkeys. Additionally, it provides links to delete an existing passkey and register a new passkey.

`theme.templates.confirmationRequired`StringAvailable since 1.49.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/confirmation-required` path.

This page is displayed when a user attempts to complete an email based workflow that did not begin in the same browser. For example, if the user starts a forgot password workflow, and then opens the link in a separate browser the user will be shown this panel.

`theme.templates.emailComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/complete` path.

This page is used after a user has verified their email address by clicking the URL in the email. After FusionAuth has updated their user object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.emailSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/sent` path.

This page is used after a user has asked for the verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.emailVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verification-required` path.

This page is rendered when a user is required to verify their email address prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in email verification settings on the Tenant.

`theme.templates.emailVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verify` path.

This page is rendered when a user clicks the URL from the verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.helpers`String

A https://freemarker.apache.org\[FreeMarker\] template that contains all of the macros and templates used by the rest of the login Theme FreeMarker templates. This allows you to configure the general layout of your UI configuration and login theme without having to copy and paste HTML into each of the templates.

`theme.templates.index`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/` path.

This is the root landing page. This page is available to unauthenticated users and will be displayed whenever someone navigates to the FusionAuth host's root page. Prior to version `1.27.0`, navigating to this URL would redirect to `/admin` and would subsequently render the FusionAuth admin login page.

`theme.templates.oauth2Authorize`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorize` path.

This is the main login page for FusionAuth and is used for all interactive OAuth2 and OpenID Connect workflows.

`theme.templates.oauth2AuthorizedNotRegistered`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorized-not-registered` path.

This page is rendered when a user is not registered and the Application configuration requires registration before FusionAuth will complete the redirect.

`theme.templates.oauth2ChildRegistrationNotAllowed`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed` path.

This page contains a form where a child must provide their parent's email address to ask their parent to create an account for them in a Consent workflow.

`theme.templates.oauth2ChildRegistrationNotAllowedComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed-complete` path.

This page is rendered after a child provides their parent's email address for parental consent in a Consent workflow.

`theme.templates.oauth2CompleteRegistration`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/complete-registration` path.

This page contains a form that is used for users that have accounts but might be missing required fields.

`theme.templates.oauth2Consent`StringAvailable since 1.50.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/consent` path.

This page contains a form for capturing a user's OAuth scope consent choices. If there are no scopes that require a prompt, the user is redirected automatically.

`theme.templates.oauth2Device`StringAvailable since 1.11.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device` path.

This page contains a form for accepting an end user's short code for the interactive portion of the OAuth Device Authorization Grant workflow.

`theme.templates.oauth2DeviceComplete`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device-complete` path.

This page contains a complete message indicating the device authentication has completed.

`theme.templates.oauth2Error`String

This page is used if the user starts or is in the middle of the OAuth workflow and any type of error occurs. This could be caused by the user messing with the URL or internally some type of information wasn't passed between the OAuth endpoints correctly. For example, if you are federating login to an external IdP and that IdP does not properly echo the state parameter, FusionAuth's OAuth workflow will break and this page will be displayed.

`theme.templates.oauth2Logout`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/logout` path.

This page is used if the user initiates an OAuth logout. This page causes the user to be logged out of all associated applications or just the initiating application, as configured, via a front-channel mechanism before being redirected.

`theme.templates.oauth2Passwordless`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/passwordless` path.

This page is rendered when the user starts the passwordless login workflow. The page renders the form where the user types in their email address.

`theme.templates.oauth2Register`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/register` path.

This page is used to register or sign up the user for the application when self-service registration is enabled.

`theme.templates.oauth2StartIdPLink`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/start-idp-link` path.

This page is used if the linking strategy of the Identity Provider is set to create a pending link. The user is presented with the option to link their account with an existing FusionAuth user account or create a new FusionAuth user.

`theme.templates.oauth2TwoFactor`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor` path.

This page is used if the user has two-factor authentication enabled or two factor authentication is required and they need to type in their code again. FusionAuth will properly handle the processing on the back end. This page contains the form that the user will put their code into.

`theme.templates.oauth2TwoFactorEnable`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable` path.

This page contains a form providing a user with the Oauth2 two-factor enable form

`theme.templates.oauth2TwoFactorEnableComplete`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable-complete` path.

This page contains a form providing a user with the Oauth2 two-factor enable complete form

`theme.templates.oauth2TwoFactorMethods`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-methods` path.

This page contains a form providing a user with their configured multi-factor authentication options that they may use to complete the authentication challenge.

`theme.templates.oauth2Wait`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/wait` path.

This page is rendered when FusionAuth is waiting for an external provider to complete an out of band authentication request. For example, during a HYPR login this page will be displayed until the user completes authentication.

`theme.templates.oauth2WebAuthn`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn` path.

This page contains a form where a user can enter their `loginId` (username or email address) to authenticate with one of their registered WebAuthn passkeys. This page uses the WebAuthn bootstrap workflow.

`theme.templates.oauth2WebAuthnReauth`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth` path.

This page contains a form that lists the WebAuthn passkeys currently available for re-authentication. A user can select one of the listed passkeys to authenticate using the corresponding passkey and user account.

`theme.templates.oauth2WebAuthnReauthEnable`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth-enable` path.

This page contains two forms. One allows the user to select one of their existing WebAuthn passkeys to use for re-authentication. The other allows the user to register a new WebAuthn passkey for re-authentication.

`theme.templates.passwordChange`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/change` path.

This page is used if the user is required to change their password or if they have requested a password reset. This page contains the form that allows the user to provide a new password.

`theme.templates.passwordComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/complete` path.

This page is used after the user has successfully updated their password, or reset it. This page should instruct the user that their password was updated and that they need to login again.

`theme.templates.passwordForgot`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/forgot` path.

This page is used when a user starts the forgot password workflow. This page renders the form where the user types in their email address.

`theme.templates.passwordSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/sent` path.

This page is used when a user has submitted the forgot password form with their email. FusionAuth does not indicate back to the user if their email address was valid in order to prevent malicious activity that could reveal valid email addresses. Therefore, this page should indicate to the user that if their email was valid, they will receive an email shortly with a link to reset their password.

`theme.templates.phoneComplete`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/complete` path.

This page is used after a user has verified their phone number by clicking the URL in the message. After FusionAuth has updated their user object to indicate that their phone number was verified, the browser is redirected to this page.

`theme.templates.phoneSent`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/sent` path.

This page is used after a user has asked for the verification message to be resent. This can happen if the URL in the message expired and the user clicked it. In this case, the user can provide their phone number again and FusionAuth will resend the message. After the user submits their phone number and FusionAuth re-sends a verification message to them, the browser is redirected to this page.

`theme.templates.phoneVerificationRequired`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verification-required` path.

This page is rendered when a user is required to verify their phone number prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in identities/phone verification settings on the Tenant.

`theme.templates.phoneVerify`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verify` path.

This page is rendered when a user clicks the URL from the verification message and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification message that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.registrationComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/complete` path.

This page is used after a user has verified their email address for a specific application (i.e. a user registration) by clicking the URL in the email. After FusionAuth has updated their registration object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.registrationSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/sent` path.

This page is used after a user has asked for the application specific verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.registrationVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verification-required` path.

This page is rendered when a user is required to verify their registration prior to being allowed to proceed with the registration flow. This occurs when `Unverified behavior` is set to `Gated` in registration verification settings on the Application.

`theme.templates.registrationVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verify` path.

This page is used when a user clicks the URL from the application specific verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.samlv2Logout`StringAvailable since 1.25.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/samlv2/logout` path.

This page is used if the user initiates a SAML logout. This page causes the user to be logged out of all associated applications via a front-channel mechanism before being redirected.

`theme.templates.unauthorized`StringAvailable since 1.30.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/unauthorized` path.

This page is used if the user is not authorized to use the application or page. If you have advanced threat detection enabled, this page is generally made available to you.

*Example Advanced Theme Response JSON*

```json
{
  "theme": {
    "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"
  }
}
```

## Retrieve an Advanced 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}

OpenAPI Spec

#### Request Parameters

`themeId`UUIDrequired

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.stylesheet`String

A CSS stylesheet used to style the templates.

`theme.templates.accountEdit`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/edit` path.

This page contains a form that enables authenticated users to update their profile.

`theme.templates.accountIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account` path.

This is the self-service account landing page. An authenticated user may use this as a starting point for operations such as updating their profile or configuring multi-factor authentication.

`theme.templates.accountTwoFactorDisable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/disable` path.

This page contains a form that accepts a verification code used to disable a multi-factor authentication method.

`theme.templates.accountTwoFactorEdit`StringAvailable since 1.68.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/edit` path.

This page contains a form that accepts a verification code used to edit a multi-factor authentication method.

`theme.templates.accountTwoFactorEnable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/enable` path.

This page contains a form that accepts a verification code used to enable a multi-factor authentication method. Additionally, this page displays recovery codes when a user enables multi-factor authentication for the first time.

`theme.templates.accountTwoFactorIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor` path.

This page displays an authenticated user's configured multi-factor authentication methods. Additionally, it provides links to enable and disable a method.

`theme.templates.accountWebAuthnAdd`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/add` path.

This page contains a form that allows a user to register a new WebAuthn passkey.

`theme.templates.accountWebAuthnDelete`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/delete` path.

This page contains a form that allows a user to delete a WebAuthn passkey.

`theme.templates.accountWebAuthnIndex`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/` path.

This page displays an authenticated user's registered WebAuthn passkeys. Additionally, it provides links to delete an existing passkey and register a new passkey.

`theme.templates.confirmationRequired`StringAvailable since 1.49.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/confirmation-required` path.

This page is displayed when a user attempts to complete an email based workflow that did not begin in the same browser. For example, if the user starts a forgot password workflow, and then opens the link in a separate browser the user will be shown this panel.

`theme.templates.emailComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/complete` path.

This page is used after a user has verified their email address by clicking the URL in the email. After FusionAuth has updated their user object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.emailSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/sent` path.

This page is used after a user has asked for the verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.emailVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verification-required` path.

This page is rendered when a user is required to verify their email address prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in email verification settings on the Tenant.

`theme.templates.emailVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verify` path.

This page is rendered when a user clicks the URL from the verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.helpers`String

A https://freemarker.apache.org\[FreeMarker\] template that contains all of the macros and templates used by the rest of the login Theme FreeMarker templates. This allows you to configure the general layout of your UI configuration and login theme without having to copy and paste HTML into each of the templates.

`theme.templates.index`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/` path.

This is the root landing page. This page is available to unauthenticated users and will be displayed whenever someone navigates to the FusionAuth host's root page. Prior to version `1.27.0`, navigating to this URL would redirect to `/admin` and would subsequently render the FusionAuth admin login page.

`theme.templates.oauth2Authorize`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorize` path.

This is the main login page for FusionAuth and is used for all interactive OAuth2 and OpenID Connect workflows.

`theme.templates.oauth2AuthorizedNotRegistered`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorized-not-registered` path.

This page is rendered when a user is not registered and the Application configuration requires registration before FusionAuth will complete the redirect.

`theme.templates.oauth2ChildRegistrationNotAllowed`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed` path.

This page contains a form where a child must provide their parent's email address to ask their parent to create an account for them in a Consent workflow.

`theme.templates.oauth2ChildRegistrationNotAllowedComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed-complete` path.

This page is rendered after a child provides their parent's email address for parental consent in a Consent workflow.

`theme.templates.oauth2CompleteRegistration`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/complete-registration` path.

This page contains a form that is used for users that have accounts but might be missing required fields.

`theme.templates.oauth2Consent`StringAvailable since 1.50.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/consent` path.

This page contains a form for capturing a user's OAuth scope consent choices. If there are no scopes that require a prompt, the user is redirected automatically.

`theme.templates.oauth2Device`StringAvailable since 1.11.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device` path.

This page contains a form for accepting an end user's short code for the interactive portion of the OAuth Device Authorization Grant workflow.

`theme.templates.oauth2DeviceComplete`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device-complete` path.

This page contains a complete message indicating the device authentication has completed.

`theme.templates.oauth2Error`String

This page is used if the user starts or is in the middle of the OAuth workflow and any type of error occurs. This could be caused by the user messing with the URL or internally some type of information wasn't passed between the OAuth endpoints correctly. For example, if you are federating login to an external IdP and that IdP does not properly echo the state parameter, FusionAuth's OAuth workflow will break and this page will be displayed.

`theme.templates.oauth2Logout`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/logout` path.

This page is used if the user initiates an OAuth logout. This page causes the user to be logged out of all associated applications or just the initiating application, as configured, via a front-channel mechanism before being redirected.

`theme.templates.oauth2Passwordless`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/passwordless` path.

This page is rendered when the user starts the passwordless login workflow. The page renders the form where the user types in their email address.

`theme.templates.oauth2Register`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/register` path.

This page is used to register or sign up the user for the application when self-service registration is enabled.

`theme.templates.oauth2StartIdPLink`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/start-idp-link` path.

This page is used if the linking strategy of the Identity Provider is set to create a pending link. The user is presented with the option to link their account with an existing FusionAuth user account or create a new FusionAuth user.

`theme.templates.oauth2TwoFactor`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor` path.

This page is used if the user has two-factor authentication enabled or two factor authentication is required and they need to type in their code again. FusionAuth will properly handle the processing on the back end. This page contains the form that the user will put their code into.

`theme.templates.oauth2TwoFactorEnable`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable` path.

This page contains a form providing a user with the Oauth2 two-factor enable form

`theme.templates.oauth2TwoFactorEnableComplete`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable-complete` path.

This page contains a form providing a user with the Oauth2 two-factor enable complete form

`theme.templates.oauth2TwoFactorMethods`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-methods` path.

This page contains a form providing a user with their configured multi-factor authentication options that they may use to complete the authentication challenge.

`theme.templates.oauth2Wait`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/wait` path.

This page is rendered when FusionAuth is waiting for an external provider to complete an out of band authentication request. For example, during a HYPR login this page will be displayed until the user completes authentication.

`theme.templates.oauth2WebAuthn`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn` path.

This page contains a form where a user can enter their `loginId` (username or email address) to authenticate with one of their registered WebAuthn passkeys. This page uses the WebAuthn bootstrap workflow.

`theme.templates.oauth2WebAuthnReauth`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth` path.

This page contains a form that lists the WebAuthn passkeys currently available for re-authentication. A user can select one of the listed passkeys to authenticate using the corresponding passkey and user account.

`theme.templates.oauth2WebAuthnReauthEnable`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth-enable` path.

This page contains two forms. One allows the user to select one of their existing WebAuthn passkeys to use for re-authentication. The other allows the user to register a new WebAuthn passkey for re-authentication.

`theme.templates.passwordChange`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/change` path.

This page is used if the user is required to change their password or if they have requested a password reset. This page contains the form that allows the user to provide a new password.

`theme.templates.passwordComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/complete` path.

This page is used after the user has successfully updated their password, or reset it. This page should instruct the user that their password was updated and that they need to login again.

`theme.templates.passwordForgot`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/forgot` path.

This page is used when a user starts the forgot password workflow. This page renders the form where the user types in their email address.

`theme.templates.passwordSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/sent` path.

This page is used when a user has submitted the forgot password form with their email. FusionAuth does not indicate back to the user if their email address was valid in order to prevent malicious activity that could reveal valid email addresses. Therefore, this page should indicate to the user that if their email was valid, they will receive an email shortly with a link to reset their password.

`theme.templates.phoneComplete`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/complete` path.

This page is used after a user has verified their phone number by clicking the URL in the message. After FusionAuth has updated their user object to indicate that their phone number was verified, the browser is redirected to this page.

`theme.templates.phoneSent`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/sent` path.

This page is used after a user has asked for the verification message to be resent. This can happen if the URL in the message expired and the user clicked it. In this case, the user can provide their phone number again and FusionAuth will resend the message. After the user submits their phone number and FusionAuth re-sends a verification message to them, the browser is redirected to this page.

`theme.templates.phoneVerificationRequired`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verification-required` path.

This page is rendered when a user is required to verify their phone number prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in identities/phone verification settings on the Tenant.

`theme.templates.phoneVerify`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verify` path.

This page is rendered when a user clicks the URL from the verification message and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification message that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.registrationComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/complete` path.

This page is used after a user has verified their email address for a specific application (i.e. a user registration) by clicking the URL in the email. After FusionAuth has updated their registration object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.registrationSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/sent` path.

This page is used after a user has asked for the application specific verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.registrationVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verification-required` path.

This page is rendered when a user is required to verify their registration prior to being allowed to proceed with the registration flow. This occurs when `Unverified behavior` is set to `Gated` in registration verification settings on the Application.

`theme.templates.registrationVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verify` path.

This page is used when a user clicks the URL from the application specific verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.samlv2Logout`StringAvailable since 1.25.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/samlv2/logout` path.

This page is used if the user initiates a SAML logout. This page causes the user to be logged out of all associated applications via a front-channel mechanism before being redirected.

`theme.templates.unauthorized`StringAvailable since 1.30.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/unauthorized` path.

This page is used if the user is not authorized to use the application or page. If you have advanced threat detection enabled, this page is generally made available to you.

*Example Advanced Theme Response JSON*

```json
{
  "theme": {
    "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"
  }
}
```

caution

Responses from the theme API can contain [Simple Themes](https://fusionauth.io/docs/apis/themes/simple-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].stylesheet`Stringoptional

A CSS stylesheet used to style the templates.

`themes[x].templates.accountEdit`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/edit` path.

This page contains a form that enables authenticated users to update their profile.

`themes[x].templates.accountIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account` path.

This is the self-service account landing page. An authenticated user may use this as a starting point for operations such as updating their profile or configuring multi-factor authentication.

`themes[x].templates.accountTwoFactorDisable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/disable` path.

This page contains a form that accepts a verification code used to disable a multi-factor authentication method.

`themes[x].templates.accountTwoFactorEdit`StringAvailable since 1.68.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/edit` path.

This page contains a form that accepts a verification code used to edit a multi-factor authentication method.

`themes[x].templates.accountTwoFactorEnable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/enable` path.

This page contains a form that accepts a verification code used to enable a multi-factor authentication method. Additionally, this page displays recovery codes when a user enables multi-factor authentication for the first time.

`themes[x].templates.accountTwoFactorIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor` path.

This page displays an authenticated user's configured multi-factor authentication methods. Additionally, it provides links to enable and disable a method.

`themes[x].templates.accountWebAuthnAdd`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/add` path.

This page contains a form that allows a user to register a new WebAuthn passkey.

`themes[x].templates.accountWebAuthnDelete`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/delete` path.

This page contains a form that allows a user to delete a WebAuthn passkey.

`themes[x].templates.accountWebAuthnIndex`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/` path.

This page displays an authenticated user's registered WebAuthn passkeys. Additionally, it provides links to delete an existing passkey and register a new passkey.

`themes[x].templates.confirmationRequired`StringAvailable since 1.49.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/confirmation-required` path.

This page is displayed when a user attempts to complete an email based workflow that did not begin in the same browser. For example, if the user starts a forgot password workflow, and then opens the link in a separate browser the user will be shown this panel.

`themes[x].templates.emailComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/complete` path.

This page is used after a user has verified their email address by clicking the URL in the email. After FusionAuth has updated their user object to indicate that their email was verified, the browser is redirected to this page.

`themes[x].templates.emailSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/sent` path.

This page is used after a user has asked for the verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`themes[x].templates.emailVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verification-required` path.

This page is rendered when a user is required to verify their email address prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in email verification settings on the Tenant.

`themes[x].templates.emailVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verify` path.

This page is rendered when a user clicks the URL from the verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`themes[x].templates.helpers`String

A https://freemarker.apache.org\[FreeMarker\] template that contains all of the macros and templates used by the rest of the login Theme FreeMarker templates. This allows you to configure the general layout of your UI configuration and login theme without having to copy and paste HTML into each of the templates.

`themes[x].templates.index`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/` path.

This is the root landing page. This page is available to unauthenticated users and will be displayed whenever someone navigates to the FusionAuth host's root page. Prior to version `1.27.0`, navigating to this URL would redirect to `/admin` and would subsequently render the FusionAuth admin login page.

`themes[x].templates.oauth2Authorize`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorize` path.

This is the main login page for FusionAuth and is used for all interactive OAuth2 and OpenID Connect workflows.

`themes[x].templates.oauth2AuthorizedNotRegistered`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorized-not-registered` path.

This page is rendered when a user is not registered and the Application configuration requires registration before FusionAuth will complete the redirect.

`themes[x].templates.oauth2ChildRegistrationNotAllowed`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed` path.

This page contains a form where a child must provide their parent's email address to ask their parent to create an account for them in a Consent workflow.

`themes[x].templates.oauth2ChildRegistrationNotAllowedComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed-complete` path.

This page is rendered after a child provides their parent's email address for parental consent in a Consent workflow.

`themes[x].templates.oauth2CompleteRegistration`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/complete-registration` path.

This page contains a form that is used for users that have accounts but might be missing required fields.

`themes[x].templates.oauth2Consent`StringAvailable since 1.50.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/consent` path.

This page contains a form for capturing a user's OAuth scope consent choices. If there are no scopes that require a prompt, the user is redirected automatically.

`themes[x].templates.oauth2Device`StringAvailable since 1.11.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device` path.

This page contains a form for accepting an end user's short code for the interactive portion of the OAuth Device Authorization Grant workflow.

`themes[x].templates.oauth2DeviceComplete`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device-complete` path.

This page contains a complete message indicating the device authentication has completed.

`themes[x].templates.oauth2Error`String

This page is used if the user starts or is in the middle of the OAuth workflow and any type of error occurs. This could be caused by the user messing with the URL or internally some type of information wasn't passed between the OAuth endpoints correctly. For example, if you are federating login to an external IdP and that IdP does not properly echo the state parameter, FusionAuth's OAuth workflow will break and this page will be displayed.

`themes[x].templates.oauth2Logout`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/logout` path.

This page is used if the user initiates an OAuth logout. This page causes the user to be logged out of all associated applications or just the initiating application, as configured, via a front-channel mechanism before being redirected.

`themes[x].templates.oauth2Passwordless`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/passwordless` path.

This page is rendered when the user starts the passwordless login workflow. The page renders the form where the user types in their email address.

`themes[x].templates.oauth2Register`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/register` path.

This page is used to register or sign up the user for the application when self-service registration is enabled.

`themes[x].templates.oauth2StartIdPLink`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/start-idp-link` path.

This page is used if the linking strategy of the Identity Provider is set to create a pending link. The user is presented with the option to link their account with an existing FusionAuth user account or create a new FusionAuth user.

`themes[x].templates.oauth2TwoFactor`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor` path.

This page is used if the user has two-factor authentication enabled or two factor authentication is required and they need to type in their code again. FusionAuth will properly handle the processing on the back end. This page contains the form that the user will put their code into.

`themes[x].templates.oauth2TwoFactorEnable`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable` path.

This page contains a form providing a user with the Oauth2 two-factor enable form

`themes[x].templates.oauth2TwoFactorEnableComplete`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable-complete` path.

This page contains a form providing a user with the Oauth2 two-factor enable complete form

`themes[x].templates.oauth2TwoFactorMethods`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-methods` path.

This page contains a form providing a user with their configured multi-factor authentication options that they may use to complete the authentication challenge.

`themes[x].templates.oauth2Wait`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/wait` path.

This page is rendered when FusionAuth is waiting for an external provider to complete an out of band authentication request. For example, during a HYPR login this page will be displayed until the user completes authentication.

`themes[x].templates.oauth2WebAuthn`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn` path.

This page contains a form where a user can enter their `loginId` (username or email address) to authenticate with one of their registered WebAuthn passkeys. This page uses the WebAuthn bootstrap workflow.

`themes[x].templates.oauth2WebAuthnReauth`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth` path.

This page contains a form that lists the WebAuthn passkeys currently available for re-authentication. A user can select one of the listed passkeys to authenticate using the corresponding passkey and user account.

`themes[x].templates.oauth2WebAuthnReauthEnable`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth-enable` path.

This page contains two forms. One allows the user to select one of their existing WebAuthn passkeys to use for re-authentication. The other allows the user to register a new WebAuthn passkey for re-authentication.

`themes[x].templates.passwordChange`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/change` path.

This page is used if the user is required to change their password or if they have requested a password reset. This page contains the form that allows the user to provide a new password.

`themes[x].templates.passwordComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/complete` path.

This page is used after the user has successfully updated their password, or reset it. This page should instruct the user that their password was updated and that they need to login again.

`themes[x].templates.passwordForgot`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/forgot` path.

This page is used when a user starts the forgot password workflow. This page renders the form where the user types in their email address.

`themes[x].templates.passwordSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/sent` path.

This page is used when a user has submitted the forgot password form with their email. FusionAuth does not indicate back to the user if their email address was valid in order to prevent malicious activity that could reveal valid email addresses. Therefore, this page should indicate to the user that if their email was valid, they will receive an email shortly with a link to reset their password.

`themes[x].templates.phoneComplete`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/complete` path.

This page is used after a user has verified their phone number by clicking the URL in the message. After FusionAuth has updated their user object to indicate that their phone number was verified, the browser is redirected to this page.

`themes[x].templates.phoneSent`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/sent` path.

This page is used after a user has asked for the verification message to be resent. This can happen if the URL in the message expired and the user clicked it. In this case, the user can provide their phone number again and FusionAuth will resend the message. After the user submits their phone number and FusionAuth re-sends a verification message to them, the browser is redirected to this page.

`themes[x].templates.phoneVerificationRequired`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verification-required` path.

This page is rendered when a user is required to verify their phone number prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in identities/phone verification settings on the Tenant.

`themes[x].templates.phoneVerify`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verify` path.

This page is rendered when a user clicks the URL from the verification message and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification message that has expired, this page will be rendered and the error will be displayed to the user.

`themes[x].templates.registrationComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/complete` path.

This page is used after a user has verified their email address for a specific application (i.e. a user registration) by clicking the URL in the email. After FusionAuth has updated their registration object to indicate that their email was verified, the browser is redirected to this page.

`themes[x].templates.registrationSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/sent` path.

This page is used after a user has asked for the application specific verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`themes[x].templates.registrationVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verification-required` path.

This page is rendered when a user is required to verify their registration prior to being allowed to proceed with the registration flow. This occurs when `Unverified behavior` is set to `Gated` in registration verification settings on the Application.

`themes[x].templates.registrationVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verify` path.

This page is used when a user clicks the URL from the application specific verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`themes[x].templates.samlv2Logout`StringAvailable since 1.25.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/samlv2/logout` path.

This page is used if the user initiates a SAML logout. This page causes the user to be logged out of all associated applications via a front-channel mechanism before being redirected.

`themes[x].templates.unauthorized`StringAvailable since 1.30.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/unauthorized` path.

This page is used if the user is not authorized to use the application or page. If you have advanced threat detection enabled, this page is generally made available to you.

*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

version

This API has been available since 1.45.0

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}

#### Request Parameters

`name`Stringoptional

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`IntegeroptionalDefaults to 25

The number of results to return from the search.

`orderBy`StringoptionalDefaults 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`IntegeroptionalDefaults 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

OpenAPI Spec

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

#### Request Body

`search.name`Stringoptional

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`IntegeroptionalDefaults to 25

The number of results to return from the search.

`search.orderBy`StringoptionalDefaults 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`IntegeroptionalDefaults 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 [Simple Themes](https://fusionauth.io/docs/apis/themes/simple-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].stylesheet`Stringoptional

A CSS stylesheet used to style the templates.

`themes[x].templates.accountEdit`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/edit` path.

This page contains a form that enables authenticated users to update their profile.

`themes[x].templates.accountIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account` path.

This is the self-service account landing page. An authenticated user may use this as a starting point for operations such as updating their profile or configuring multi-factor authentication.

`themes[x].templates.accountTwoFactorDisable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/disable` path.

This page contains a form that accepts a verification code used to disable a multi-factor authentication method.

`themes[x].templates.accountTwoFactorEdit`StringAvailable since 1.68.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/edit` path.

This page contains a form that accepts a verification code used to edit a multi-factor authentication method.

`themes[x].templates.accountTwoFactorEnable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/enable` path.

This page contains a form that accepts a verification code used to enable a multi-factor authentication method. Additionally, this page displays recovery codes when a user enables multi-factor authentication for the first time.

`themes[x].templates.accountTwoFactorIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor` path.

This page displays an authenticated user's configured multi-factor authentication methods. Additionally, it provides links to enable and disable a method.

`themes[x].templates.accountWebAuthnAdd`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/add` path.

This page contains a form that allows a user to register a new WebAuthn passkey.

`themes[x].templates.accountWebAuthnDelete`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/delete` path.

This page contains a form that allows a user to delete a WebAuthn passkey.

`themes[x].templates.accountWebAuthnIndex`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/` path.

This page displays an authenticated user's registered WebAuthn passkeys. Additionally, it provides links to delete an existing passkey and register a new passkey.

`themes[x].templates.confirmationRequired`StringAvailable since 1.49.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/confirmation-required` path.

This page is displayed when a user attempts to complete an email based workflow that did not begin in the same browser. For example, if the user starts a forgot password workflow, and then opens the link in a separate browser the user will be shown this panel.

`themes[x].templates.emailComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/complete` path.

This page is used after a user has verified their email address by clicking the URL in the email. After FusionAuth has updated their user object to indicate that their email was verified, the browser is redirected to this page.

`themes[x].templates.emailSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/sent` path.

This page is used after a user has asked for the verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`themes[x].templates.emailVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verification-required` path.

This page is rendered when a user is required to verify their email address prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in email verification settings on the Tenant.

`themes[x].templates.emailVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verify` path.

This page is rendered when a user clicks the URL from the verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`themes[x].templates.helpers`String

A https://freemarker.apache.org\[FreeMarker\] template that contains all of the macros and templates used by the rest of the login Theme FreeMarker templates. This allows you to configure the general layout of your UI configuration and login theme without having to copy and paste HTML into each of the templates.

`themes[x].templates.index`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/` path.

This is the root landing page. This page is available to unauthenticated users and will be displayed whenever someone navigates to the FusionAuth host's root page. Prior to version `1.27.0`, navigating to this URL would redirect to `/admin` and would subsequently render the FusionAuth admin login page.

`themes[x].templates.oauth2Authorize`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorize` path.

This is the main login page for FusionAuth and is used for all interactive OAuth2 and OpenID Connect workflows.

`themes[x].templates.oauth2AuthorizedNotRegistered`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorized-not-registered` path.

This page is rendered when a user is not registered and the Application configuration requires registration before FusionAuth will complete the redirect.

`themes[x].templates.oauth2ChildRegistrationNotAllowed`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed` path.

This page contains a form where a child must provide their parent's email address to ask their parent to create an account for them in a Consent workflow.

`themes[x].templates.oauth2ChildRegistrationNotAllowedComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed-complete` path.

This page is rendered after a child provides their parent's email address for parental consent in a Consent workflow.

`themes[x].templates.oauth2CompleteRegistration`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/complete-registration` path.

This page contains a form that is used for users that have accounts but might be missing required fields.

`themes[x].templates.oauth2Consent`StringAvailable since 1.50.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/consent` path.

This page contains a form for capturing a user's OAuth scope consent choices. If there are no scopes that require a prompt, the user is redirected automatically.

`themes[x].templates.oauth2Device`StringAvailable since 1.11.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device` path.

This page contains a form for accepting an end user's short code for the interactive portion of the OAuth Device Authorization Grant workflow.

`themes[x].templates.oauth2DeviceComplete`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device-complete` path.

This page contains a complete message indicating the device authentication has completed.

`themes[x].templates.oauth2Error`String

This page is used if the user starts or is in the middle of the OAuth workflow and any type of error occurs. This could be caused by the user messing with the URL or internally some type of information wasn't passed between the OAuth endpoints correctly. For example, if you are federating login to an external IdP and that IdP does not properly echo the state parameter, FusionAuth's OAuth workflow will break and this page will be displayed.

`themes[x].templates.oauth2Logout`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/logout` path.

This page is used if the user initiates an OAuth logout. This page causes the user to be logged out of all associated applications or just the initiating application, as configured, via a front-channel mechanism before being redirected.

`themes[x].templates.oauth2Passwordless`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/passwordless` path.

This page is rendered when the user starts the passwordless login workflow. The page renders the form where the user types in their email address.

`themes[x].templates.oauth2Register`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/register` path.

This page is used to register or sign up the user for the application when self-service registration is enabled.

`themes[x].templates.oauth2StartIdPLink`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/start-idp-link` path.

This page is used if the linking strategy of the Identity Provider is set to create a pending link. The user is presented with the option to link their account with an existing FusionAuth user account or create a new FusionAuth user.

`themes[x].templates.oauth2TwoFactor`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor` path.

This page is used if the user has two-factor authentication enabled or two factor authentication is required and they need to type in their code again. FusionAuth will properly handle the processing on the back end. This page contains the form that the user will put their code into.

`themes[x].templates.oauth2TwoFactorEnable`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable` path.

This page contains a form providing a user with the Oauth2 two-factor enable form

`themes[x].templates.oauth2TwoFactorEnableComplete`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable-complete` path.

This page contains a form providing a user with the Oauth2 two-factor enable complete form

`themes[x].templates.oauth2TwoFactorMethods`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-methods` path.

This page contains a form providing a user with their configured multi-factor authentication options that they may use to complete the authentication challenge.

`themes[x].templates.oauth2Wait`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/wait` path.

This page is rendered when FusionAuth is waiting for an external provider to complete an out of band authentication request. For example, during a HYPR login this page will be displayed until the user completes authentication.

`themes[x].templates.oauth2WebAuthn`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn` path.

This page contains a form where a user can enter their `loginId` (username or email address) to authenticate with one of their registered WebAuthn passkeys. This page uses the WebAuthn bootstrap workflow.

`themes[x].templates.oauth2WebAuthnReauth`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth` path.

This page contains a form that lists the WebAuthn passkeys currently available for re-authentication. A user can select one of the listed passkeys to authenticate using the corresponding passkey and user account.

`themes[x].templates.oauth2WebAuthnReauthEnable`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth-enable` path.

This page contains two forms. One allows the user to select one of their existing WebAuthn passkeys to use for re-authentication. The other allows the user to register a new WebAuthn passkey for re-authentication.

`themes[x].templates.passwordChange`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/change` path.

This page is used if the user is required to change their password or if they have requested a password reset. This page contains the form that allows the user to provide a new password.

`themes[x].templates.passwordComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/complete` path.

This page is used after the user has successfully updated their password, or reset it. This page should instruct the user that their password was updated and that they need to login again.

`themes[x].templates.passwordForgot`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/forgot` path.

This page is used when a user starts the forgot password workflow. This page renders the form where the user types in their email address.

`themes[x].templates.passwordSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/sent` path.

This page is used when a user has submitted the forgot password form with their email. FusionAuth does not indicate back to the user if their email address was valid in order to prevent malicious activity that could reveal valid email addresses. Therefore, this page should indicate to the user that if their email was valid, they will receive an email shortly with a link to reset their password.

`themes[x].templates.phoneComplete`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/complete` path.

This page is used after a user has verified their phone number by clicking the URL in the message. After FusionAuth has updated their user object to indicate that their phone number was verified, the browser is redirected to this page.

`themes[x].templates.phoneSent`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/sent` path.

This page is used after a user has asked for the verification message to be resent. This can happen if the URL in the message expired and the user clicked it. In this case, the user can provide their phone number again and FusionAuth will resend the message. After the user submits their phone number and FusionAuth re-sends a verification message to them, the browser is redirected to this page.

`themes[x].templates.phoneVerificationRequired`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verification-required` path.

This page is rendered when a user is required to verify their phone number prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in identities/phone verification settings on the Tenant.

`themes[x].templates.phoneVerify`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verify` path.

This page is rendered when a user clicks the URL from the verification message and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification message that has expired, this page will be rendered and the error will be displayed to the user.

`themes[x].templates.registrationComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/complete` path.

This page is used after a user has verified their email address for a specific application (i.e. a user registration) by clicking the URL in the email. After FusionAuth has updated their registration object to indicate that their email was verified, the browser is redirected to this page.

`themes[x].templates.registrationSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/sent` path.

This page is used after a user has asked for the application specific verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`themes[x].templates.registrationVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verification-required` path.

This page is rendered when a user is required to verify their registration prior to being allowed to proceed with the registration flow. This occurs when `Unverified behavior` is set to `Gated` in registration verification settings on the Application.

`themes[x].templates.registrationVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verify` path.

This page is used when a user clicks the URL from the application specific verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`themes[x].templates.samlv2Logout`StringAvailable since 1.25.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/samlv2/logout` path.

This page is used if the user initiates a SAML logout. This page causes the user to be logged out of all associated applications via a front-channel mechanism before being redirected.

`themes[x].templates.unauthorized`StringAvailable since 1.30.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/unauthorized` path.

This page is used if the user is not authorized to use the application or page. If you have advanced threat detection enabled, this page is generally made available to you.

`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 an Advanced 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}

OpenAPI Spec

PATCH/api/theme/{themeId}

OpenAPI Spec

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`UUIDrequired

The unique Id of the Theme to update.

#### Request Body

`theme.data`Objectoptional

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

`theme.defaultMessages`Stringrequired

A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file. Required if not copying an existing Theme.

`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`Stringrequired

A unique name for the Theme.

`theme.stylesheet`Stringoptional

A CSS stylesheet used to style the templates.

`theme.templates.accountEdit`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/edit` path.

This page contains a form that enables authenticated users to update their profile.

`theme.templates.accountIndex`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account` path.

This is the self-service account landing page. An authenticated user may use this as a starting point for operations such as updating their profile or configuring multi-factor authentication.

`theme.templates.accountTwoFactorDisable`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/disable` path.

This page contains a form that accepts a verification code used to disable a multi-factor authentication method.

`theme.templates.accountTwoFactorEdit`StringoptionalAvailable since 1.68.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/edit` path.

This page contains a form that accepts a verification code used to edit a multi-factor authentication method.

`theme.templates.accountTwoFactorEnable`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/enable` path.

This page contains a form that accepts a verification code used to enable a multi-factor authentication method. Additionally, this page displays recovery codes when a user enables multi-factor authentication for the first time.

`theme.templates.accountTwoFactorIndex`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor` path.

This page displays an authenticated user's configured multi-factor authentication methods. Additionally, it provides links to enable and disable a method.

`theme.templates.accountWebAuthnAdd`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/add` path.

This page contains a form that allows a user to register a new WebAuthn passkey.

`theme.templates.accountWebAuthnDelete`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/delete` path.

This page contains a form that allows a user to delete a WebAuthn passkey.

`theme.templates.accountWebAuthnIndex`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/` path.

This page displays an authenticated user's registered WebAuthn passkeys. Additionally, it provides links to delete an existing passkey and register a new passkey.

`theme.templates.confirmationRequired`StringoptionalAvailable since 1.49.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/confirmation-required` path.

This page is displayed when a user attempts to complete an email based workflow that did not begin in the same browser. For example, if the user starts a forgot password workflow, and then opens the link in a separate browser the user will be shown this panel.

`theme.templates.emailComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/complete` path.

This page is used after a user has verified their email address by clicking the URL in the email. After FusionAuth has updated their user object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.emailSent`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/sent` path.

This page is used after a user has asked for the verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.emailVerificationRequired`StringoptionalAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verification-required` path.

This page is rendered when a user is required to verify their email address prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in email verification settings on the Tenant.

`theme.templates.emailVerify`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verify` path.

This page is rendered when a user clicks the URL from the verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.helpers`Stringoptional

A https://freemarker.apache.org\[FreeMarker\] template that contains all of the macros and templates used by the rest of the login Theme FreeMarker templates. This allows you to configure the general layout of your UI configuration and login theme without having to copy and paste HTML into each of the templates.

`theme.templates.index`StringoptionalAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/` path.

This is the root landing page. This page is available to unauthenticated users and will be displayed whenever someone navigates to the FusionAuth host's root page. Prior to version `1.27.0`, navigating to this URL would redirect to `/admin` and would subsequently render the FusionAuth admin login page.

`theme.templates.oauth2Authorize`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorize` path.

This is the main login page for FusionAuth and is used for all interactive OAuth2 and OpenID Connect workflows.

`theme.templates.oauth2AuthorizedNotRegistered`StringoptionalAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorized-not-registered` path.

This page is rendered when a user is not registered and the Application configuration requires registration before FusionAuth will complete the redirect.

`theme.templates.oauth2ChildRegistrationNotAllowed`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed` path.

This page contains a form where a child must provide their parent's email address to ask their parent to create an account for them in a Consent workflow.

`theme.templates.oauth2ChildRegistrationNotAllowedComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed-complete` path.

This page is rendered after a child provides their parent's email address for parental consent in a Consent workflow.

`theme.templates.oauth2CompleteRegistration`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/complete-registration` path.

This page contains a form that is used for users that have accounts but might be missing required fields.

`theme.templates.oauth2Consent`StringoptionalAvailable since 1.50.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/consent` path.

This page contains a form for capturing a user's OAuth scope consent choices. If there are no scopes that require a prompt, the user is redirected automatically.

`theme.templates.oauth2Device`StringoptionalAvailable since 1.11.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device` path.

This page contains a form for accepting an end user's short code for the interactive portion of the OAuth Device Authorization Grant workflow.

`theme.templates.oauth2DeviceComplete`StringoptionalAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device-complete` path.

This page contains a complete message indicating the device authentication has completed.

`theme.templates.oauth2Error`Stringoptional

This page is used if the user starts or is in the middle of the OAuth workflow and any type of error occurs. This could be caused by the user messing with the URL or internally some type of information wasn't passed between the OAuth endpoints correctly. For example, if you are federating login to an external IdP and that IdP does not properly echo the state parameter, FusionAuth's OAuth workflow will break and this page will be displayed.

`theme.templates.oauth2Logout`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/logout` path.

This page is used if the user initiates an OAuth logout. This page causes the user to be logged out of all associated applications or just the initiating application, as configured, via a front-channel mechanism before being redirected.

`theme.templates.oauth2Passwordless`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/passwordless` path.

This page is rendered when the user starts the passwordless login workflow. The page renders the form where the user types in their email address.

`theme.templates.oauth2Register`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/register` path.

This page is used to register or sign up the user for the application when self-service registration is enabled.

`theme.templates.oauth2StartIdPLink`StringoptionalAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/start-idp-link` path.

This page is used if the linking strategy of the Identity Provider is set to create a pending link. The user is presented with the option to link their account with an existing FusionAuth user account or create a new FusionAuth user.

`theme.templates.oauth2TwoFactor`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor` path.

This page is used if the user has two-factor authentication enabled or two factor authentication is required and they need to type in their code again. FusionAuth will properly handle the processing on the back end. This page contains the form that the user will put their code into.

`theme.templates.oauth2TwoFactorEnable`StringoptionalAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable` path.

This page contains a form providing a user with the Oauth2 two-factor enable form

`theme.templates.oauth2TwoFactorEnableComplete`StringoptionalAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable-complete` path.

This page contains a form providing a user with the Oauth2 two-factor enable complete form

`theme.templates.oauth2TwoFactorMethods`StringoptionalAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-methods` path.

This page contains a form providing a user with their configured multi-factor authentication options that they may use to complete the authentication challenge.

`theme.templates.oauth2Wait`StringoptionalAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/wait` path.

This page is rendered when FusionAuth is waiting for an external provider to complete an out of band authentication request. For example, during a HYPR login this page will be displayed until the user completes authentication.

`theme.templates.oauth2WebAuthn`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn` path.

This page contains a form where a user can enter their `loginId` (username or email address) to authenticate with one of their registered WebAuthn passkeys. This page uses the WebAuthn bootstrap workflow.

`theme.templates.oauth2WebAuthnReauth`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth` path.

This page contains a form that lists the WebAuthn passkeys currently available for re-authentication. A user can select one of the listed passkeys to authenticate using the corresponding passkey and user account.

`theme.templates.oauth2WebAuthnReauthEnable`StringoptionalAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth-enable` path.

This page contains two forms. One allows the user to select one of their existing WebAuthn passkeys to use for re-authentication. The other allows the user to register a new WebAuthn passkey for re-authentication.

`theme.templates.passwordChange`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/change` path.

This page is used if the user is required to change their password or if they have requested a password reset. This page contains the form that allows the user to provide a new password.

`theme.templates.passwordComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/complete` path.

This page is used after the user has successfully updated their password, or reset it. This page should instruct the user that their password was updated and that they need to login again.

`theme.templates.passwordForgot`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/forgot` path.

This page is used when a user starts the forgot password workflow. This page renders the form where the user types in their email address.

`theme.templates.passwordSent`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/sent` path.

This page is used when a user has submitted the forgot password form with their email. FusionAuth does not indicate back to the user if their email address was valid in order to prevent malicious activity that could reveal valid email addresses. Therefore, this page should indicate to the user that if their email was valid, they will receive an email shortly with a link to reset their password.

`theme.templates.phoneComplete`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/complete` path.

This page is used after a user has verified their phone number by clicking the URL in the message. After FusionAuth has updated their user object to indicate that their phone number was verified, the browser is redirected to this page.

`theme.templates.phoneSent`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/sent` path.

This page is used after a user has asked for the verification message to be resent. This can happen if the URL in the message expired and the user clicked it. In this case, the user can provide their phone number again and FusionAuth will resend the message. After the user submits their phone number and FusionAuth re-sends a verification message to them, the browser is redirected to this page.

`theme.templates.phoneVerificationRequired`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verification-required` path.

This page is rendered when a user is required to verify their phone number prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in identities/phone verification settings on the Tenant.

`theme.templates.phoneVerify`StringoptionalAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verify` path.

This page is rendered when a user clicks the URL from the verification message and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification message that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.registrationComplete`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/complete` path.

This page is used after a user has verified their email address for a specific application (i.e. a user registration) by clicking the URL in the email. After FusionAuth has updated their registration object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.registrationSent`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/sent` path.

This page is used after a user has asked for the application specific verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.registrationVerificationRequired`StringoptionalAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verification-required` path.

This page is rendered when a user is required to verify their registration prior to being allowed to proceed with the registration flow. This occurs when `Unverified behavior` is set to `Gated` in registration verification settings on the Application.

`theme.templates.registrationVerify`Stringoptional

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verify` path.

This page is used when a user clicks the URL from the application specific verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.samlv2Logout`StringoptionalAvailable since 1.25.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/samlv2/logout` path.

This page is used if the user initiates a SAML logout. This page causes the user to be logged out of all associated applications via a front-channel mechanism before being redirected.

`theme.templates.unauthorized`StringoptionalAvailable since 1.30.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/unauthorized` path.

This page is used if the user is not authorized to use the application or page. If you have advanced threat detection enabled, this page is generally made available to you.

*Example Advanced Theme Request JSON*

```json
{
  "theme": {
    "data": {
      "addedBy": "richard"
    },
    "defaultMessages": "title=Login",
    "localizedMessages": {
      "fr": "title=Identifiant",
      "es": "title=Iniciar sesión"
    },
    "name": "Orange Theme",
    "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/]"
    }
  }
}
```

### 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.stylesheet`String

A CSS stylesheet used to style the templates.

`theme.templates.accountEdit`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/edit` path.

This page contains a form that enables authenticated users to update their profile.

`theme.templates.accountIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account` path.

This is the self-service account landing page. An authenticated user may use this as a starting point for operations such as updating their profile or configuring multi-factor authentication.

`theme.templates.accountTwoFactorDisable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/disable` path.

This page contains a form that accepts a verification code used to disable a multi-factor authentication method.

`theme.templates.accountTwoFactorEdit`StringAvailable since 1.68.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/edit` path.

This page contains a form that accepts a verification code used to edit a multi-factor authentication method.

`theme.templates.accountTwoFactorEnable`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor/enable` path.

This page contains a form that accepts a verification code used to enable a multi-factor authentication method. Additionally, this page displays recovery codes when a user enables multi-factor authentication for the first time.

`theme.templates.accountTwoFactorIndex`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/two-factor` path.

This page displays an authenticated user's configured multi-factor authentication methods. Additionally, it provides links to enable and disable a method.

`theme.templates.accountWebAuthnAdd`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/add` path.

This page contains a form that allows a user to register a new WebAuthn passkey.

`theme.templates.accountWebAuthnDelete`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/delete` path.

This page contains a form that allows a user to delete a WebAuthn passkey.

`theme.templates.accountWebAuthnIndex`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/account/webauthn/` path.

This page displays an authenticated user's registered WebAuthn passkeys. Additionally, it provides links to delete an existing passkey and register a new passkey.

`theme.templates.confirmationRequired`StringAvailable since 1.49.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/confirmation-required` path.

This page is displayed when a user attempts to complete an email based workflow that did not begin in the same browser. For example, if the user starts a forgot password workflow, and then opens the link in a separate browser the user will be shown this panel.

`theme.templates.emailComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/complete` path.

This page is used after a user has verified their email address by clicking the URL in the email. After FusionAuth has updated their user object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.emailSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/sent` path.

This page is used after a user has asked for the verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.emailVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verification-required` path.

This page is rendered when a user is required to verify their email address prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in email verification settings on the Tenant.

`theme.templates.emailVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/email/verify` path.

This page is rendered when a user clicks the URL from the verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.helpers`String

A https://freemarker.apache.org\[FreeMarker\] template that contains all of the macros and templates used by the rest of the login Theme FreeMarker templates. This allows you to configure the general layout of your UI configuration and login theme without having to copy and paste HTML into each of the templates.

`theme.templates.index`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/` path.

This is the root landing page. This page is available to unauthenticated users and will be displayed whenever someone navigates to the FusionAuth host's root page. Prior to version `1.27.0`, navigating to this URL would redirect to `/admin` and would subsequently render the FusionAuth admin login page.

`theme.templates.oauth2Authorize`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorize` path.

This is the main login page for FusionAuth and is used for all interactive OAuth2 and OpenID Connect workflows.

`theme.templates.oauth2AuthorizedNotRegistered`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/authorized-not-registered` path.

This page is rendered when a user is not registered and the Application configuration requires registration before FusionAuth will complete the redirect.

`theme.templates.oauth2ChildRegistrationNotAllowed`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed` path.

This page contains a form where a child must provide their parent's email address to ask their parent to create an account for them in a Consent workflow.

`theme.templates.oauth2ChildRegistrationNotAllowedComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/child-registration-not-allowed-complete` path.

This page is rendered after a child provides their parent's email address for parental consent in a Consent workflow.

`theme.templates.oauth2CompleteRegistration`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/complete-registration` path.

This page contains a form that is used for users that have accounts but might be missing required fields.

`theme.templates.oauth2Consent`StringAvailable since 1.50.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/consent` path.

This page contains a form for capturing a user's OAuth scope consent choices. If there are no scopes that require a prompt, the user is redirected automatically.

`theme.templates.oauth2Device`StringAvailable since 1.11.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device` path.

This page contains a form for accepting an end user's short code for the interactive portion of the OAuth Device Authorization Grant workflow.

`theme.templates.oauth2DeviceComplete`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/device-complete` path.

This page contains a complete message indicating the device authentication has completed.

`theme.templates.oauth2Error`String

This page is used if the user starts or is in the middle of the OAuth workflow and any type of error occurs. This could be caused by the user messing with the URL or internally some type of information wasn't passed between the OAuth endpoints correctly. For example, if you are federating login to an external IdP and that IdP does not properly echo the state parameter, FusionAuth's OAuth workflow will break and this page will be displayed.

`theme.templates.oauth2Logout`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/logout` path.

This page is used if the user initiates an OAuth logout. This page causes the user to be logged out of all associated applications or just the initiating application, as configured, via a front-channel mechanism before being redirected.

`theme.templates.oauth2Passwordless`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/passwordless` path.

This page is rendered when the user starts the passwordless login workflow. The page renders the form where the user types in their email address.

`theme.templates.oauth2Register`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/register` path.

This page is used to register or sign up the user for the application when self-service registration is enabled.

`theme.templates.oauth2StartIdPLink`StringAvailable since 1.28.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/start-idp-link` path.

This page is used if the linking strategy of the Identity Provider is set to create a pending link. The user is presented with the option to link their account with an existing FusionAuth user account or create a new FusionAuth user.

`theme.templates.oauth2TwoFactor`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor` path.

This page is used if the user has two-factor authentication enabled or two factor authentication is required and they need to type in their code again. FusionAuth will properly handle the processing on the back end. This page contains the form that the user will put their code into.

`theme.templates.oauth2TwoFactorEnable`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable` path.

This page contains a form providing a user with the Oauth2 two-factor enable form

`theme.templates.oauth2TwoFactorEnableComplete`StringAvailable since 1.42.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-enable-complete` path.

This page contains a form providing a user with the Oauth2 two-factor enable complete form

`theme.templates.oauth2TwoFactorMethods`StringAvailable since 1.26.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/two-factor-methods` path.

This page contains a form providing a user with their configured multi-factor authentication options that they may use to complete the authentication challenge.

`theme.templates.oauth2Wait`StringAvailable since 1.12.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/wait` path.

This page is rendered when FusionAuth is waiting for an external provider to complete an out of band authentication request. For example, during a HYPR login this page will be displayed until the user completes authentication.

`theme.templates.oauth2WebAuthn`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn` path.

This page contains a form where a user can enter their `loginId` (username or email address) to authenticate with one of their registered WebAuthn passkeys. This page uses the WebAuthn bootstrap workflow.

`theme.templates.oauth2WebAuthnReauth`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth` path.

This page contains a form that lists the WebAuthn passkeys currently available for re-authentication. A user can select one of the listed passkeys to authenticate using the corresponding passkey and user account.

`theme.templates.oauth2WebAuthnReauthEnable`StringAvailable since 1.41.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/oauth2/webauthn-reauth-enable` path.

This page contains two forms. One allows the user to select one of their existing WebAuthn passkeys to use for re-authentication. The other allows the user to register a new WebAuthn passkey for re-authentication.

`theme.templates.passwordChange`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/change` path.

This page is used if the user is required to change their password or if they have requested a password reset. This page contains the form that allows the user to provide a new password.

`theme.templates.passwordComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/complete` path.

This page is used after the user has successfully updated their password, or reset it. This page should instruct the user that their password was updated and that they need to login again.

`theme.templates.passwordForgot`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/forgot` path.

This page is used when a user starts the forgot password workflow. This page renders the form where the user types in their email address.

`theme.templates.passwordSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/password/sent` path.

This page is used when a user has submitted the forgot password form with their email. FusionAuth does not indicate back to the user if their email address was valid in order to prevent malicious activity that could reveal valid email addresses. Therefore, this page should indicate to the user that if their email was valid, they will receive an email shortly with a link to reset their password.

`theme.templates.phoneComplete`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/complete` path.

This page is used after a user has verified their phone number by clicking the URL in the message. After FusionAuth has updated their user object to indicate that their phone number was verified, the browser is redirected to this page.

`theme.templates.phoneSent`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/sent` path.

This page is used after a user has asked for the verification message to be resent. This can happen if the URL in the message expired and the user clicked it. In this case, the user can provide their phone number again and FusionAuth will resend the message. After the user submits their phone number and FusionAuth re-sends a verification message to them, the browser is redirected to this page.

`theme.templates.phoneVerificationRequired`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verification-required` path.

This page is rendered when a user is required to verify their phone number prior to being allowed to proceed with login. This occurs when `Unverified behavior` is set to `Gated` in identities/phone verification settings on the Tenant.

`theme.templates.phoneVerify`StringAvailable since 1.59.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/phone/verify` path.

This page is rendered when a user clicks the URL from the verification message and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification message that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.registrationComplete`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/complete` path.

This page is used after a user has verified their email address for a specific application (i.e. a user registration) by clicking the URL in the email. After FusionAuth has updated their registration object to indicate that their email was verified, the browser is redirected to this page.

`theme.templates.registrationSent`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/sent` path.

This page is used after a user has asked for the application specific verification email to be resent. This can happen if the URL in the email expired and the user clicked it. In this case, the user can provide their email address again and FusionAuth will resend the email. After the user submits their email and FusionAuth re-sends a verification email to them, the browser is redirected to this page.

`theme.templates.registrationVerificationRequired`StringAvailable since 1.27.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verification-required` path.

This page is rendered when a user is required to verify their registration prior to being allowed to proceed with the registration flow. This occurs when `Unverified behavior` is set to `Gated` in registration verification settings on the Application.

`theme.templates.registrationVerify`String

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/registration/verify` path.

This page is used when a user clicks the URL from the application specific verification email and the `verificationId` has expired. FusionAuth expires `verificationId` after a period of time (which is configurable). If the user has a URL from the verification email that has expired, this page will be rendered and the error will be displayed to the user.

`theme.templates.samlv2Logout`StringAvailable since 1.25.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/samlv2/logout` path.

This page is used if the user initiates a SAML logout. This page causes the user to be logged out of all associated applications via a front-channel mechanism before being redirected.

`theme.templates.unauthorized`StringAvailable since 1.30.0

A [FreeMarker](https://freemarker.apache.org) template that is rendered when the user requests the `/unauthorized` path.

This page is used if the user is not authorized to use the application or page. If you have advanced threat detection enabled, this page is generally made available to you.

*Example Advanced Theme Response JSON*

```json
{
  "theme": {
    "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"
  }
}
```

## Delete an Advanced 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}

OpenAPI Spec

#### Request Parameters

`themeId`UUIDrequired

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