Multi-Tenancy
Gravity SMS is a multi-tenant system. Each tenant operates as an isolated organization with its own RingCentral connection, applications, and message history.
What is a tenant?
A tenant represents a single organization or business unit within the gateway. Each tenant has:
- A unique identifier in the format
tenant_+ 16 hex characters (e.g.,tenant_abc123def456abcd). - Its own RingCentral account connection and phone numbers.
- One or more apps, each with its own API key.
- A status that controls access:
active,suspended, orinactive.
Data isolation
Tenant data is strictly isolated. An app-role API key can only access resources belonging to its own tenant:
| Resource | Scope |
|---|---|
| Messages | Filtered to the app's tenant. An app can only send from and query messages within its own tenant. |
| Apps | App-role keys can only view and manage apps within their own tenant. |
| RingCentral connection | Each tenant has its own independent RingCentral OAuth connection and phone numbers. |
| WebSocket events | Events are scoped to the authenticated connection's tenant and app. |
Tenant status
A tenant's status determines whether its apps can make API requests:
| Status | Effect |
|---|---|
active | Full access. Apps can send and receive messages. |
suspended | API requests return 403 Tenant suspended or inactive. Messages in the queue will fail. |
inactive | Same as suspended. The tenant is fully disabled. |
If your API requests return
403 Tenant suspended or inactive, check your subscription status in the dashboard or contact support to restore access.Roles and tenants
API keys have one of two roles, which interact with the tenant model:
- API keys are scoped to your account. Each key can only access resources within your own account.
Working with your tenant
Your API key is associated with a specific tenant. The tenantId is included in API responses and WebSocket events so you can correlate data in your system:
- Message objects include a
tenantIdfield. - WebSocket events include
tenantIdfor routing. - The messages API accepts
tenantIdas a query filter.
Related docs
- Authentication — Roles and API key scoping
- Connecting RingCentral — Per-tenant RingCentral setup
- Security — Data protection and isolation