Skip to main content
POST
/
realm-configs
Create a realm
import requests

url = "https://{FUSION HOST}/api/realm-configs"

payload = {
    "realmType": "ldap",
    "name": "dev-ldap3",
    "config": {
        "autoCreateUsers": True,
        "host": "my.fusionhost.com",
        "ssl": True,
        "port": 10636,
        "ephemeralUsers": False,
        "login": { "bindDnTemplate": "uid={},ou=users,dc=security,dc=example,dc=com" }
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "realmType": "ldap",
  "id": "ef32cba0-5340-4d73-b869-9f4faca45e10",
  "name": "dev-ldap3",
  "enabled": true,
  "createdAt": "2025-10-31T17:06:33Z",
  "config": {
    "autoCreateUsers": true,
    "host": "my.fusionhost.com",
    "ssl": true,
    "port": 10636,
    "ephemeralUsers": false,
    "login": {
      "bindDnTemplate": "uid={},ou=users,dc=security,dc=example,dc=com"
    }
  },
  "roleNames": [
    "developer",
    "admin"
  ]
}

Body

application/json
  • Option 1
  • API key realm
  • JWT realm
  • Kerberos realm
  • LDAP realm
  • OIDC realm
  • SAML realm
  • Trusted HTTP realm
name
string
required

The name of the realm. This name will appear on the login screen of the UI, and will appear in user records to identify the realm they belong to.

realmType
string
required

Use the /realm-configs endpoint to get the list of valid realm types.

Example:

"native"

id
string
enabled
boolean

If true, the realm is available for users to use with system authentication.

createdAt
string<date-time>
Example:

"2025-09-23T17:48:07Z"

updatedAt
string<date-time>
Example:

"2025-10-31T12:28:04Z"

Response

Created

  • Option 1
  • API key realm
  • JWT realm
  • Kerberos realm
  • LDAP realm
  • OIDC realm
  • SAML realm
  • Trusted HTTP realm
name
string
required

The name of the realm. This name will appear on the login screen of the UI, and will appear in user records to identify the realm they belong to.

realmType
string
required

Use the /realm-configs endpoint to get the list of valid realm types.

Example:

"native"

id
string
enabled
boolean

If true, the realm is available for users to use with system authentication.

createdAt
string<date-time>
Example:

"2025-09-23T17:48:07Z"

updatedAt
string<date-time>
Example:

"2025-10-31T12:28:04Z"