Multi-Tenant In-App Notifications
Target notifications to specific tenants, companies, or organizations. Use custom attributes like tenant_id to send to all users within a tenant, target by role, or broadcast company-wide announcements. Built for B2B SaaS multi-tenancy patterns.
Use Cases
Multi-tenant notification patterns
B2B SaaS apps serve multiple companies from a single codebase. Notilayer lets you target notifications precisely within your multi-tenant architecture.
Company-Wide Announcements
Broadcast a message to every user within a specific tenant. Maintenance windows, policy updates, or new feature rollouts scoped to one company.
Role-Based Alerts
Target admins within a tenant for billing alerts, or notify only engineers about deployment updates. Combine tenant_id with role for precision.
Tenant-Specific Updates
One tenant migrating to a new data region? Notify only their users. Custom configurations, SLA changes, or account-specific news stay scoped.
Cross-Tenant Admin Notifications
Platform-level admins managing multiple tenants need visibility across organizations. Send operational alerts that span your entire customer base.
Segmentation
How segmentation works for multi-tenant apps
Define custom attributes on each user profile to represent your multi-tenant structure. Use tenant_id, company, org, or any key-value pair that maps to your data model. Then target notifications using those attributes as segment filters.
By Tenant ID
Send to all users in a specific tenant. tenant_id:acme-corp
By Tenant + Role
Target only admins within a company. tenant_id:acme-corp,role:admin
By Organization Unit
Notify a specific department within a tenant. tenant_id:acme-corp,org:engineering
By Company Attribute
Use company name as an alternative identifier. company:Acme Corp
Set tenant attributes via the API
curl -X POST https://api.notilayer.com/v1/users \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"userId": "user_456",
"attributes": {
"tenant_id": "acme-corp",
"company": "Acme Corp",
"role": "admin",
"org": "engineering"
}
}' Code Example
Send to all users in a specific tenant
One API call targets every user matching the tenant_id attribute. No need to look up individual user IDs or maintain static recipient lists. Notilayer resolves the segment dynamically and delivers via real-time SSE.
- Segment by
tenant_idfor company-wide delivery - Combine with
roleororgfor targeted sub-groups - New users added to the tenant are included automatically
- Works from any language that can make HTTP requests
JavaScript / Node.js example
// Send to all users in tenant "acme-corp"
const response = await fetch(
'https://api.notilayer.com/v1/notify',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
segment: { tenant_id: 'acme-corp' },
title: 'System maintenance tonight',
body: 'Scheduled maintenance from 2-4 AM UTC.',
}),
}
); Benefits
Why B2B SaaS teams choose Notilayer for multi-tenant notifications
Tenant Isolation Out of the Box
Each user only sees notifications meant for them. The widget filters by authenticated user, so tenant data never leaks across organizations.
Flexible Attribute Schema
No rigid data model. Define tenant_id, company, org, team, department, or any custom attribute that maps to your multi-tenant structure.
Flat, Predictable Pricing
No per-event or per-notification fees. Multi-tenant segmentation is included in all plans. Scale to thousands of tenants without surprise costs.
FAQ
Multi-tenant notification questions
How do I send notifications to all users in a specific tenant?
tenant_id attribute on each user profile via the REST API. Then use the batch notification endpoint with a segment filter like tenant_id:acme-corp to target all users belonging to that tenant. Notilayer matches the segment dynamically, so any new user added to the tenant will automatically be included in future notifications.Can I target by role within a tenant?
tenant_id:acme-corp,role:admin. This targets only admin users within the Acme Corp tenant. You can combine any number of custom attributes for precise targeting.How do I set up tenant-based user attributes?
POST /v1/users endpoint to create or update user profiles with custom attributes. Set tenant_id, company, org, role, or any other key-value pair that represents your multi-tenant structure. There is no predefined schema — define whatever attributes match your data model.Does Notilayer support multi-tenant SaaS architectures?
tenant_id and company. You can send notifications to all users in a tenant, target by role within a tenant, or broadcast across all tenants. The widget only shows notifications relevant to the authenticated user, maintaining tenant isolation.Explore more: Home · Segmentation API · B2B SaaS Inbox
Add Multi-Tenant Notifications to Your B2B SaaS
Target tenants, companies, and roles with one API. Segmentation included in all plans. Start free.