Skip to main content
GET
Get API & WebSocket usage
Choose one source per call:
  • api — REST usage: credits, requestCalls, and per-endpoint metrics.
  • wss — WebSocket usage: events, with a per-service breakdown.
Provide apiKey and exactly one of customerId or organizationId — find these on your dashboard settings page. Rows are newest-first — paginate with nextCursor.

Query Parameters

source
enum<string>
required

api (REST credits/calls) or wss (WebSocket/webhook events). One per call. Which usage stream to return: api (REST credits/calls) or wss (websocket/webhook events). Required; only one per call.

Available options:
api,
wss
Example:

"api"

apiKey
string
required

API key to return usage for. Find your keys on the dashboard settings page (admin.mobula.io).

Minimum string length: 1
customerId
string

Verify the key belongs to this customer. Provide exactly one of customerId or organizationId.

Minimum string length: 1
organizationId
string

Verify the key belongs to this organization. Mutually exclusive with customerId.

Minimum string length: 1
from

Window start — epoch ms or ISO 8601. Defaults to to minus 30 days; must be within the last 12 months.

to

Window end — epoch ms or ISO 8601. Defaults to now; future values clamped to now.

limit
integer

Page size for rows (1–100, default 20).

cursor
string

Pagination cursor from a previous nextCursor. Rows are newest-first.

Response

Usage response.

success
enum<boolean>
required

True on success. Errors return { success: false, error }.

Available options:
true
data
object
required