Create or update email branding
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/branding/email';
const options = {
method: 'PUT',
headers: {
'API-Version': '2026-06-01.beta',
'API-Key': '<API-Key>',
'Content-Type': 'application/json'
},
body: '{"primary_color":"#1a73e8","header_logo_light_url":"https://example.com","header_logo_dark_url":"https://example.com","company_url":"https://example.com","footer_company_name":"example","footer_text":"example","show_powered_by":true,"internationalization":{"enabled":true,"default_locale":"example","supported_locales":["example"]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request PUT \
--url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/branding/email \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta' \
--header 'Content-Type: application/json' \
--data '{ "primary_color": "#1a73e8", "header_logo_light_url": "https://example.com", "header_logo_dark_url": "https://example.com", "company_url": "https://example.com", "footer_company_name": "example", "footer_text": "example", "show_powered_by": true, "internationalization": { "enabled": true, "default_locale": "example", "supported_locales": [ "example" ] } }'Creates or replaces the email template branding for a realm. Triggers asynchronous theme generation and deployment.
Required scope: branding:write
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
Example
customer-portalHeader Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
CSS hex color code.
Example
#1a73e8Display a ‘Powered by Skycloak’ line in the email footer. Hiding it requires a plan that allows removing branding; otherwise it stays on. Omitted means unchanged.
Internationalization settings.
object
IETF BCP 47 language tag used as the default locale.
Locales available to users. Must include default_locale.
Responses
Section titled “Responses”The request has succeeded.
Email template branding configuration for a Keycloak realm.
object
Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
Primary accent color used in email templates.
Logo URL for light-background email clients.
Logo URL for dark-background email clients.
URL of the company website linked from the email footer.
Display a ‘Powered by Skycloak’ line in the email footer.
Internationalization settings.
object
IETF BCP 47 language tag used as the default locale.
Locales available to users. Must include default_locale.
Timestamp of the most recent successful deployment to Keycloak.
Example
{
"realm": "customer-portal",
"primary_color": "#1a73e8",
"status": "applying"
}The server could not understand the request due to invalid syntax.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is forbidden.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
object
object
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
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}