Skip to content

Replace theme content

PUT
/clusters/{cluster_id}/themes/{theme_id}/content
curl --request PUT \
  --url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/themes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/content \
  --header 'API-Key: <API-Key>' \
  --header 'API-Version: 2026-06-01.beta' \
  --header 'Content-Type: multipart/form-data' \
  --form theme_file=@file \
  --form version=example

Replaces the theme’s archive in place, keeping its identity and its realm and application assignments. The new content is deployed immediately and every realm and application using the theme is repointed at it, so the sign-in page is never left unbranded the way delete-then-re-upload would.

The replacement archive must contain every theme type the theme currently provides (theme_types); an archive that drops one is rejected with 400 Bad Request. Returns 409 Conflict for themes created by a platform migration — their content is pinned and cannot be replaced.

Maximum body size is 50 MB.

Required scope: themes:write

cluster_id
required
string format: uuid
theme_id
required
string format: uuid
API-Version
required
string
Allowed values: 2026-06-01.beta
Media typemultipart/form-data
object
theme_file
required

Replacement Keycloak-compatible theme archive. Content type must be application/zip (ZIP) or application/java-archive (Keycloakify JAR).

string format: binary
version

Optional new version label, e.g. v2.4. Free text, up to 50 characters. Omit to leave the existing version unchanged; it is recorded only once the new content is live.

string

The request has succeeded.

Media typeapplication/json

A custom Keycloak theme package deployed to a cluster.

object
id
required
string format: uuid
cluster_id
required
string format: uuid
name
required
string
>= 1 characters <= 100 characters
description
string
<= 500 characters
version
string
<= 50 characters
theme_types
required

Keycloak theme types detected in the uploaded ZIP package.

Array<string>
Allowed values: login email account admin
status
required
string
Allowed values: deploying deployed undeploying failed
file_size
required

Size of the uploaded theme archive in bytes.

integer format: int64
deployed_at

Timestamp of the most recent successful deployment to Keycloak.

string format: date-time
error_message

Error detail from the last failed deployment.

string
directory

Directory name Keycloak serves this theme from. Use this exact value when setting a realm or application theme outside Skycloak. Valid once status is deployed. It changes when the theme content is replaced: realm theme settings that name the previous directory are moved automatically, but application themes set outside Skycloak are not and must be updated after a replace.

string
restart_required

True when the theme’s content was replaced under its exact name and Keycloak has not restarted since, so the previous content may still be served. Only workspaces that keep exact theme names replace content in place; for every other theme this is false.

boolean
created_at
required
string format: date-time
updated_at
required
string format: date-time

Example

{
  "theme_types": [
    "login"
  ],
  "status": "deploying"
}

The server could not understand the request due to invalid syntax.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Access is unauthorized.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json

Returned when a workspace plan quota would be exceeded. required_plan indicates the minimum plan needed to complete the request.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
current_plan
required
string
required_plan
required
string
code

Machine-readable identifier of the quota that was hit, so a client can tell quotas apart without parsing detail. Known values include cluster_limit (the workspace’s total cluster allowance), cluster_size_quota (the allowance for the requested cluster size) and cluster_size (the requested size is not offered on the plan at all). New values may be added.

string
current_usage

How many of the resource the workspace currently has.

integer
current_limit

Maximum allowed by the current plan. 0 means the plan does not include the resource at all.

integer

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com",
  "current_plan": "example",
  "required_plan": "example",
  "code": "example",
  "current_usage": 1,
  "current_limit": 1
}

Access is forbidden.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

The server cannot find the requested resource.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

The request conflicts with the current state of the server.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
errors
required
Array<object>
>= 1 items
object
field
required
string
detail
required
string
code
string
value

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com",
  "errors": [
    {
      "field": "example",
      "detail": "example",
      "code": "example",
      "value": "example"
    }
  ]
}

Client error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}
Retry-After
integer
RateLimit-Limit
integer
RateLimit-Remaining
integer
RateLimit-Reset
integer
X-RateLimit-Limit-Second
integer
X-RateLimit-Remaining-Second
integer
X-RateLimit-Limit-Minute
integer
X-RateLimit-Remaining-Minute
integer
X-RateLimit-Limit-Hour
integer
X-RateLimit-Remaining-Hour
integer
X-RateLimit-Limit-Day
integer
X-RateLimit-Remaining-Day
integer

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}