---
title: "Compute and store daily usage + spend for organizations"
method: POST
path: "/v1/organization/usage/daily-aggregate"
tags: ["Organization"]
---

# Compute and store daily usage + spend for organizations

`POST /v1/organization/usage/daily-aggregate`

Compute and store daily usage and spend for organizations.

## Request body

- DailyAggregateRequest — Must provide EITHER: - organization_ids (explicit list), OR - skip AND limit (windowed selection).
  - `organization_ids` integer[], nullable
  - `skip` integer, nullable — Offset into organizations table when using windowed mode
  - `limit` integer, nullable — Max number of orgs to aggregate in windowed mode
  - `day` string, date-time, required — UTC day to aggregate (YYYY-MM-DD), must not be in the future

## Response `200`

Successful Response

- DailyAggregateResponse — Per-organization daily aggregates for the given day.
  - `day` string, date, required — UTC day that was aggregated (YYYY-MM-DD)
  - `results` DailyAggregateResult[], required — Per-organization aggregate results
    - `organization_id` integer, required
    - `usage_date` string, date, required — UTC day that was aggregated (YYYY-MM-DD)
    - `daily_spend_cents` integer, required — Total spend for the day (cents)
    - `breakdown_json` UsageBucket[], required — Per-model breakdown for the day
      - `model` string, required
      - `task` string, required
      - `e2ee_enabled` boolean, required
      - `cc_enabled` boolean, required
      - `prompt_tokens` integer, required
      - `completion_tokens` integer, required
      - `total_tokens` integer, required
      - `requests` integer, required
      - `spend_cents` integer, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/flower/apis/superlink-api.md) · [All operations](https://skmtc.dev/flower/apis/superlink-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flower/superlink-api/revisions/adf853ac4f41/schema)
