Skip to main content
GET
/
api
/
analytics
/
spend
/
daily
Get Daily Spend
curl --request GET \
  --url https://api.example.com/api/analytics/spend/daily
{
  "success": true,
  "data": {
    "period": {},
    "granularity": "<string>",
    "daily": [
      {
        "date": "<string>",
        "credits_used": 123,
        "credits_added": 123
      }
    ]
  }
}
Provides a time-series array of your credit transactions. You can use this to chart daily costs against account top-ups.

Query Parameters

start_date
string
Start date in YYYY-MM-DD format. Defaults to 30 days ago.
end_date
string
End date in YYYY-MM-DD format. Defaults to today.
start_datetime
string
Start exact time in ISO 8601 format (e.g. 2024-03-01T14:30:00Z). Changes the granularity of the time-series points to minute.
end_datetime
string
End exact time in ISO 8601 format.

Response

success
boolean
Indicates whether the request was successful.
data
object