Skip to main content
GET
Get usage

Authorizations

Authorization
string
header
required

Basic authentication using an API key, e.g. {Authorization: Bearer aff_0bb4fbdf97b7e4111ff6c0015471094155f91}. You can find your API key within the Settings page of the Affinda web app. You can obtain an API key by signing up for a free trial.

Query Parameters

organization
string
required

Organization to report usage for. The caller must be an admin or owner. Uniquely identify an organization.

Example:

"mEFayXdO"

workspace
string

Optionally scope the report to a single workspace within the organization. Uniquely identify a workspace.

Example:

"mEFayXdO"

document_type
string

Optionally scope the report to a single document type within the organization. Uniquely identify a collection.

Example:

"mEFayXdO"

start
string<date>

Inclusive start date of the report (YYYY-MM-DD). Defaults to 365 days before end.

end
string<date>

Inclusive end date of the report (YYYY-MM-DD). Defaults to today.

Response

Daily credits consumption for the requested scope.

Daily credits consumption for an organization over a date range, optionally scoped to a single workspace or document type.

scope
enum<string>
required

What the usage was scoped to.

Available options:
organization,
workspace,
documentType
scopeIdentifier
string
required

Identifier of the scoped entity (organization, workspace, or document type).

start
string<date>
required

Inclusive start of the reported period (YYYY-MM-DD).

Example:

"2025-04-01"

end
string<date>
required

Inclusive end of the reported period (YYYY-MM-DD).

Example:

"2025-04-30"

total
integer
required

Total credits consumed over the period.

Example:

4320

items
object[]
required

Per-day breakdown. Days with zero usage are omitted.