Skip to main content
GET
/
api
/
admins
/
credits
/
rollup
cURL
curl --request GET \
  --url https://api.recoupable.com/api/admins/credits/rollup \
  --header 'x-api-key: <api-key>'
{
  "status": "success",
  "period": "all",
  "page": 2,
  "limit": 2,
  "total_count": 1,
  "rows": [
    {
      "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "total_credits_deducted_cents": 123,
      "event_count": 123,
      "account_name": "<string>",
      "account_email": "jsmith@example.com"
    }
  ],
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Query Parameters

period
enum<string>
default:monthly

Rollup window. daily = today (last 1 day), weekly = last 7 days, monthly = last 30 days, all = no cutoff (every event ever recorded). Defaults to monthly. Follows the existing admin period convention.

Available options:
all,
daily,
weekly,
monthly
limit
integer
default:100

Page size — number of accounts to return per request, sorted by total credits deducted descending. Defaults to 100; max 500.

Required range: 1 <= x <= 500
page
integer
default:1

1-indexed page number. Server returns rows (page - 1) * limit through page * limit - 1. Defaults to 1. Use total_count in the response to drive a 'load more' control (page * limit < total_count).

Required range: x >= 1

Response

Credit usage rollup retrieved successfully

status
enum<string>
required

Status of the request

Available options:
success,
error
period
enum<string>
required

The period the response was computed over (echoes the request)

Available options:
all,
daily,
weekly,
monthly
page
integer
required

1-indexed page returned (echoes the request, or 1 if omitted)

Required range: x >= 1
limit
integer
required

Page size used for this response (echoes the request, or the default if omitted)

Required range: x >= 1
total_count
integer
required

Total number of distinct accounts with at least one usage_events row in the selected period (i.e. the size of the full result set before pagination). The client derives has_more as page * limit < total_count and shows 'X of Y accounts'. Computed via a COUNT(DISTINCT account_id) query alongside the paginated row fetch.

Required range: x >= 0
rows
object[]
required

Per-account credit usage totals, sorted by total_credits_deducted_cents descending

error
string

Error message (only present if status is 'error')