DocumentationMulti-tenant
Multi-tenant
X-Tenant-Id header and data isolation.
MailingCore is multi-tenant: each organization (tenant) has isolated data — domains, templates, logs, contacts, and independent quotas.
Required header
On almost all routes (except public auth and health):
X-Tenant-Id: clxxxxxxxxxxxxxxxx
Get IDs with GET /tenants after authenticating with JWT. The dashboard stores the selected tenant and sends it automatically.
Isolation
- An admin only accesses tenants where they are a member
- API keys belong to one tenant; they do not cross data between organizations
- Prisma queries filter by
tenantIdon every operation
Members and roles
| Action | Endpoint |
|---|---|
| List members | GET /tenants/:id/members |
| Invite | POST /tenants/:id/members |
| Change role | PATCH /tenants/:id/members/:adminId |
| Remove | DELETE /tenants/:id/members/:adminId |