---
title: "Daily Spend"
method: GET
path: "/v1/internal/diligence/spend"
tags: ["diligence"]
---

# Daily Spend

`GET /v1/internal/diligence/spend`

## Request

- Base URL: `https://docs.mireye.com` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.mireye.com/v1/internal/diligence/spend`
- Auth: none declared
- TypeScript: <https://skmtc.dev/mireye/apis/mireye-scout-api/docs/v1/internal/diligence/spend/get.ts> (a function with typed inputs; its response is checked against the schema)

This organization's recorded provider spend for one UTC calendar day.

An automatic worker has to enforce a per-day spend ceiling, and the only trustworthy
number for that is the ledger Scout writes in the same transaction as each step result.
Reading it back out beats a worker totalling its own local logs: a restarted, redeployed
or duplicated worker forgets what it spent, and the ledger does not.

The total is deliberately EVERY `cost_ledger` row for the org on that day, not only
automatic-worker rows. The ledger carries no actor column, and the direction that matters
is conservative: an operator's manual run must eat into the automatic budget, never hide
from it.

``created_at`` is a timezone-aware column, so the [day, day+1) window is a real UTC day
regardless of the server's local zone.

## Query parameters

- `day` string, nullable: UTC calendar day, YYYY-MM-DD

## Headers

- `authorization` string, nullable
- `X-Tenant` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-08-16** `01187e8931f0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mireye/apis/mireye-scout-api/changes/v1/internal/diligence/spend/get.md)

---

[API](https://skmtc.dev/mireye/apis/mireye-scout-api.md) - [All operations](https://skmtc.dev/mireye/apis/mireye-scout-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mireye/apis/mireye-scout-api/revisions/c80d2b343f16?raw)
