NewWacht Bench is live — AI-assisted development for Wacht

getDeploymentSettings()

Returns the current deployment plus resolved settings objects for auth, UI, B2B, and restrictions.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function getDeploymentSettings() {  const client = await wachtClient();  return client.settings.getDeploymentSettings();}

Signature

function getDeploymentSettings(): Promise<DeploymentWithSettings>

Return value

id?: string | undefined;
Deployment id.
created_at?: string | undefined;
Creation timestamp.
updated_at?: string | undefined;
Last update timestamp.
maintenance_mode?: boolean | undefined;
Whether maintenance mode is enabled.
backend_host?: string | undefined;
Backend host for the deployment.
frontend_host?: string | undefined;
Frontend host for the deployment.
mail_from_host?: string | undefined;
Mail-from host configuration.
publishable_key?: string | undefined;
Deployment publishable key.
mode?: 'production' | 'staging' | undefined;
Deployment mode.
auth_settings?: Record<string, unknown> | undefined;
Resolved auth settings object when configured.
password_min_length?: number | undefined;
Minimum allowed password length.
mfa_enabled?: boolean | undefined;
Whether MFA is enabled by policy.
mfa_methods?: Array<'totp' | 'sms' | 'email'> | undefined;
Allowed MFA methods.
session_timeout?: number | undefined;
Session timeout in seconds.
ui_settings?: Record<string, unknown> | undefined;
Resolved UI settings object when configured.
display_name?: string | undefined;
Deployment display name.
primary_color?: string | undefined;
Primary brand color.
theme?: 'light' | 'dark' | 'auto' | undefined;
Default theme mode.
locale?: string | undefined;
Default locale.
timezone?: string | undefined;
Default timezone id.
b2b_settings?: Record<string, unknown> | undefined;
Resolved B2B settings object when configured.
organizations_enabled?: boolean | undefined;
Whether organizations are enabled.
workspaces_enabled?: boolean | undefined;
Whether workspaces are enabled.
allow_users_to_create_orgs?: boolean | undefined;
Whether users can self-create organizations.
max_allowed_org_members?: number | undefined;
Maximum members per organization.
max_allowed_workspace_members?: number | undefined;
Maximum members per workspace.
restrictions?: Record<string, unknown> | undefined;
Resolved restrictions object when configured.
sign_up_mode?: 'public' | 'restricted' | 'waitlist' | undefined;
Signup policy mode.
block_disposable_emails?: boolean | undefined;
Whether disposable emails are blocked.
waitlist_collect_names?: boolean | undefined;
Whether waitlist collects user names.
session_token_lifetime?: number | undefined;
Session token lifetime in seconds.
session_inactive_timeout?: number | undefined;
Session inactivity timeout in seconds.
domain_verification_records?: DomainVerificationRecords | undefined;
Domain DNS verification records when present.
email_verification_records?: EmailVerificationRecords | undefined;
Email DNS verification records when present.
email_provider?: 'postmark' | 'custom_smtp' | undefined;
Effective outbound email provider.
custom_smtp_config?: CustomSmtpConfig | undefined;
SMTP configuration summary when custom SMTP is configured.
host?: string | undefined;
Configured SMTP host.
port?: number | undefined;
Configured SMTP port.
username?: string | undefined;
Configured SMTP username.
from_email?: string | undefined;
Configured sender email.
use_tls?: boolean | undefined;
Whether TLS is enabled.
verified?: boolean | undefined;
Whether SMTP credentials have been verified.

What it does

Reads the deployment root settings route and returns one merged deployment payload.
Use it when you need a single snapshot that includes deployment metadata and resolved settings domains.

Return shape notes

Top-level deployment fields are typed explicitly in the SDK.
Nested auth_settings, ui_settings, b2b_settings, and restrictions are currently modeled as generic objects in the Node SDK, so treat them as pass-through backend payloads unless you narrow them in your own app.

Examples

Read deployment mode and hosts

import { wachtClient } from '@wacht/nextjs/server';export async function getDeploymentInfo() {  const client = await wachtClient();  const settings = await client.settings.getDeploymentSettings();  return {    id: settings.id,    mode: settings.mode,    backend: settings.backend_host,    frontend: settings.frontend_host,  };}

Check whether custom SMTP is active

import { wachtClient } from '@wacht/nextjs/server';export async function isCustomSmtpActive() {  const client = await wachtClient();  const settings = await client.settings.getDeploymentSettings();  return settings.email_provider === 'custom_smtp' && !!settings.custom_smtp_config?.verified;}

Read high-level settings flags for admin bootstrapping

import { wachtClient } from '@wacht/nextjs/server';export async function getSettingsFlags() {  const client = await wachtClient();  const settings = await client.settings.getDeploymentSettings();  return {    hasAuthSettings: !!settings.auth_settings,    hasUiSettings: !!settings.ui_settings,    hasB2BSettings: !!settings.b2b_settings,    hasRestrictions: !!settings.restrictions,  };}

On this page