Create or update a domain
Changed onIdempotent create-or-update. Uses the key field in the body to identify the domain. On first apply the domain is created; subsequent applies update it. dataPlaneId is optional at creation, resolved from the environment's data planes when omitted, and immutable afterwards. When dryRun is true, the endpoint validates the payload without persisting; the returned domain carries a dryRunErrors list (empty on success, populated with validation errors otherwise).
Request
- Base URLhttp://localhost:8093/automation
- URLhttp://localhost:8093/automation/organizations/{orgId}/environments/{envId}/domains
- AuthHTTP bearer
Path parameters
Identifier of the organization that owns the environment.
Identifier of the environment the resource belongs to.
Query parameters
When true, validates the payload without persisting. The returned domain includes a dryRunErrors field.
Request body
Example request
{
"accountSettings": {
"accountBlockedDuration": 7200,
"defaultIdentityProviderForRegistration": "users-idp",
"loginAttemptsResetTime": 600,
"maxLoginAttempts": 10,
"mfaChallengeAttemptsResetTime": 600,
"mfaChallengeMaxAttempts": 3,
"redirectUriAfterRegistration": "https://app.example.com/welcome",
"redirectUriAfterResetPassword": "https://app.example.com/signin",
"rememberMeDuration": 604800,
"resetPasswordCustomFormFields": [
{
"key": "email",
"label": "Email",
"type": "email"
}
]
},
"certificateSettings": {
"fallbackCertificate": "default"
},
"corsSettings": {
"allowedHeaders": [
"Authorization",
"Content-Type"
],
"allowedMethods": [
"GET",
"POST",
"PUT",
"DELETE"
],
"allowedOrigins": [
"https://app.example.com"
]
},
"dataPlaneId": "default",
"description": "An example authentication domain",
"key": "example-domain",
"name": "Example domain",
"path": "/example-domain",
"saml": {
"certificate": "signing-cert",
"entityId": "https://auth.example.com/saml2/idp/entity"
},
"secretExpirationSettings": {
"expiryTimeSeconds": 7776000
},
"tags": [
"eu",
"production"
],
"tokenExchangeSettings": {
"allowedActorTokenTypes": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"allowedRequestedTokenTypes": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"allowedSubjectTokenTypes": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"trustedIssuers": [
{
"issuer": "https://issuer.example.com",
"jwksUri": "https://issuer.example.com/.well-known/jwks.json",
"userBindingCriteria": [
{
"attribute": "emails.value",
"expression": "{#token['email']}"
}
]
}
]
},
"vhosts": [
{
"host": "auth.example.com",
"path": "/customers"
}
],
"webAuthnSettings": {
"origin": "https://auth.example.com",
"relyingPartyId": "auth.example.com",
"relyingPartyName": "Example Inc."
},
"webProtectionSettings": {
"csp": {
"directives": [
"default-src 'self'",
"script-src 'self'",
"upgrade-insecure-requests"
]
},
"xframe": {
"action": "DENY"
},
"xss": {
"action": "1; mode=block"
}
}
}Response
The created or updated domain. When dryRun is true the domain includes a dryRunErrors field with any validation errors.
Example response
{
"accountSettings": {
"accountBlockedDuration": 7200,
"defaultIdentityProviderForRegistration": "users-idp",
"loginAttemptsResetTime": 600,
"maxLoginAttempts": 10,
"mfaChallengeAttemptsResetTime": 600,
"mfaChallengeMaxAttempts": 3,
"redirectUriAfterRegistration": "https://app.example.com/welcome",
"redirectUriAfterResetPassword": "https://app.example.com/signin",
"rememberMeDuration": 604800,
"resetPasswordCustomFormFields": [
{
"key": "email",
"label": "Email",
"type": "email"
}
]
},
"certificateSettings": {
"fallbackCertificate": "default"
},
"corsSettings": {
"allowedHeaders": [
"Authorization",
"Content-Type"
],
"allowedMethods": [
"GET",
"POST",
"PUT",
"DELETE"
],
"allowedOrigins": [
"https://app.example.com"
]
},
"dataPlaneId": "default",
"description": "An example authentication domain",
"key": "example-domain",
"name": "Example domain",
"path": "/example-domain",
"saml": {
"certificate": "signing-cert",
"entityId": "https://auth.example.com/saml2/idp/entity"
},
"secretExpirationSettings": {
"expiryTimeSeconds": 7776000
},
"tags": [
"eu",
"production"
],
"tokenExchangeSettings": {
"allowedActorTokenTypes": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"allowedRequestedTokenTypes": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"allowedSubjectTokenTypes": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"trustedIssuers": [
{
"issuer": "https://issuer.example.com",
"jwksUri": "https://issuer.example.com/.well-known/jwks.json",
"userBindingCriteria": [
{
"attribute": "emails.value",
"expression": "{#token['email']}"
}
]
}
]
},
"vhosts": [
{
"host": "auth.example.com",
"path": "/customers"
}
],
"webAuthnSettings": {
"origin": "https://auth.example.com",
"relyingPartyId": "auth.example.com",
"relyingPartyName": "Example Inc."
},
"webProtectionSettings": {
"csp": {
"directives": [
"default-src 'self'",
"script-src 'self'",
"upgrade-insecure-requests"
]
},
"xframe": {
"action": "DENY"
},
"xss": {
"action": "1; mode=block"
}
}
}Changes
- breaking
request property
//was restricted to a list of enum values - breaking
added the pattern
^/.*to the request property - warning
the
/request property's max was set to100.00 - warning
the
/request property's min was set to1.00 - warning
added the new
DENYenum value to the//response property for the response status - warning
added the new
SAMEORIGINenum value to the//response property for the response status - info
added the new
DENYenum value to the request property// - info
added the new
SAMEORIGINenum value to the request property// - info
the
response's property pattern^/.*was added for the status
- breaking
- breaking
the response property
became optional for the status - breaking
the
response property's minLength was decreased from1to0for the response status - info
added the new optional
queryrequest parameterdryRun - info
added the new optional request property
/ - info
added the new optional request property
- info
added the new optional request property
/ - info
added the new optional request property
- info
the request property
became optional - info
the
request property default valuefalsewas added - info
the
request property default value600was added - info
the
request property default value256was added - info
the
request property default valueRS256RS384RS512ES256ES384ES512EdDSAwas added - info
the
request property default value5was added - info
the
request property default valuefalsewas removed - info
the
request property default valuefalsewas removed - info
the
request property default value50was removed - info
the
request property default value300was removed - info
the
request property default value5000was removed - info
the
request property default value32was removed - info
request property
//deprecated - info
request property
//deprecated - info
request property
//deprecated - info
request property
//deprecated - info
request property
//deprecated - info
request property
//deprecated - info
request property
/deprecated - info
request property
//deprecated - info
the
request property's minLength was decreased from1to0 - info
added the optional property
/to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
to the response with the status - info
the
response's property default valuefalsewas added for the status - info
the
response's property default value600was added for the status - info
the
response's property default value256was added for the status - info
the
response's property default valueRS256RS384RS512ES256ES384ES512EdDSAwas added for the status - info
the
response's property default value5was added for the status - info
the
response's property default valuefalsewas removed for the status - info
the
response's property default valuefalsewas removed for the status - info
the
response's property default value50was removed for the status - info
the
response's property default value300was removed for the status - info
the
response's property default value5000was removed for the status - info
the
response's property default value32was removed for the status - info
response property
oidc/workloadIdentitySettings/allowPrivateIpAddressdeprecated - info
response property
oidc/workloadIdentitySettings/allowUnsecuredHttpUrideprecated - info
response property
oidc/workloadIdentitySettings/cacheMaxEntriesdeprecated - info
response property
oidc/workloadIdentitySettings/cacheTtlSecondsdeprecated - info
response property
oidc/workloadIdentitySettings/fetchTimeoutMsdeprecated - info
response property
oidc/workloadIdentitySettings/maxResponseSizeKbdeprecated - info
response property
tokenExchangeSettings/trustedIssuersdeprecated - info
response property
tokenExchangeSettings/trustedIssuers/items/deprecated
- breaking