Get Call Limits
Read your organisation's call limits. These limits are a pool. All your SF Trunks and SFVoPI apps share them.
Organisation call limits ship with the org-limits release.
Requires an API key in the X-API-Key header, or the session of the account owner or a manager. See Authentication.
How the limits work
Your organisation has three limits:
| Limit | What it controls |
|---|---|
| Concurrent calls | How many calls can be in progress at the same time, across all your trunks and apps |
| CPS | How many new calls per second you can start, across all your trunks and apps |
| Peak CPS | The most new calls you can start in one burst, across all your trunks and apps |
Superfone sets these limits for your account. You cannot change them yourself. To raise a limit, email hello@superfone.in.
Inbound and outbound calls count against the same limits.
Each trunk and each app can also have its own lower limits. By default it has none, and only the organisation pool applies. A trunk's or app's own limit can never be higher than the organisation's. To set them, see Update a trunk and Update App.
A call must fit within its own trunk's or app's limits, and within the organisation's. If it does not, we refuse it straight away. We never queue it.
HTTP Request
GET /call-limits
Base URL: https://prod-api.superfone.co.in/superfone
Code Examples
- cURL
- JavaScript
- TypeScript
- Python
curl https://prod-api.superfone.co.in/superfone/call-limits \
-H "X-API-Key: your_api_key_here"
const response = await fetch('https://prod-api.superfone.co.in/superfone/call-limits', {
headers: {
'X-API-Key': 'your_api_key_here'
}
});
const result = await response.json();
console.log(result.data);
interface CallLimits {
concurrent_limit: number;
cps_limit: number;
cps_burst: number;
}
const response = await fetch('https://prod-api.superfone.co.in/superfone/call-limits', {
headers: {
'X-API-Key': 'your_api_key_here'
}
});
const result: { data: CallLimits; message: string } = await response.json();
console.log(result.data);
import requests
url = 'https://prod-api.superfone.co.in/superfone/call-limits'
headers = {'X-API-Key': 'your_api_key_here'}
response = requests.get(url, headers=headers)
print(response.json()['data'])
Success Response
Status Code: 200 OK
{
"data": {
"concurrent_limit": 30,
"cps_limit": 10,
"cps_burst": 20
},
"message": "success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
concurrent_limit | number | Calls in progress at once, across your organisation |
cps_limit | number | New calls per second, across your organisation |
cps_burst | number | Peak CPS: the most new calls you can start in one burst. At least cps_limit |
Error Responses
| Status Code | Message | When It Occurs |
|---|---|---|
401 | UnAuthorized, Please Provide Valid API Key | The API key is not valid |
401 | UnAuthorized, Please Login | No valid key and no valid session |
403 | Only owners and managers can perform this action | You are signed in with a session, but not as the owner or a manager of the account |
When a call is over a limit
| Product | Outbound | Inbound |
|---|---|---|
| SFVoPI | Initiate Call returns 429. See Call Limits | SIP 503 before answer. Your answer_url is not called |
| SF Trunk | Your PBX gets SIP 503 | The call is not delivered to your server |
See Limits and billing for SF Trunk.