Capacity
Sub-account capacity
Each sub-account has its own concurrent-call and CPS limits, and you can increase them separately.
Every sub-account has capacity of its own. Its calls are checked against its own concurrent-call and CPS limits, not yours, and your calls don't use its capacity. One busy customer can't block your calls or another customer's.
- A new sub-account starts with the platform's included capacity.
- Capacity bought for a sub-account raises only that sub-account.
- Every charge comes from your (the master account's) wallet, and shows against the sub-account in your transactions.
- The rules are the same as increasing your own capacity.
Buy capacity for a sub-account
Call the capacity routes with your own credentials and the X-Sub-Account-ID header. Use the sub-account's UUID or Auth ID. Your account ID in the path is replaced with the sub-account's.
curl -X POST "https://api.tryvox.io/v1/account/$TRYVOX_AUTH_ID/channels/purchase" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN" \
-H "X-Sub-Account-ID: $SUBACCOUNT_ID" \
-H "Content-Type: application/json" \
-d '{"channel_quantity": 5, "cps_quantity": 1, "currency": "INR"}'Every route on Increase capacity works this way: overview, history, cancel, resume and renew. To see the sub-account's calls running now, send the same header to current usage.
Only the owner or a team admin of the master account can do this.
When the sub-account buys it
A sub-account with its own login or API key can view and buy its capacity at /v1/account/{its_auth_id}/channels, and from Capacity in the app. The charge still comes from your wallet.
When the purchase is refused
| Status | Code | Reason |
|---|---|---|
| 422 | INSUFFICIENT_FUNDS | Your wallet is too low. Add funds and try again. A sub-account can't recharge your wallet, so no recharge order is returned |
| 403 | FORBIDDEN | The sub-account is closed or suspended |
| 403 | FORBIDDEN | An older sub-account login without its own account shares your capacity. Buy capacity on your own account |
When a sub-account is closed or suspended
Its add-ons aren't renewed, so you aren't charged for them again. They end at the end of the current 30 days.