get__credits_stats_monthly
TypeScript Client Library
public getCreditsMonthlyStats = async (query?: GetCreditsMonthlyStatsRequest): Promise<GetCreditsMonthlyStatsResponse> => {
return this.makeRequest<GetCreditsMonthlyStatsResponse>('credits/stats/monthly', 'GET', query ?? null);
};Code Samples
# Optional: number of months (default 12, max 24)
curl -X GET 'https://backend.flashback.tech/credits/stats/monthly?months=12' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'GET https://backend.flashback.tech/credits/stats/monthly?months=12 HTTP/1.1
Host: backend.flashback.tech
Accept: application/json
Authorization: Bearer {access-token}const params = new URLSearchParams({ months: '12' });
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
};
fetch(`https://backend.flashback.tech/credits/stats/monthly?${params}`, { method: 'GET', headers })
.then(res => res.json())
.then(body => console.log(body));import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
params = { 'months': 12 }
r = requests.get('https://backend.flashback.tech/credits/stats/monthly', headers=headers, params=params)
print(r.json()){
"success": true,
"data": [
{
"month": "2025-02-01T00:00:00.000Z",
"consumption": 120,
"purchases": 0,
"grants": 500,
"balance": 380
},
{
"month": "2025-03-01T00:00:00.000Z",
"consumption": 85,
"purchases": 1100,
"grants": 0,
"balance": 1015
}
],
"totals": {
"consumption": 205,
"purchases": 1100,
"grants": 500,
"balance": 1395
}
}Query Parameters
Name
Type
Required
Description
Responses
Status
Meaning
Description
Schema
Response Schema (200)
Name
Type
Required
Description
Security
Notes
Last updated
Was this helpful?