Skip to content

Update Sector Security Settings

PUT
/api/v1/sectors/{sectorID}/settings
curl --request PUT \
--url https://api.spartanauth.com/api/v1/sectors/example/settings \
--header 'Content-Type: application/json' \
--data '{ "MFARequired": true, "SelfSignUpAllowed": true, "AllowUserCreationForNonAdmins": true, "AllowUserReadForNonAdmins": true, "OTPEmailSubject": "example", "OTPEmailBodyTemplate": "example", "OTPEmailBodyHTMLTemplate": "example", "OTPSMSTemplate": "example", "InviteEmailSubject": "example", "InviteEmailBodyTemplate": "example", "InviteEmailBodyHTMLTemplate": "example", "InviteExpirationHours": "example", "AccessTokenDuration": "example", "PasswordResetEmailSubject": "example", "PasswordResetEmailBodyTemplate": "example", "PasswordResetEmailBodyHTMLTemplate": "example", "PasswordResetTimeoutMinutes": "example", "WebAuthnRPID": "example", "WebAuthnRPDisplayName": "example", "WebAuthnRPOrigins": [ "example" ], "MagicLinkURL": "example", "WebAuthnDebug": true }'

Updates the security settings for a sector. Requires the user to be an admin of the sector or the default sector. This endpoint is intended for internal use by the admin settings UI and accepts sensitive information like email templates and token durations that should not be exposed publicly.

sectorID
required
string
Media type application/json
object
MFARequired
boolean
SelfSignUpAllowed
boolean
AllowUserCreationForNonAdmins
boolean
AllowUserReadForNonAdmins
boolean
OTPEmailSubject
string
OTPEmailBodyTemplate
string
OTPEmailBodyHTMLTemplate
string
OTPSMSTemplate
string
InviteEmailSubject
string
InviteEmailBodyTemplate
string
InviteEmailBodyHTMLTemplate
string
InviteExpirationHours
default: 168 hours (7 days)
string format: int64
AccessTokenDuration
duration in seconds for access tokens issued after authentication
string format: int64
PasswordResetEmailSubject
string
PasswordResetEmailBodyTemplate
string
PasswordResetEmailBodyHTMLTemplate
string
PasswordResetTimeoutMinutes
default: 15 minutes
string format: int64
WebAuthnRPID
Relying Party ID for WebAuthn — defaults to sector domain if empty
string
WebAuthnRPDisplayName
Relying Party display name — defaults to sector name if empty
string
WebAuthnRPOrigins
Allowed origins for WebAuthn (e.g. https://example.com)
Array<string>
MagicLinkURL
Base URL for magic links and invite emails (e.g. https://login.example.com) — overrides the global setting and sector domain fallback
string
WebAuthnDebug
Enable debug mode for WebAuthn library
boolean
Example generated
{
"MFARequired": true,
"SelfSignUpAllowed": true,
"AllowUserCreationForNonAdmins": true,
"AllowUserReadForNonAdmins": true,
"OTPEmailSubject": "example",
"OTPEmailBodyTemplate": "example",
"OTPEmailBodyHTMLTemplate": "example",
"OTPSMSTemplate": "example",
"InviteEmailSubject": "example",
"InviteEmailBodyTemplate": "example",
"InviteEmailBodyHTMLTemplate": "example",
"InviteExpirationHours": "example",
"AccessTokenDuration": "example",
"PasswordResetEmailSubject": "example",
"PasswordResetEmailBodyTemplate": "example",
"PasswordResetEmailBodyHTMLTemplate": "example",
"PasswordResetTimeoutMinutes": "example",
"WebAuthnRPID": "example",
"WebAuthnRPDisplayName": "example",
"WebAuthnRPOrigins": [
"example"
],
"MagicLinkURL": "example",
"WebAuthnDebug": true
}

A successful response.

Media type application/json
object
sectorID
string
MFARequired
boolean
SelfSignUpAllowed
boolean
AllowUserCreationForNonAdmins
boolean
AllowUserReadForNonAdmins
boolean
OTPEmailSubject
string
OTPEmailBodyTemplate
string
OTPEmailBodyHTMLTemplate
string
OTPSMSTemplate
string
InviteEmailSubject
string
InviteEmailBodyTemplate
string
InviteEmailBodyHTMLTemplate
string
InviteExpirationHours
default: 168 hours (7 days)
string format: int64
AccessTokenDuration
duration in seconds for access tokens issued after authentication
string format: int64
PasswordResetEmailSubject
string
PasswordResetEmailBodyTemplate
string
PasswordResetEmailBodyHTMLTemplate
string
PasswordResetTimeoutMinutes
default: 15 minutes
string format: int64
WebAuthnRPID
Relying Party ID for WebAuthn — defaults to sector domain if empty
string
WebAuthnRPDisplayName
Relying Party display name — defaults to sector name if empty
string
WebAuthnRPOrigins
Allowed origins for WebAuthn (e.g. https://example.com)
Array<string>
MagicLinkURL
Base URL for magic links and invite emails (e.g. https://login.example.com) — overrides the global setting and sector domain fallback
string
WebAuthnDebug
Enable debug mode for WebAuthn library
boolean
Example generated
{
"sectorID": "example",
"MFARequired": true,
"SelfSignUpAllowed": true,
"AllowUserCreationForNonAdmins": true,
"AllowUserReadForNonAdmins": true,
"OTPEmailSubject": "example",
"OTPEmailBodyTemplate": "example",
"OTPEmailBodyHTMLTemplate": "example",
"OTPSMSTemplate": "example",
"InviteEmailSubject": "example",
"InviteEmailBodyTemplate": "example",
"InviteEmailBodyHTMLTemplate": "example",
"InviteExpirationHours": "example",
"AccessTokenDuration": "example",
"PasswordResetEmailSubject": "example",
"PasswordResetEmailBodyTemplate": "example",
"PasswordResetEmailBodyHTMLTemplate": "example",
"PasswordResetTimeoutMinutes": "example",
"WebAuthnRPID": "example",
"WebAuthnRPDisplayName": "example",
"WebAuthnRPOrigins": [
"example"
],
"MagicLinkURL": "example",
"WebAuthnDebug": true
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}