Subscriptions
A subscription is the top-level organizational unit in Omnix. All contacts, conversations, channels, campaigns, and templates belong to a subscription. Your API key is scoped to exactly one subscription.
How Scoping Works
Every API call you make is automatically scoped to the subscription that issued the API key. You do not pass a subscriptionId in request parameters — it is inferred from your key.
The subscriptionId is returned in every API response for reference:
{
"success": true,
"message": "Pong!",
"subscriptionId": "64a1b2c3d4e5f6a7b8c9d0e1",
"userId": "64a1b2c3d4e5f6a7b8c9d0e2"
}What Belongs to a Subscription
| Resource | Scoped? |
|---|---|
| Contacts | ✅ Per subscription |
| Conversations | ✅ Per subscription |
| Channels (WhatsApp, email, SMS) | ✅ Per subscription |
| Templates | ✅ Per subscription |
| Campaigns & Audiences | ✅ Per subscription |
| Extensions & Call Queues | ✅ Per subscription |
| API Keys | ✅ Per subscription |
| Users & Agents | ✅ Per subscription |
Multi-Subscription Scenarios
If your platform hosts multiple Omnix workspaces (e.g., white-label or reseller setups), each workspace has its own subscription and its own set of API keys. Operate on each subscription by using the corresponding key.
A contact with the same email address can exist independently in two different subscriptions — they are separate records with separate conversation histories.
Finding Your Subscription ID
Your subscriptionId is returned by OmnixGatewayRpc.ping. Run it once and store the value for logging and support:
curl -s -X POST "$OMNIX_URL/api/rpc" \
-H "Content-Type: application/json" \
-H "x-api-key: $OMNIX_KEY" \
-d '{"method": "OmnixGatewayRpc.ping", "params": {}}'Related
- Authentication — API key scoping
- Contacts — How contacts are isolated per subscription
- OmnixGatewayRpc — Gateway API reference