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
rangestringChart 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"

Response

200 with a JSON object.

Field Description
concurrentobjectConcurrent calls now, today and over the last 24 hours.
concurrent.nowintegerCalls in progress now.
concurrent.limitintegerYour plan's concurrent call limit.
concurrent.peak_todayintegerMost concurrent calls since 00:00 UTC today.
concurrent.sparkarray of integerMost concurrent calls; 12 values, one per two-hour bucket over the last 24 hours, oldest first.
registrationsobjectRegistration status.
registrations.onlineintegerRegistrations that are registered now.
registrations.totalintegerEnabled registration endpoints.
registrations.failingobjectFailing (failed or disabled) registrations counted by last SIP status (unknown without one).
registrations.sparkarray of integerRegistrations that were up and never down in the bucket; 12 values, one per two-hour bucket over the last 24 hours, oldest first.
minutesobjectMinutes of calls answered this month.
minutes.directnumberDirect minutes of calls answered this month (UTC), rounded to 0.1; test calls don't count.
minutes.relaynumberRelay minutes of calls answered this month (UTC), rounded to 0.1; test calls don't count.
minutes.includedintegerMinutes included in your plan per month.
minutes.sparkarray of numberMinutes of calls answered in each bucket; 12 values, one per two-hour bucket over the last 24 hours, oldest first.
successobjectCall success.
success.ratenumberSuccess rate over the last 24 hours, 0–1 (1 when there were no calls).
success.callsintegerCalls in the last 24 hours.
success.previous_ratenumberSuccess rate over the 24 hours before that.
success.sparkarray of numberSuccess rate; 12 values, one per two-hour bucket over the last 24 hours, oldest first.
chartobjectConcurrent-call chart for the requested range.
chart.rangestring24h, 7d or 30d, as requested.
chart.bucket_secondsintegerBucket length: 900 (24h), 7200 (7d) or 28800 (30d).
chart.pointsarray of objects96 (24h), 84 (7d) or 90 (30d) buckets, oldest first.
chart.points[].tstring (date-time)Start of the bucket.
chart.points[].vintegerMost concurrent calls in the bucket.
connectionobjectSIP address, static IP and edge state.
connection.public_ipstringYour static IP: add it to your carrier's allow list.
connection.sip_domainstringYour team's SIP address.
connection.regionstringRegion of the edge.
connection.edge_syncedbooleanWhether an edge node seen in the last 60 seconds runs your latest settings with its SIP service up.
connection.edge_lag_secondsintegercan be nullSeconds since an edge node last reported; null if never.
connection.edge_sip_okbooleanfalse when no recently seen edge node has its SIP service up.
connection.edge_sip_down_sincestring (date-time)can be nullSince when the SIP service is down; null when up.
json
{
  "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_error422A 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
monthsintegerHow 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"

Response

200 with a JSON array; each item has these fields.

Field Description
monthstring (date)First day of the month.
direct_minutesnumberDirect minutes of answered calls, rounded to 0.1.
relay_minutesnumberRelay minutes of answered calls, rounded to 0.1.
callsintegerAnswered calls. Test calls don't count.
peak_concurrencyintegerMost concurrent answered calls.
endpointsintegerEndpoints that existed during the month, deleted ones included.
planstringPlan the month is billed with: trial, starter, pro or business.
included_minutesintegerMinutes included in that plan.
extra_endpointsintegerEndpoints above the plan's included endpoints.
extra_endpoints_usdinteger1 USD per extra endpoint.
overageobjectMinutes over the plan and their cost.
overage.direct_minutesnumberDirect minutes over the included minutes.
overage.relay_minutesnumberRelay minutes over the included minutes.
overage.cost_usdnumberCost of those minutes: 0.0015 USD per Direct minute, 0.003 USD per Relay minute.
overage.cap_usdnumberMost the minutes can cost: 3 USD per concurrent call at the month's peak.
overage.billable_usdnumberThe amount billed: cost_usd, at most cap_usd.
json
[
  {
    "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_error422A 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"

Response

200 with a JSON object.

Field Description
planstringYour plan: trial, starter, pro or business.
limitsobjectYour plan's limits.
limits.endpoints_includedintegerEndpoints included; each one above costs 1 USD per month.
limits.endpoints_maxintegercan be nullMost endpoints you can have; null for no limit.
limits.channelsintegerConcurrent calls.
limits.minutes_includedintegerMinutes included per month.
limits.price_usdintegerMonthly price in USD, before tax (0 for the trial).
statestringtrial; 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_atstring (date-time)can be nullWhen the trial ends or ended; null without a trial.
grace_ends_atstring (date-time)can be nullIn trial and grace: when new calls stop without payment; in blocked: when they stopped. Otherwise null.
subscriptionobjectcan be nullYour Stripe subscription; null without one.
subscription.statusstringStripe's subscription status, e.g. active, past_due or canceled.
subscription.current_period_endstring (date-time)can be nullEnd of the current billing period.
subscription.cancel_at_period_endbooleantrue when the subscription ends at current_period_end.
subscription.intervalstringBilling period: month or year. One of: month, year.
subscription.pending_changeobjectcan be nullA plan change waiting for the end of the billing period; null without one.
subscription.pending_change.planstringPlan after the change.
subscription.pending_change.intervalstringBilling period after the change. One of: month, year.
subscription.pending_change.effective_atstring (date-time)can be nullWhen the change takes effect.
processingbooleantrue for up to 10 minutes after checkout, until the payment is confirmed.
usageobjectThis month's usage.
usage.endpointsintegerEndpoints you have now.
usage.extra_endpointsintegerEndpoints this month above the plan's included endpoints (deleted ones count too).
usage.extra_endpoints_usdinteger1 USD per extra endpoint.
usage.over_limitintegerEndpoints above the plan's maximum, e.g. after a downgrade; 0 without a maximum.
usage.minutes_directnumberDirect minutes of calls answered this month.
usage.minutes_relaynumberRelay minutes of calls answered this month.
usage.peak_concurrency_monthintegerMost concurrent answered calls this month.
usage.overageobjectMinutes over the plan and their cost so far.
usage.overage.direct_minutesnumberDirect minutes over the included minutes.
usage.overage.relay_minutesnumberRelay minutes over the included minutes.
usage.overage.cost_usdnumberCost of those minutes: 0.0015 USD per Direct minute, 0.003 USD per Relay minute.
usage.overage.cap_usdnumberMost the minutes can cost: 3 USD per concurrent call at the month's peak.
usage.overage.billable_usdnumberThe amount billed: cost_usd, at most cap_usd.
plansarray of objectsPaid plans.
plans[].endpoints_includedintegerEndpoints included; each one above costs 1 USD per month.
plans[].endpoints_maxintegercan be nullMost endpoints you can have; null for no limit.
plans[].channelsintegerConcurrent calls.
plans[].minutes_includedintegerMinutes included per month.
plans[].price_usdintegerMonthly price in USD, before tax (0 for the trial).
plans[].codestringPlan code: starter, pro, business.
plans[].annual_price_usdintegerYearly price in USD, before tax, when paid annually (ten times the monthly price).
annual_availablebooleanWhether plans can be paid annually.
pricingobjectPricing terms.
pricing.currencystringCurrency of every price.Default: USD.
pricing.tax_includedbooleanWhether prices include tax.Default: false.
pricing.direct_usd_per_minutenumberPrice of a Direct minute over the included minutes.
pricing.relay_usd_per_minutenumberPrice of a Relay minute over the included minutes.
pricing.cap_usd_per_channelintegerMinutes over the plan cost at most this much per concurrent call at the month's peak.
pricing.extra_endpoint_usdintegerMonthly price of each endpoint above the included ones.
pricing.overage_billingstringOverage and extra endpoints are invoiced after the month ends.Default: manual_month_end.
pricing.timeout_billable_minutesintegerA call that ends by timeout (no BYE) is billed for at most this many minutes.
pricing.trial_daysintegerLength of the trial in days.
pricing.grace_daysintegerDays calls stay open after the trial or a subscription ends.
pricing.cdr_retention_daysintegercan be nullCall records are anonymized after this many days; null if no retention period applies.
json
{
  "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
  }
}