Get SMTP configuration
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/smtp';
const options = {
method: 'GET',
headers: {'API-Version': '2026-06-01.beta', 'API-Key': '<API-Key>'}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request GET \
--url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/realms/customer-portal/smtp \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta'Returns the SMTP configuration for a realm.
Required scope: smtp:read
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”Responses
Section titled “Responses”The request has succeeded.
SMTP email delivery configuration for a realm.
object
Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
Sender email address.
SMTP username. Present when auth_type is basic.
true when a password is stored for this configuration.
OAuth 2.0 token endpoint URL. Present when auth_type is oauth2.
OAuth 2.0 token scope. Present when auth_type is oauth2.
OAuth 2.0 client ID. Present when auth_type is oauth2.
true when a client secret is stored for this configuration.
Timestamp of the last connection test.
Example
{
"realm": "customer-portal",
"host": "smtp.sendgrid.net",
"port": 587,
"encryption": "none",
"from_email": "noreply@mycompany.com",
"from_name": "MyCompany",
"auth_type": "basic",
"status": "configured"
}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
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"
}