Skip to content
Connect an agent

Analytics

API requests per credential per day

Each API key and OAuth app's requests and errors per UTC day, oldest first.

GET/v1/usage

TL;DR

QuestionAnswer
What does it do?API requests per credential per day.
What does it need?An API key or an OAuth access token.
What does it take?days in the query string.
What does it return?Status 200 with a body of type Usage.
In the SDK?flung.analytics.usage()
What can go wrong?401 Missing, unknown, revoked or expired API key; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape.

What it does

Each API key and OAuth app's requests and errors per UTC day, oldest first. Kept for 90 days.

Example

bash
curl -X GET 'https://api.flung.dev/v1/usage' \  --header "Authorization: Bearer $FLUNG_API_KEY"

A successful answer looks like this:

json
{  "data": [    {      "credential": "key:key_aaaaaaaaaaaaaaaaaaaaaaaa",      "day": "2026-10-29",      "requests": 1,      "errors": 1    }  ]}

Query parameters

FieldTypeRequiredDescription
daysintegerno

Responses

StatusMeaningBody
200The counts.Usage
401Missing, unknown, revoked or expired API key.Error
422The request failed validation.Error
429Too many requests for this credential; wait for retry-after seconds.Error

Response body

A 200 answer has the type Usage.

FieldTypeRequiredDescription
dataobject[]yes
data[].credentialstringyeskey:<api key id> or app:<OAuth client id>.
data[].daystringyes
data[].requestsintegeryes
data[].errorsintegeryesAnswers of 400 or more, rate limits included.

See also

DocWhy
API referenceEvery endpoint
SchemasEvery request and response type
ErrorsEvery error code and what to do about it