Skip to main content

Overview

Tenant-specific inboxes enable you to create isolated notification experiences that respect your application’s organizational boundaries. By configuring tenant context in both your notification sending and SDK initialization, you can ensure users only see messages relevant to their current organizational context. This is particularly powerful for B2B SaaS applications where users may belong to multiple organizations, teams, or projects, each requiring separate notification streams.

Tenant Message Visibility

Messages sent with tenant context are only visible when the user is signed in with the same tenant ID. For example, if you send an inbox notification to user1 with context tenantA but do not sign the user in with tenantA, the user will not see the message. This isolation allows you to build inbox configurations that map to your different workspaces, ensuring users only see contextually relevant notifications.
TENANT AUTO-INFERCourier may also be auto-inferring the Tenant based on a single-user tenant membership, so if you have created tenant memberships, you need to set up your Inbox and Toast SDKs with a tenantId. More details on auto-infer here

SDK Configuration

Scope the Courier Inbox and Toast to a tenant by passing a tenantId when you authenticate the user with signIn. The tenant context applies to every component sharing that authentication instance.
Courier Inbox authenticates with a short-lived JWT. Generate one for your user on your backend and pass it to signIn — see Authentication.

React Components

With @trycourier/courier-react, sign the user in with a tenantId and render CourierInbox / CourierToast:
React
To switch tenants dynamically, call signIn again with the new tenantId to re-scope the feed. The tenantId is separate from authentication, so you can reuse the same user JWT — you only need a new token if it has expired.
React

JavaScript Components

For non-React apps, use the @trycourier/courier-ui-inbox web components and pass the tenantId to signIn:
HTML
To switch tenant context dynamically, call signIn again with the new tenantId. Pass the same user JWT you signed in with (refresh it only if it has expired):
JavaScript

Common Issues

Tenant Context Mismatch

If messages aren’t appearing in the inbox, verify that:
  • The message was sent with the same tenant_id used in SDK initialization
  • Auto-infer behavior isn’t affecting tenant context (see auto-infer documentation)
  • User has proper tenant membership if required

Tenants Overview

Learn about tenant hierarchies and auto-infer behavior

Courier Inbox SDK

Complete inbox implementation documentation