How Customermates is built, how data is isolated, and how external AI access is controlled.
Customermates enforces a single-tenant-per-company data model at every layer. Every record is scoped to a company, API keys carry the owning user's identity, and agents see only what that user can see.
Every record belongs to a Company. The company id is enforced in three places:
companyId in every where.@TenantInteractor makes interactors that fail to scope throw at runtime.Cross-tenant reads are not possible through the public surface. There is no admin panel that bypasses scope.
Three ways to authenticate:
Secure under HTTPS.x-api-key header.All methods resolve to the same user and company context.
Per-user and role-driven. Roles carry permissions on resources (contacts, organizations, deals, services, tasks) and actions (read, create, update, delete). Every interactor calls userService.hasPermissionOrThrow(resource, action) before acting.
API keys inherit the permissions of their owning user. There is no per-key scoping.
MCP requests use the same authentication and authorization path. When an agent acts through MCP:
/api/v1/mcp with an API key or an OAuth Bearer token.The MCP surface adds input guardrails to keep tool calls safe:
null on a relation array is rejected before it reaches the database.See MCP for the full tool catalog.
.env are never logged. The logger redacts anything that looks like a key, token, or password.Every write is logged with user, action, entity, and before and after values. It is queryable from the UI and exportable as JSON. Audit logging is included on every cloud plan. The self-hosted community edition does not include audit logging.
Please disclose responsibly to security@customermates.com. The PGP key is in the repository. We aim to acknowledge within 24 hours.