Get latest stored account usage for the caller account
GET/v1/billing/usage
Returns the latest daily account usage snapshot (entities, unified runs, and related metrics) for the caller account. Account or organization admins in the active org; available regardless of self-service payment. Returns 404 when no usage record exists yet.
Request body schema (JSON)
{
"title": "Body"
}Responses
- 200
- 401
- 404
Default Response
Default Response
A resource with the provided identifier was not found
Responses (JSON)
{
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"usage": {
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"subscriptionId": {
"type": "string"
},
"usageDate": {
"type": "string",
"format": "date"
},
"metrics": {
"type": "object",
"additionalProperties": {
"type": "number"
},
"description": "Billing-aligned usage counters (e.g. COUNT_ENTITIES, COUNT_UNIFIED_RUNS). Keys and semantics follow the account usage store."
},
"overageGrace": {
"type": "object",
"properties": {
"entities": {
"type": "string",
"format": "date-time"
},
"unifiedRuns": {
"type": "string",
"format": "date-time"
}
},
"description": "Optional Freemium overage-grace timestamps (ISO-8601) when first over limit; omitted when not in grace."
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"accountId",
"subscriptionId",
"usageDate",
"metrics",
"updatedAt",
"createdAt"
]
}
},
"required": [
"ok",
"usage"
]
}
}
}
},
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
}
}
}