Skip to main content
GET
/
usage
Get Api Usage
curl --request GET \
  --url https://api.moda.app/v1/usage \
  --header 'Authorization: Bearer <token>'
{
  "period": {
    "start": "2023-11-07T05:31:56Z",
    "end": "2023-11-07T05:31:56Z"
  },
  "summary": {
    "events_total": 123,
    "events_succeeded": 123,
    "events_failed": 123,
    "credits_used": 123,
    "success_rate": 123
  },
  "daily": [
    {
      "date": "<string>",
      "events": 123,
      "credits": 123,
      "failed": 123
    }
  ],
  "by_api_key": [
    {
      "api_key_id": "<string>",
      "name": "<string>",
      "events": 123,
      "credits": 123,
      "last_used_at": "2023-11-07T05:31:56Z"
    }
  ],
  "by_operation": [
    {
      "operation_id": "<string>",
      "events": 123,
      "credits": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.moda.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key from Settings > Developer > REST API

Headers

Moda-Version
enum<string>
default:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Available options:
2026-04-12,
2026-05-01
Example:

"2026-05-01"

Query Parameters

api_key_id
string | null

Optional API-key UUID filter. Narrows all aggregates to the given key.

from
string<date-time> | null

ISO8601 UTC lower bound (inclusive). Defaults to to - 7d.

to
string<date-time> | null

ISO8601 UTC upper bound (exclusive). Defaults to now.

Response

Successful Response

period
UsagePeriod · object
required
summary
UsageSummary · object
required
daily
UsageDaily · object[]
required
by_api_key
UsageByApiKey · object[]
required
by_operation
UsageByOperation · object[]
required