Skycloak SMTP API
The SMTP API from Skycloak — 2 operation(s) for smtp.
The SMTP API from Skycloak — 2 operation(s) for smtp.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/skycloak-io:skycloak-io-smtp-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Skycloak Public SMTP API
version: '2026-03-01'
contact:
name: Skycloak Support
url: https://support.skycloak.io
license:
name: Proprietary
description: Programmatic management of Keycloak infrastructure on the Skycloak platform.
servers:
- url: http://localhost:8000
description: Local development
variables: {}
tags:
- name: SMTP
paths:
/clusters/{cluster_id}/realms/{realm}/smtp:
get:
operationId: getSmtpConfig
summary: Get SMTP configuration
description: 'Returns the SMTP configuration for a realm.
Required scope: `smtp:read`'
parameters:
- name: cluster_id
in: path
required: true
schema:
$ref: '#/components/schemas/ClusterId'
- name: realm
in: path
required: true
schema:
$ref: '#/components/schemas/RealmName'
- $ref: '#/components/parameters/CommonParameters'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/SmtpConfig'
'401':
description: Access is unauthorized.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'403':
description: Access is forbidden.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'404':
description: The server cannot find the requested resource.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'429':
description: Client error
headers:
Retry-After:
required: false
schema:
type: integer
RateLimit-Limit:
required: false
schema:
type: integer
RateLimit-Remaining:
required: false
schema:
type: integer
RateLimit-Reset:
required: false
schema:
type: integer
X-RateLimit-Limit-Second:
required: false
schema:
type: integer
X-RateLimit-Remaining-Second:
required: false
schema:
type: integer
X-RateLimit-Limit-Minute:
required: false
schema:
type: integer
X-RateLimit-Remaining-Minute:
required: false
schema:
type: integer
X-RateLimit-Limit-Hour:
required: false
schema:
type: integer
X-RateLimit-Remaining-Hour:
required: false
schema:
type: integer
X-RateLimit-Limit-Day:
required: false
schema:
type: integer
X-RateLimit-Remaining-Day:
required: false
schema:
type: integer
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'501':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
tags:
- SMTP
security:
- ApiKeyAuth: []
x-scopes:
- smtp:read
put:
operationId: upsertSmtpConfig
summary: Create or update SMTP configuration
description: 'Creates or replaces the SMTP configuration for a realm. Credentials (password, client secret) are write-only; omit them to retain the existing value.
Required scope: `smtp:write`'
parameters:
- name: cluster_id
in: path
required: true
schema:
$ref: '#/components/schemas/ClusterId'
- name: realm
in: path
required: true
schema:
$ref: '#/components/schemas/RealmName'
- $ref: '#/components/parameters/CommonParameters'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/SmtpConfig'
'400':
description: The server could not understand the request due to invalid syntax.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'401':
description: Access is unauthorized.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'403':
description: Access is forbidden.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'404':
description: The server cannot find the requested resource.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'422':
description: Client error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
'429':
description: Client error
headers:
Retry-After:
required: false
schema:
type: integer
RateLimit-Limit:
required: false
schema:
type: integer
RateLimit-Remaining:
required: false
schema:
type: integer
RateLimit-Reset:
required: false
schema:
type: integer
X-RateLimit-Limit-Second:
required: false
schema:
type: integer
X-RateLimit-Remaining-Second:
required: false
schema:
type: integer
X-RateLimit-Limit-Minute:
required: false
schema:
type: integer
X-RateLimit-Remaining-Minute:
required: false
schema:
type: integer
X-RateLimit-Limit-Hour:
required: false
schema:
type: integer
X-RateLimit-Remaining-Hour:
required: false
schema:
type: integer
X-RateLimit-Limit-Day:
required: false
schema:
type: integer
X-RateLimit-Remaining-Day:
required: false
schema:
type: integer
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'501':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
tags:
- SMTP
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpsertSmtpConfigRequest'
security:
- ApiKeyAuth: []
x-scopes:
- smtp:write
delete:
operationId: deleteSmtpConfig
summary: Delete SMTP configuration
description: 'Removes the SMTP configuration for a realm.
Required scope: `smtp:write`'
parameters:
- name: cluster_id
in: path
required: true
schema:
$ref: '#/components/schemas/ClusterId'
- name: realm
in: path
required: true
schema:
$ref: '#/components/schemas/RealmName'
- $ref: '#/components/parameters/CommonParameters'
responses:
'204':
description: There is no content to send for this request, but the headers may be useful.
'401':
description: Access is unauthorized.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'403':
description: Access is forbidden.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'404':
description: The server cannot find the requested resource.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'429':
description: Client error
headers:
Retry-After:
required: false
schema:
type: integer
RateLimit-Limit:
required: false
schema:
type: integer
RateLimit-Remaining:
required: false
schema:
type: integer
RateLimit-Reset:
required: false
schema:
type: integer
X-RateLimit-Limit-Second:
required: false
schema:
type: integer
X-RateLimit-Remaining-Second:
required: false
schema:
type: integer
X-RateLimit-Limit-Minute:
required: false
schema:
type: integer
X-RateLimit-Remaining-Minute:
required: false
schema:
type: integer
X-RateLimit-Limit-Hour:
required: false
schema:
type: integer
X-RateLimit-Remaining-Hour:
required: false
schema:
type: integer
X-RateLimit-Limit-Day:
required: false
schema:
type: integer
X-RateLimit-Remaining-Day:
required: false
schema:
type: integer
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'501':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
tags:
- SMTP
security:
- ApiKeyAuth: []
x-scopes:
- smtp:write
/clusters/{cluster_id}/realms/{realm}/smtp/test:
post:
operationId: testSmtpConfig
summary: Test SMTP configuration
description: 'Sends a test email using the saved SMTP configuration. Returns the test result.
Required scope: `smtp:write`'
parameters:
- name: cluster_id
in: path
required: true
schema:
$ref: '#/components/schemas/ClusterId'
- name: realm
in: path
required: true
schema:
$ref: '#/components/schemas/RealmName'
- $ref: '#/components/parameters/CommonParameters'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/SmtpTestResult'
'400':
description: The server could not understand the request due to invalid syntax.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'401':
description: Access is unauthorized.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'403':
description: Access is forbidden.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'404':
description: The server cannot find the requested resource.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'422':
description: Client error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
'429':
description: Client error
headers:
Retry-After:
required: false
schema:
type: integer
RateLimit-Limit:
required: false
schema:
type: integer
RateLimit-Remaining:
required: false
schema:
type: integer
RateLimit-Reset:
required: false
schema:
type: integer
X-RateLimit-Limit-Second:
required: false
schema:
type: integer
X-RateLimit-Remaining-Second:
required: false
schema:
type: integer
X-RateLimit-Limit-Minute:
required: false
schema:
type: integer
X-RateLimit-Remaining-Minute:
required: false
schema:
type: integer
X-RateLimit-Limit-Hour:
required: false
schema:
type: integer
X-RateLimit-Remaining-Hour:
required: false
schema:
type: integer
X-RateLimit-Limit-Day:
required: false
schema:
type: integer
X-RateLimit-Remaining-Day:
required: false
schema:
type: integer
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'501':
description: Server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
tags:
- SMTP
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SmtpTestRequest'
security:
- ApiKeyAuth: []
x-scopes:
- smtp:write
components:
schemas:
SmtpStatus:
type: string
enum:
- configured
- verified
- failed
ValidationErrorBody:
type: object
required:
- type
- title
- status
- detail
- errors
properties:
type:
type: string
format: uri
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string
format: uri
errors:
type: array
items:
$ref: '#/components/schemas/FieldError'
minItems: 1
SmtpAuthType:
type: string
enum:
- basic
- oauth2
SmtpHost:
type: string
minLength: 1
maxLength: 255
example: smtp.sendgrid.net
SmtpConfig:
type: object
required:
- cluster_id
- realm
- host
- port
- encryption
- from_email
- auth_type
- has_password
- has_client_secret
- status
- created_at
- updated_at
properties:
cluster_id:
$ref: '#/components/schemas/ClusterId'
realm:
$ref: '#/components/schemas/RealmName'
host:
$ref: '#/components/schemas/SmtpHost'
port:
$ref: '#/components/schemas/SmtpPort'
encryption:
$ref: '#/components/schemas/SmtpEncryption'
from_email:
type: string
format: email
description: Sender email address.
example: noreply@mycompany.com
from_name:
type: string
maxLength: 255
example: MyCompany
auth_type:
$ref: '#/components/schemas/SmtpAuthType'
username:
type: string
description: SMTP username. Present when `auth_type` is `basic`.
has_password:
type: boolean
description: '`true` when a password is stored for this configuration.'
token_url:
type: string
format: uri
description: OAuth 2.0 token endpoint URL. Present when `auth_type` is `oauth2`.
token_scope:
type: string
description: OAuth 2.0 token scope. Present when `auth_type` is `oauth2`.
client_id:
type: string
description: OAuth 2.0 client ID. Present when `auth_type` is `oauth2`.
has_client_secret:
type: boolean
description: '`true` when a client secret is stored for this configuration.'
status:
$ref: '#/components/schemas/SmtpStatus'
last_tested:
type: string
format: date-time
description: Timestamp of the last connection test.
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
description: SMTP email delivery configuration for a realm.
SmtpTestRequest:
type: object
required:
- email
properties:
email:
type: string
format: email
description: Recipient email address for the test message.
x-oapi-codegen-extra-tags:
validate: required,email
FieldError:
type: object
required:
- field
- detail
properties:
field:
type: string
detail:
type: string
code:
type: string
value: {}
ClusterId:
type: string
format: uuid
SmtpPort:
type: integer
minimum: 1
maximum: 65535
example: 587
SmtpEncryption:
type: string
enum:
- none
- ssl
- starttls
Versions:
type: string
enum:
- 2026-06-01.beta
SmtpTestResult:
type: object
required:
- success
properties:
success:
type: boolean
message:
type: string
ErrorBody:
type: object
required:
- type
- title
- status
- detail
properties:
type:
type: string
format: uri
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string
format: uri
description: RFC 9457 Problem Details object.
RealmName:
type: string
minLength: 1
maxLength: 63
pattern: ^[a-zA-Z][a-zA-Z0-9-]*$
description: Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
example: customer-portal
UpsertSmtpConfigRequest:
type: object
required:
- host
- port
- from_email
- auth_type
properties:
host:
allOf:
- $ref: '#/components/schemas/SmtpHost'
x-oapi-codegen-extra-tags:
validate: hostname|ip
port:
$ref: '#/components/schemas/SmtpPort'
encryption:
allOf:
- $ref: '#/components/schemas/SmtpEncryption'
description: Encryption mode. Defaults to `none`.
from_email:
type: string
format: email
description: Sender email address.
x-oapi-codegen-extra-tags:
validate: email
from_name:
type: string
maxLength: 255
auth_type:
$ref: '#/components/schemas/SmtpAuthType'
username:
type: string
maxLength: 255
description: Required when `auth_type` is `basic`.
password:
type: string
description: Required when `auth_type` is `basic` and no password is currently stored. Omit to retain the existing password.
token_url:
type: string
format: uri
description: Required when `auth_type` is `oauth2`.
x-oapi-codegen-extra-tags:
validate: required_if=AuthType oauth2,omitempty,url
token_scope:
type: string
minLength: 1
maxLength: 255
description: Required when `auth_type` is `oauth2`.
x-oapi-codegen-extra-tags:
validate: required_if=AuthType oauth2
client_id:
type: string
minLength: 1
maxLength: 255
description: Required when `auth_type` is `oauth2`.
x-oapi-codegen-extra-tags:
validate: required_if=AuthType oauth2
client_secret:
type: string
description: Required when `auth_type` is `oauth2` and no client secret is stored. Omit to retain the existing secret.
parameters:
CommonParameters:
name: API-Version
in: header
required: true
schema:
$ref: '#/components/schemas/Versions'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: API-Key