When to use namespaces
Use namespaces when you need to:- Isolate inboxes by tenant. Each customer or account gets their own namespace, so queries are naturally scoped and there is no risk of data leaking between tenants.
- Group inboxes by team or function. A sales namespace, a support namespace, an operations namespace, each with its own set of addresses.
- Manage AI agent inboxes independently. An agent with multiple inboxes (for example, one per customer it serves) benefits from a dedicated namespace to track and query its memory.
The externalId field
Every namespace has an optional externalId field. Use it to store your own internal identifier, a tenant ID, an account UUID, a customer slug, directly on the namespace.
This eliminates the need for a separate mapping table. When a webhook event arrives or when you need to scope a query to a specific tenant, look up the namespace by externalId and filter from there.
Common patterns
Per-customer inboxes in a SaaS product
Each account in your product gets a namespace. Within that namespace, you create whatever inboxes that account needs:support@, billing@, notifications@. When a customer is deleted or suspended, you can disable the entire namespace in one call.
Because namespaces carry your externalId, a single API call is all it takes to go from “I have a tenant ID” to “here are all the inboxes and messages for that tenant”.
Per-client inboxes in an agency
An agency managing email for multiple clients creates one namespace per client. Each namespace gets a set of inboxes matched to that client’s domain and workflow. The agency’s internal system maps client IDs to namespace IDs viaexternalId and scopes all queries accordingly.
AI agent namespaces
An AI agent platform can give each agent, or each agent instance, its own namespace. The agent’s inboxes live inside that namespace, keeping its activity isolated from other agents. The agent memory API can then be queried scoped to specific inboxes and threads within the namespace.Create a namespace
Create request fields
| Field | Required | Description |
|---|---|---|
name | Yes | The display name of the namespace. Maximum 255 characters. |
externalId | No | An external identifier for mapping to your internal systems. Maximum 255 characters. |
List namespaces
Retrieve a namespace
Retrieve a single namespace with inbox statistics.Update a namespace
Update request fields
| Field | Description |
|---|---|
name | The display name. Maximum 255 characters. |
externalId | The external identifier. Set to null to clear. |
status | Set to active or disabled. |
Delete a namespace
Deleting a namespace is a soft delete. You cannot delete a namespace that still has active inboxes. Move or delete the inboxes first.List inboxes in a namespace
Retrieve the inboxes that belong to a specific namespace.Multi-tenant provisioning example
A common pattern is to create a namespace when a new tenant signs up, usingexternalId to map between your tenant IDs and Nuntly namespaces.
Next steps
Inboxes
Create and manage inboxes within namespaces
AI agent inboxes
Manage agent inboxes with namespaces
