The package defines three independent config sections: notification (SMS + push), mailer (email), and inbox (in-app notifications). Each has its own env prefix.
Section key: notification — loaded from notification: in application.yaml or via LEX_NOTIFICATION__* env vars.
account_sid : "${TWILIO_ACCOUNT_SID}"
auth_token : "${TWILIO_AUTH_TOKEN}"
from_number : "+15551234567"
server_key : "${FCM_SERVER_KEY}"
bundle_id : com.example.app
vapid_public_key : "${VAPID_PUBLIC_KEY}"
vapid_private_key : "${VAPID_PRIVATE_KEY}"
vapid_claims_subject : mailto:ops@example.com
Key Type Default Env Var Description sms_backendslist[NamedSMSConfig][](list) Named SMS backends push_backendslist[NamedPushConfig][](list) Named push backends
Key Type Default Description namestr(required) Backend name for Named() DI primaryboolFalseAlso register under unnamed SMSChannelProtocol driverstr"twilio"SMS driver name twilioTwilioDriverConfig | NoneNoneTwilio-specific config
Key Type Default Env Var Description account_sidstr | NoneNoneLEX_NOTIFICATION__SMS_BACKENDS__0__TWILIO__ACCOUNT_SIDTwilio Account SID auth_tokenstr | NoneNoneLEX_NOTIFICATION__SMS_BACKENDS__0__TWILIO__AUTH_TOKENTwilio Auth Token from_numberstr | NoneNone_ Twilio phone number (E.164) timeoutint30_ HTTP timeout (seconds)
Key Type Default Description namestr(required) Backend name for Named() DI primaryboolFalseAlso register under unnamed PushChannelProtocol driverstr"fcm"Push driver: fcm, apns, web_push fcmFCMDriverConfig | NoneNoneFCM-specific config apnsAPNsDriverConfig | NoneNoneAPNs-specific config web_pushWebPushDriverConfig | NoneNoneWeb Push config
Key Type Default Description server_keystr | NoneNoneFCM Server API Key timeoutint30HTTP timeout (seconds)
Key Type Default Description team_idstr | NoneNoneApple Developer Team ID (10 chars) key_idstr | NoneNoneAPNs Auth Key ID (10 chars) apns_auth_keystr | NoneNoneECDSA private key (PEM string or .p8 path) bundle_idstr | NoneNoneApp bundle identifier sandboxboolFalseUse APNs sandbox endpoint timeoutint30HTTP timeout (seconds)
Key Type Default Description vapid_private_keystr | NoneNoneVAPID private key (PEM-encoded EC prime256v1) vapid_public_keystr | NoneNoneVAPID public key (base64url) vapid_claims_subjectstr | NoneNoneVAPID claims subject URI timeoutint30HTTP timeout (seconds)
Section key: mailer — loaded from mailer: in application.yaml or via LEX_NOTIFICATION__MAILER__* env vars.
from_email : orders@example.com
api_key : "${SENDGRID_API_KEY}"
from_email : alerts@example.com
Key Type Default Env Var Description backendslist[NamedMailerConfig][](list) Named mailer backends
Key Type Default Description namestr(required) Backend name for Named() DI primaryboolFalseAlso register under unnamed MailerProtocol driverstr"smtp"Mailer driver: smtp, sendgrid from_emailstr | NoneNoneDefault sender email from_namestr | NoneNoneDefault sender name smtpSMTPDriverConfig | NoneNoneSMTP-specific config sendgridSendGridDriverConfig | NoneNoneSendGrid-specific config
Key Type Default Description hoststr"localhost"SMTP server hostname portint587SMTP port usernamestr | NoneNoneSMTP auth username passwordstr | NoneNoneSMTP auth password use_tlsboolTrueUse STARTTLS use_sslboolFalseUse SSL from connect (port 465) timeoutint30Connection timeout (seconds)
Key Type Default Description api_keystr | NoneNoneSendGrid API key timeoutint30HTTP timeout (seconds) sandbox_modeboolFalseSandbox mode (emails not sent)
Section key: inbox — loaded from inbox: in application.yaml or via LEX_NOTIFICATION__INBOX__* env vars.
mark_read_on_fetch : false
Key Type Default Env Var Description store_backendstr"database"LEX_NOTIFICATION__INBOX__STORE_BACKENDStorage: database or memory max_page_sizeint50LEX_NOTIFICATION__INBOX__MAX_PAGE_SIZEMax messages per page retention_daysint30LEX_NOTIFICATION__INBOX__RETENTION_DAYSDays before message pruning mark_read_on_fetchboolFalseLEX_NOTIFICATION__INBOX__MARK_READ_ON_FETCHAuto-mark read on fetch
All three sections use __ as the nested delimiter:
# Set Twilio credentials for the first SMS backend
export LEX_NOTIFICATION__SMS_BACKENDS__0__TWILIO__ACCOUNT_SID = "AC..."
# Set SendGrid API key for the mailer
export LEX_NOTIFICATION__MAILER__BACKENDS__0__SENDGRID__API_KEY = "SG..."
export LEX_NOTIFICATION__INBOX__RETENTION_DAYS = 90