# Aggregate usage for a subscription over a period

`GET /api/v1/usage-events/aggregate`

Needs the `usage:read` scope, or a full-access key.

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `subscription_id` | string | required |  |
| `period_start` | string | required |  |
| `period_end` | string | required |  |

## Responses

### 200

Aggregated usage.

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "total_units": {
          "type": "string",
          "pattern": "^\\d+$",
          "description": "Aggregated usage quantity for the requested period, serialized as a decimal string.",
          "example": "1999"
        }
      },
      "required": [
        "total_units"
      ]
    },
    "_agent": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok"
          ]
        },
        "next_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "summary",
        "status",
        "next_actions",
        "warnings"
      ]
    },
    "api_version": {
      "type": "string",
      "example": "2026-07-01"
    }
  },
  "required": [
    "data",
    "_agent",
    "api_version"
  ]
}
```
