Dashboard
APIRenewal Calendar | Subscription Bot API
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Examples
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Renewal Calendar

Read daily renewal forecasts for your Telegram subscription bot or Discord subscription bot project.

GET/v2/projects/{project_id}/analytics/renewals/calendar

Authorization

Bearer API KeyRequired

API key scope: analytics:renewals:read for restricted keys. With apply_balance=true, also require payment-history:read. Unrestricted keys support both variants. Insufficient scope or financial access returns 403 FORBIDDEN.

Path Parameters

project_idstringrequired

Project UUID.

Query Parameters

range_typestring

days (default), weeks or months.

range_valueinteger

Positive length; maximum 365 days, 52 weeks or 12 months. Defaults: 30 days, 4 weeks or 1 month.

currencystring

Supported currency code: 3–9 uppercase letters or digits.

apply_balanceboolean|integer

true, false, 1 or 0; default false.

The range begins today in UTC and ends exclusively after the selected duration. All results contain daily rows, including zero-filled days. There is no pagination or request body. Invalid query values return 422 VALIDATION_ERROR.

Calendar response

data.calendar and data.meta are required. Every calendar row requires date (UTC ISO datetime at midnight), renewal_count (nonnegative integer), and expected_revenue (nonnegative decimal string). Optional expected_balance_offset and net_expected_revenue are nonnegative decimal strings, never null.

Revenue totals follow currency precision. Do not assume two decimal places or convert amounts to binary floating-point numbers. Use the decimal amount contract.

All metadata fields below are required unless marked optional.

FieldsType
range_typedays, weeks or months
range_valueInteger
start_date, end_dateUTC ISO datetime strings at midnight; end is exclusive
currencyString
currency_is_fallbackBoolean
total_renewals, omitted_percent, omitted_usage, subscription_renewal_count, zero_amount_count, below_threshold_count, omitted_no_base_plan, omitted_currency_mismatch, overdue_countIntegers
total_expected_revenueNonnegative decimal string
by_native_currency, excluded_revenue, below_threshold_by_native_currencyObjects mapping currency codes to nonnegative decimal strings; may be empty
conversion_errorsArray of objects requiring string from_currency, to_currency and reason
thresholdNull or object with required decimal-string amount and string currency; currently null for this endpoint
projectionObject requiring basis (run_rate or accrued), numeric max_factor and integer clamped_count; currently {basis:"accrued", max_factor:1, clamped_count:0}
forecast_limitationsString array
applied_balance, balance_unavailableOptional booleans
total_balance_offset, total_net_expected_revenueOptional nonnegative decimal strings
fx_excluded_from_offsetOptional integer

Optional balance fields accompany apply_balance=true and are not nullable. A failed lookup can return a successful gross-only result with applied_balance:false and balance_unavailable:true. That response does not prove balances were applied.

See the project API authentication guide for key and scope requirements.

Last updated: