/v1/apps/{app_id}/notification-settingsAuthUpdate the per-app notification settings. Each field is independently optional; null clears that slot.
Turning `notifications_via_envoi` on (from off) creates the default template of every empty slot in the workspace's Mail templates (`auth-verification`, `auth-welcome`, `auth-password-reset`, `auth-invite`, `auth-mfa-code`, `auth-sign-in`), reusing a template that already has that name, and fills the slot. Templates are created with your own Mail access; a slot that could not be created stays empty. A slot you clear later is not refilled until emails are switched off and on again, or you name it in `seed_defaults`.
Path parameters
app_id*stringId of the app.
Request body
notifications_via_envoibooleanMaster switch. When false (default) no notification mail goes out — customers handle email via webhooks. When true, every populated template slot fires through the workspace Mail domain.
sender_modeenum (2)Where the From comes from. `workspace` (the default for new apps): the workspace default sender set in Mail, resolved at send time, so changing it in Mail changes it for every product. `custom`: `default_sender_address`. Sending `default_sender_address` without `sender_mode` sets `custom`.
Example: "workspace"
default_sender_addressstring · emailThe From used when `sender_mode` is `custom` (kept, but unused, in `workspace` mode). Must belong to a verified domain owned by this app's workspace. null clears it. Setting it without `sender_mode` switches the app to `custom`.
verification_template_namestringMail template name fired when an end-user needs to verify their email. Must already exist in the workspace template store.
welcome_template_namestringMail template name fired right after an end-user verifies their email (welcome message).
password_reset_template_namestringMail template name fired when an end-user requests a password reset.
invite_template_namestringMail template name fired when an end-user is invited into the app (`POST /v1/apps/:appId/end-users/invites` with an `email`). Until this slot is populated the invite row is still created and the code returned, but no email is dispatched.
mfa_code_template_namestringMail template name fired when an email-type MFA factor needs a sign-in / step-up code delivered. Required (along with the master switch + sender) before email MFA factors can complete a challenge.
sign_in_template_namestringMail template for passwordless email sign-in (magic link and/or code). Required before email sign-in (`auth_config.passwordless_email`) can send. Variables: `appName`, `code`, `signInUrl`, `expiresInMinutes`.
seed_defaultsarrayCreate the default template for these slots when they are empty, as switching emails on does (for a slot added after you switched them on). Slots that already name a template are left alone. Values: `verification`, `welcome`, `password_reset`, `invite`, `mfa_code`, `sign_in`.
web_originstringPublic origin of the customer's portal (e.g. `https://portal.dispute.markets`). Used to build clickable buttons in the verification + password-reset emails. Must be `https://host[:port]` or `http://localhost[:port]`; no path, no userinfo. Null clears the override and falls back to code-only delivery.
Response · 200 Updated settings.
app_id*stringApp UUID.
notifications_via_envoi*booleanMaster switch — when true, every populated template slot fires through the workspace Mail domain.
sender_mode*objectWhere the From comes from: `workspace` (the workspace default sender set in Mail; the default for new apps) or `custom` (`default_sender_address`). Apps that had an address before this setting existed are `custom`.
Example: "workspace"
effective_sender*objectThe sender Auth emails actually go out from, with its live verification status in Mail.
default_sender_address*stringThe From used when `sender_mode` is `custom`; `null` when unset.
verification_template_name*stringMail template fired for end-user email verification; `null` when unset.
welcome_template_name*stringMail template fired right after a successful verification.
password_reset_template_name*stringMail template fired on password-reset request.
invite_template_name*stringMail template fired when an end-user is invited into the app; `null` when unset (the invite row and code are still created, but no email goes out).
mfa_code_template_name*stringMail template fired to deliver email-MFA sign-in / step-up codes; `null` when unset (email MFA challenges fail loudly until configured).
sign_in_template_name*stringMail template for passwordless email sign-in (magic link and/or code); `null` when unset (email sign-in answers 412 until configured).
web_origin*stringPublic origin of the customer's portal used to render clickable buttons in verification + password-reset emails (`https://host[:port]` or `http://localhost[:port]`); `null` when unset.
created_at*string · date-timeRow created at, ISO 8601.
updated_at*string · date-timeRow last updated at, ISO 8601.
Example
Request
PATCH https://api.auth.productcraft.co/v1/apps/{app_id}/notification-settings
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"notifications_via_envoi": false,
"sender_mode": "workspace",
"default_sender_address": "user@example.com",
"verification_template_name": "string",
"welcome_template_name": "string",
"password_reset_template_name": "string",
"invite_template_name": "string",
"mfa_code_template_name": "string",
"sign_in_template_name": "string",
"seed_defaults": [
"verification"
],
"web_origin": "string"
}import { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const appNotificationSettings = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").notificationSettings.update({ default_sender_address: "ada@example.com" });auth.admin.app(…).notificationSettings.update(params?, options?): Auth.AppNotificationSettings
Response
{
"app_id": "string",
"notifications_via_envoi": false,
"sender_mode": "workspace",
"effective_sender": {},
"default_sender_address": "string",
"verification_template_name": "string",
"welcome_template_name": "string",
"password_reset_template_name": "string",
"invite_template_name": "string",
"mfa_code_template_name": "string",
"sign_in_template_name": "string",
"web_origin": "string",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}