Skip to content

GET /api/agent/orgs/{orgId}/daily-brief

Returns the latest DailyAgentBrief row for the caller's org. The dashboard view and the agentic API read the same row, so an LLM agent and the human user always see the same brief at any given moment.

A daily worker (daily-agent-brief.scheduler) regenerates the row once per UTC day per active org. The free tier is rules-based; the premium tier is LLM-generated. The shape of the response is identical across tiers.

Auth

  • Required scope: any authenticated key (no specific scope required)
  • Header: Authorization: Bearer cr_live_<prefix>_<secret>
  • Cross-tenant: the bearer's resolved orgId must match the path {orgId}. Mismatches return 403.

Path parameters

NameInTypeRequiredNotes
orgIdpathstringyesOrg id; must match the bearer's org id.

Responses

200 — Latest daily brief

Body: DailyBriefResponse

FieldTypeRequiredNotes
orgIdstringyesEchoes the path param.
asOfDatestring (date)yesUTC business day the brief was generated for (YYYY-MM-DD).
generatedAtstring (date-time)yesWhen the row was written.
generatorTierstring · one of rules llmyesWhich generator produced the payload.
payloadDailyBriefPayloadyesThe three-section brief — see schema below.

401 — Unauthorized

Body: ErrorResponse

Returned for missing bearer, bad token prefix, or revoked key. Causes are not differentiated — that would leak prefix existence.

FieldTypeRequiredNotes
errorstringyes

403 — Cross-tenant forbidden

Body: ErrorResponse

The bearer authenticated, but the resolved orgId doesn't match the {orgId} path segment. Cross-tenant reads are never allowed.

FieldTypeRequiredNotes
errorstringyes

404 — No brief generated yet

Body: ErrorResponse with error: "no_brief_yet"

Typically the first day after onboarding, before the daily cron has fanned out. Retry after the next 06:00 UTC tick.

FieldTypeRequiredNotes
errorstringyes"no_brief_yet" for this code.

Example

bash
curl -sS "https://app.cashrunway.ai/api/agent/orgs/$ORG_ID/daily-brief" \
  -H "Authorization: Bearer $CASHRUNWAY_API_KEY" | jq
json
{
  "orgId": "org_01HX…",
  "asOfDate": "2026-05-08",
  "generatedAt": "2026-05-08T06:00:14.221Z",
  "generatorTier": "rules",
  "payload": {
    "mainDriver": {
      "headline": "Apex + Brightline drive 64% of W1–4 inflows",
      "bodyMarkdown": "Two customers shape the green side of the next month: **Apex Electrical** ($320k, due W3) and **Brightline Controls** ($210k, due W4).",
      "refs": [
        { "kind": "customer", "key": "apex-electrical", "displayName": "Apex Electrical" },
        { "kind": "customer", "key": "brightline-controls", "displayName": "Brightline Controls" }
      ]
    },
    "riskSignal": {
      "headline": "W9 dips to A$278k",
      "bodyMarkdown": "Conservative cash crosses your minimum buffer in **W9** under current assumptions.",
      "refs": [{ "kind": "week", "weekNumber": 9 }]
    },
    "recommendedAction": {
      "headline": "Bring Metro Lighting forward by 1 week",
      "bodyMarkdown": "Pulling **Metro Lighting**'s W9 invoice into W8 keeps the conservative line above buffer for the full 13 weeks.",
      "refs": [{ "kind": "customer", "key": "metro-lighting", "displayName": "Metro Lighting" }]
    }
  }
}

Schemas

DailyBriefPayload

Three-section brief with cross-link refs the dashboard hover system uses to highlight the matching card / column / row.

FieldTypeRequiredNotes
mainDriverBriefSectionyesWhat's shaping the green side.
riskSignalBriefSectionyesWeakest week / biggest risk.
recommendedActionBriefSectionyesOne concrete move for this week.

BriefSection

FieldTypeRequiredNotes
headlinestringyes≤ 80 chars. Plain string, no markdown.
bodyMarkdownstringyesBody paragraph; supports basic markdown (**bold**, *italic*).
refsarray of BriefRefyesCross-link refs. Empty array is valid.

BriefRef

A discriminated union — exactly one of:

VariantFieldsNotes
customerkind: "customer", key: string, displayName: stringCustomer slug + display label.
categorykind: "category", key: string, displayName: stringSpend-category slug + label.
weekkind: "week", weekNumber: integer1-indexed within the 13-week window.

Notes

  • The endpoint is read-only. Regeneration is worker-driven; clients don't trigger it.
  • The brief is keyed (orgId, asOfDate). Calling within the same UTC business day always returns the same row.
  • This endpoint is not yet listed in the OpenAPI spec at /api/agent/openapi.json — it'll join the auto-generated reference once tier semantics for the payload.refs cross-link contract are pinned. Until then, treat this page as the canonical contract.

Released under a proprietary license.