Credits

Get the org credit usage history

Returns a day-by-day breakdown of the organization's credit spend over a trailing window, plus the total spent across it — enough to draw a usage chart or spot a trend without post-processing.

Every day in the window is present, so a day with no spend comes back with a usage of 0 and there are no gaps to fill. Entries run oldest to newest and the last one is today, which is still accumulating — its usage will keep rising until the day closes.

get/org/credits/history

Request

  • Base URL
    https://apiv2.senso.ai/api/v1
  • Auth
    API key in header X-API-Key

Query parameters

daysinteger

Length of the trailing window in days, 1–365 (default 30), counting back from today. A value outside that range, a non-numeric one, or ?days= with no value at all is rejected with 400 rather than falling back to the default.

Response

The daily usage series for the requested window.

org_idstring uuid required
daysinteger required

The window that was applied — your days parameter, or the default.

period_usagenumber required

Credits spent across the window, equal to the sum of history[].usage. This covers the requested window only — for lifetime spend read total_usage from GET /org/credits/balance, which will not match.

Example response

{
  "days": 7,
  "period_usage": 43.15,
  "history": [
    {
      "date": "2026-09-04",
      "usage": 12.5
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.