---
title: "Update auth settings"
method: PUT
path: "/api/auth/settings"
tags: ["Auth - Settings"]
---

# Update auth settings

`PUT /api/auth/settings`

## Request

- Base URL: `https://api.ascendkit.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ascendkit.dev/api/auth/settings`
- Auth: API key in header `X-AscendKit-Public-Key` and HTTP bearer

Updates enabled providers, feature flags, and session duration for an environment.

## Request body

- AuthSettingsUpdate
  - `providers` string[], nullable: Enabled sign-in providers for the environment.
  - `features` AuthFeatures
    - `emailVerification` boolean: Require users to verify their email address before completing login.
    - `waitlist` boolean: Put new signups into a pending state until approved.
    - `passwordReset` boolean: Allow users to request password reset emails.
    - `requireUsername` boolean: Require usernames in addition to email addresses where supported.
    - `twoFactor` boolean: Allow credential-based users to enroll in TOTP multi-factor authentication.
    - `botProtection` boolean: Apply server-side auth abuse throttling and temporary lockouts on risky flows.
  - `sessionDuration` string, nullable: Session lifetime expressed as a duration string.
  - `allowedDomains` string[], nullable: Email domains allowed to sign up. Empty list clears restrictions.
  - `blockPersonalDomains` boolean, nullable: Block signups from common personal email providers.
  - `tosUrl` string, nullable: Absolute HTTPS URL to the customer's Terms of Service. Pass empty string to clear. Validated as absolute https URL with length cap 2048.

## Response `200`

Successful Response

- ApiResponse
  - `data` unknown
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ascendkit/apis/ascendkit-api.md) · [All operations](https://skmtc.dev/ascendkit/apis/ascendkit-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ascendkit/apis/ascendkit-api/revisions/0a41c122c44f?raw)
