---
title: "Update project auth settings"
method: PATCH
path: "/auth/v1/settings"
tags: ["Auth"]
---

# Update project auth settings

`PATCH /auth/v1/settings`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/auth/v1/settings`
- Auth: one of:
  - API key in header `apikey`
  - API key in header `apikey` and HTTP bearer

Updates project auth settings. Requires the project's service key, passed either as apikey or as Authorization: Bearer with the anon apikey. Lifecycle-gated for non-active projects.

## Request body

- object
  - `allow_password_set` boolean: Allow passwordless users to set a password (default: false)
  - `preferred_sign_in_method` 'password' | 'magic_link' | 'oauth_google' | 'passkey' | 'null', nullable
  - `public_signup` 'open' | 'known_email' | 'invite_only'
  - `require_passkey_for_project_admin` boolean
  - `test_mode` boolean, nullable: Tri-state auth test-session mode. true enables service-key test sessions, false disables them, null restores the tier default (prototype on, paid tiers off).

## Response `200`

Settings updated

- AuthSettingsResponse
  - `allow_password_set` boolean, required: Allow passwordless users to set a password.
  - `preferred_sign_in_method` 'password' | 'magic_link' | 'oauth_google' | 'passkey' | 'null', nullable, required: Project UI hint for the preferred first sign-in method.
  - `public_signup` 'open' | 'known_email' | 'invite_only', required: Password and untrusted magic-link auto-signup policy.
  - `require_passkey_for_project_admin` boolean, required: When true, project_admin sessions require an eligible passkey login.
  - `test_mode` TestModeStatus, required
    - `value` boolean, nullable, required: Stored project override. null means use the tier default.
    - `effective` boolean, required: Whether test sessions are currently enabled.
    - `source` 'explicit' | 'tier_default', required
    - `default_for_tier` boolean, required: Tier default before the project override is applied.

## Other responses

- `400`: Invalid settings request
- `403`: Service key required
- `409`: Security-sensitive settings are not enabled for this deployment

---

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