Docs API reference
Usage and billing
Live usage figures, monthly minutes with overage, and your plan with its limits and prices.
Examples read your API key from RELAYDOCK_API_KEY (see Authentication). Paths are relative to https://api.relaydock.io/api/v1.
Get the usage overview
GET/usage/overview
Returns the numbers behind the panel's overview: concurrent calls, registrations, this month's minutes, call success over the last 24 hours, a concurrent-call chart for range, and the edge connection. Every spark has 12 two-hour buckets covering the last 24 hours, oldest first.
Query parameters
| Field | Description |
|---|---|
range | Chart range: 24h (15-minute buckets), 7d (2-hour) or 30d (8-hour). One of: 24h, 7d, 30d. Default: 24h. |
Example request
curl "https://api.relaydock.io/api/v1/usage/overview?range=7d" \
-H "Authorization: Bearer $RELAYDOCK_API_KEY"import os
import requests
response = requests.get(
"https://api.relaydock.io/api/v1/usage/overview",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
params={"range": "7d"},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/usage/overview?range=7d', {
headers: {
'Authorization': `Bearer ${process.env.RELAYDOCK_API_KEY}`,
},
})
if (!response.ok)
throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())Response
200 with a JSON object.
| Field | Description |
|---|---|
concurrent | Concurrent calls now, today and over the last 24 hours. |
concurrent.now | Calls in progress now. |
concurrent.limit | Your plan's concurrent call limit. |
concurrent.peak_today | Most concurrent calls since 00:00 UTC today. |
concurrent.spark | Most concurrent calls; 12 values, one per two-hour bucket over the last 24 hours, oldest first. |
registrations | Registration status. |
registrations.online | Registrations that are registered now. |
registrations.total | Enabled registration endpoints. |
registrations.failing | Failing (failed or disabled) registrations counted by last SIP status (unknown without one). |
registrations.spark | Registrations that were up and never down in the bucket; 12 values, one per two-hour bucket over the last 24 hours, oldest first. |
minutes | Minutes of calls answered this month. |
minutes.direct | Direct minutes of calls answered this month (UTC), rounded to 0.1; test calls don't count. |
minutes.relay | Relay minutes of calls answered this month (UTC), rounded to 0.1; test calls don't count. |
minutes.included | Minutes included in your plan per month. |
minutes.spark | Minutes of calls answered in each bucket; 12 values, one per two-hour bucket over the last 24 hours, oldest first. |
success | Call success. |
success.rate | Success rate over the last 24 hours, 0–1 (1 when there were no calls). |
success.calls | Calls in the last 24 hours. |
success.previous_rate | Success rate over the 24 hours before that. |
success.spark | Success rate; 12 values, one per two-hour bucket over the last 24 hours, oldest first. |
chart | Concurrent-call chart for the requested range. |
chart.range | 24h, 7d or 30d, as requested. |
chart.bucket_seconds | Bucket length: 900 (24h), 7200 (7d) or 28800 (30d). |
chart.points | 96 (24h), 84 (7d) or 90 (30d) buckets, oldest first. |
chart.points[].t | Start of the bucket. |
chart.points[].v | Most concurrent calls in the bucket. |
connection | SIP address, static IP and edge state. |
connection.public_ip | Your static IP: add it to your carrier's allow list. |
connection.sip_domain | Your team's SIP address. |
connection.region | Region of the edge. |
connection.edge_synced | Whether an edge node seen in the last 60 seconds runs your latest settings with its SIP service up. |
connection.edge_lag_seconds | Seconds since an edge node last reported; null if never. |
connection.edge_sip_ok | false when no recently seen edge node has its SIP service up. |
connection.edge_sip_down_since | Since when the SIP service is down; null when up. |
{
"concurrent": {
"now": 3,
"limit": 50,
"peak_today": 7,
"spark": [
0,
0,
1,
2,
4,
7,
5,
6,
3,
2,
1,
3
]
},
"registrations": {
"online": 4,
"total": 5,
"failing": {
"401": 1
},
"spark": [
5,
5,
5,
5,
5,
4,
4,
4,
4,
4,
4,
4
]
},
"minutes": {
"direct": 1840.5,
"relay": 312,
"included": 20000,
"spark": [
0,
0,
4.5,
12,
30.2,
41.7,
38,
25.3,
18.9,
9.1,
6.4,
3
]
},
"success": {
"rate": 0.982,
"calls": 112,
"previous_rate": 0.975,
"spark": [
1,
1,
1,
0.95,
1,
0.98,
1,
0.97,
1,
1,
1,
1
]
},
"chart": {
"range": "24h",
"bucket_seconds": 900,
"points": [
{
"t": "2026-03-14T09:00:00Z",
"v": 4
}
]
},
"connection": {
"public_ip": "203.0.113.10",
"sip_domain": "acme.sip.relaydock.io",
"region": "eu-nbg",
"edge_synced": true,
"edge_lag_seconds": 4,
"edge_sip_ok": true,
"edge_sip_down_since": null
}
}Errors
Besides the errors any request can return:
| Code | Status | When |
|---|---|---|
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Get monthly usage
GET/usage/monthly
Returns usage per calendar month (UTC), newest first, for up to months months and never before the month your team was created. The current month changes until it ends and uses your current plan; past months keep the plan they were billed with.
Query parameters
| Field | Description |
|---|---|
months | How many months, 1–24.Default: 6. |
Example request
curl "https://api.relaydock.io/api/v1/usage/monthly?months=3" \
-H "Authorization: Bearer $RELAYDOCK_API_KEY"import os
import requests
response = requests.get(
"https://api.relaydock.io/api/v1/usage/monthly",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
params={"months": 3},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/usage/monthly?months=3', {
headers: {
'Authorization': `Bearer ${process.env.RELAYDOCK_API_KEY}`,
},
})
if (!response.ok)
throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())Response
200 with a JSON array; each item has these fields.
| Field | Description |
|---|---|
month | First day of the month. |
direct_minutes | Direct minutes of answered calls, rounded to 0.1. |
relay_minutes | Relay minutes of answered calls, rounded to 0.1. |
calls | Answered calls. Test calls don't count. |
peak_concurrency | Most concurrent answered calls. |
endpoints | Endpoints that existed during the month, deleted ones included. |
plan | Plan the month is billed with: trial, starter, pro or business. |
included_minutes | Minutes included in that plan. |
extra_endpoints | Endpoints above the plan's included endpoints. |
extra_endpoints_usd | 1 USD per extra endpoint. |
overage | Minutes over the plan and their cost. |
overage.direct_minutes | Direct minutes over the included minutes. |
overage.relay_minutes | Relay minutes over the included minutes. |
overage.cost_usd | Cost of those minutes: 0.0015 USD per Direct minute, 0.003 USD per Relay minute. |
overage.cap_usd | Most the minutes can cost: 3 USD per concurrent call at the month's peak. |
overage.billable_usd | The amount billed: cost_usd, at most cap_usd. |
[
{
"month": "2026-03-01",
"direct_minutes": 1840.5,
"relay_minutes": 312,
"calls": 1264,
"peak_concurrency": 7,
"endpoints": 5,
"plan": "pro",
"included_minutes": 20000,
"extra_endpoints": 0,
"extra_endpoints_usd": 0,
"overage": {
"direct_minutes": 0,
"relay_minutes": 0,
"cost_usd": 0,
"cap_usd": 21,
"billable_usd": 0
}
}
]Errors
Besides the errors any request can return:
| Code | Status | When |
|---|---|---|
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Get billing
GET/billing
Returns your plan and its limits, the billing state, this month's usage and overage, the paid plans and the pricing terms. Choosing a plan and paying happen in the panel.
Example request
curl "https://api.relaydock.io/api/v1/billing" \
-H "Authorization: Bearer $RELAYDOCK_API_KEY"import os
import requests
response = requests.get(
"https://api.relaydock.io/api/v1/billing",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/billing', {
headers: {
'Authorization': `Bearer ${process.env.RELAYDOCK_API_KEY}`,
},
})
if (!response.ok)
throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())Response
200 with a JSON object.
| Field | Description |
|---|---|
plan | Your plan: trial, starter, pro or business. |
limits | Your plan's limits. |
limits.endpoints_included | Endpoints included; each one above costs 1 USD per month. |
limits.endpoints_max | Most endpoints you can have; null for no limit. |
limits.channels | Concurrent calls. |
limits.minutes_included | Minutes included per month. |
limits.price_usd | Monthly price in USD, before tax (0 for the trial). |
state | trial; active; past_due (the last payment failed, calls still open); grace (the trial or subscription ended, calls open until grace_ends_at); blocked (no active payment: new calls are rejected, registrations stay up); hold (new calls paused while a refund or dispute is reviewed). |
trial_ends_at | When the trial ends or ended; null without a trial. |
grace_ends_at | In trial and grace: when new calls stop without payment; in blocked: when they stopped. Otherwise null. |
subscription | Your Stripe subscription; null without one. |
subscription.status | Stripe's subscription status, e.g. active, past_due or canceled. |
subscription.current_period_end | End of the current billing period. |
subscription.cancel_at_period_end | true when the subscription ends at current_period_end. |
subscription.interval | Billing period: month or year. One of: month, year. |
subscription.pending_change | A plan change waiting for the end of the billing period; null without one. |
subscription.pending_change.plan | Plan after the change. |
subscription.pending_change.interval | Billing period after the change. One of: month, year. |
subscription.pending_change.effective_at | When the change takes effect. |
processing | true for up to 10 minutes after checkout, until the payment is confirmed. |
usage | This month's usage. |
usage.endpoints | Endpoints you have now. |
usage.extra_endpoints | Endpoints this month above the plan's included endpoints (deleted ones count too). |
usage.extra_endpoints_usd | 1 USD per extra endpoint. |
usage.over_limit | Endpoints above the plan's maximum, e.g. after a downgrade; 0 without a maximum. |
usage.minutes_direct | Direct minutes of calls answered this month. |
usage.minutes_relay | Relay minutes of calls answered this month. |
usage.peak_concurrency_month | Most concurrent answered calls this month. |
usage.overage | Minutes over the plan and their cost so far. |
usage.overage.direct_minutes | Direct minutes over the included minutes. |
usage.overage.relay_minutes | Relay minutes over the included minutes. |
usage.overage.cost_usd | Cost of those minutes: 0.0015 USD per Direct minute, 0.003 USD per Relay minute. |
usage.overage.cap_usd | Most the minutes can cost: 3 USD per concurrent call at the month's peak. |
usage.overage.billable_usd | The amount billed: cost_usd, at most cap_usd. |
plans | Paid plans. |
plans[].endpoints_included | Endpoints included; each one above costs 1 USD per month. |
plans[].endpoints_max | Most endpoints you can have; null for no limit. |
plans[].channels | Concurrent calls. |
plans[].minutes_included | Minutes included per month. |
plans[].price_usd | Monthly price in USD, before tax (0 for the trial). |
plans[].code | Plan code: starter, pro, business. |
plans[].annual_price_usd | Yearly price in USD, before tax, when paid annually (ten times the monthly price). |
annual_available | Whether plans can be paid annually. |
pricing | Pricing terms. |
pricing.currency | Currency of every price.Default: USD. |
pricing.tax_included | Whether prices include tax.Default: false. |
pricing.direct_usd_per_minute | Price of a Direct minute over the included minutes. |
pricing.relay_usd_per_minute | Price of a Relay minute over the included minutes. |
pricing.cap_usd_per_channel | Minutes over the plan cost at most this much per concurrent call at the month's peak. |
pricing.extra_endpoint_usd | Monthly price of each endpoint above the included ones. |
pricing.overage_billing | Overage and extra endpoints are invoiced after the month ends.Default: manual_month_end. |
pricing.timeout_billable_minutes | A call that ends by timeout (no BYE) is billed for at most this many minutes. |
pricing.trial_days | Length of the trial in days. |
pricing.grace_days | Days calls stay open after the trial or a subscription ends. |
pricing.cdr_retention_days | Call records are anonymized after this many days; null if no retention period applies. |
{
"plan": "pro",
"limits": {
"endpoints_included": 100,
"endpoints_max": null,
"channels": 50,
"minutes_included": 20000,
"price_usd": 99
},
"state": "active",
"trial_ends_at": "2026-04-01T10:15:00Z",
"grace_ends_at": null,
"subscription": {
"status": "active",
"current_period_end": "2026-04-02T10:15:00Z",
"cancel_at_period_end": false,
"interval": "month",
"pending_change": {
"plan": "starter",
"interval": "month",
"effective_at": "2026-12-18T10:15:00Z"
}
},
"processing": false,
"usage": {
"endpoints": 5,
"extra_endpoints": 0,
"extra_endpoints_usd": 0,
"over_limit": 0,
"minutes_direct": 1840.5,
"minutes_relay": 312,
"peak_concurrency_month": 7,
"overage": {
"direct_minutes": 0,
"relay_minutes": 0,
"cost_usd": 0,
"cap_usd": 21,
"billable_usd": 0
}
},
"plans": [
{
"endpoints_included": 100,
"endpoints_max": null,
"channels": 50,
"minutes_included": 20000,
"price_usd": 99,
"code": "pro",
"annual_price_usd": 990
}
],
"annual_available": true,
"pricing": {
"currency": "USD",
"tax_included": false,
"direct_usd_per_minute": 0.0015,
"relay_usd_per_minute": 0.003,
"cap_usd_per_channel": 3,
"extra_endpoint_usd": 1,
"overage_billing": "manual_month_end",
"timeout_billable_minutes": 15,
"trial_days": 14,
"grace_days": 7,
"cdr_retention_days": 90
}
}