Email & SMS Configuration
Tenant-specific email and SMS configuration for notification delivery.
Email
Source: src/modules/email/
Permission: MANAGE_EMAIL_CONFIG
Base path: /email-config
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /email-config | Create SMTP config |
GET | /email-config | Get config (password hidden) |
PATCH | /email-config/:id | Update config |
DELETE | /email-config/:id | Delete config |
POST | /email-config/send | Send email |
POST | /email-config/test | Test SMTP connection |
GET | /email-config/history | Notification history |
Implementation
- Uses Nodemailer with tenant-specific SMTP settings
- Password excluded from GET responses (
smtpPassworddestructured out) - Default port 587, TLS optional
- One config per tenant (create checks for existing)
SMS
Source: src/modules/sms/
Permission: MANAGE_SMS_CONFIG
Base path: /sms-config
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /sms-config | Create SMS config |
GET | /sms-config | Get config (secrets hidden) |
PATCH | /sms-config/:id | Update config |
DELETE | /sms-config/:id | Delete config |
POST | /sms-config/send | Send SMS |
POST | /sms-config/test | Test SMS delivery |
GET | /sms-config/history | Notification history |
Providers
- Twilio (default) —
twilioAuthTokenhidden from responses - AWS SNS —
awsSnsSecretKeyhidden from responses
Security
danger
Sensitive fields (smtpPassword, twilioAuthToken, awsSnsSecretKey) are never returned in API responses. They are destructured out in the service layer.
Prisma Models
EmailConfig— SMTP settings per tenantSmsConfig— SMS provider settings per tenantNotificationLog— Shared delivery history
Related Modules
NotificationsModule— Orchestrates multi-channel deliveryWhatsappModule— Additional messaging channel