---
title: "Read the coach's AI-attributed revenue and plan ROI for a period"
method: GET
path: "/api/analytics/revenue"
tags: ["Analytics"]
---

# Read the coach's AI-attributed revenue and plan ROI for a period

`GET /api/analytics/revenue`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/analytics/revenue`
- Auth: one of:
  - API key in cookie `luca.session_token`
  - API key in header `x-api-key`
  - HTTP bearer

Revenue attributed to Luca over a period, sat next to what the plan costs, as a return figure.

**API key scopes:** `analytics:read`.

## Query parameters

- `period` 'this_week' | 'this_month' | 'last_week' | 'last_month' | 'last_30_days'
- `channel` 'telegram' | 'instagram' | 'messenger' | 'whatsapp'

## Headers

- `Luca-API-Version` '1'

## Response `200`

ok

- AnalyticsRevenueResponse
  - `period` 'this_week' | 'this_month' | 'last_week' | 'last_month' | 'last_30_days', required
  - `channel` string, nullable, required
  - `window` object, required
    - `cutoff` string, required
    - `until` string, nullable, required
  - `totalCents` integer, required
  - `byChannel` object[], required
    - `channel` string, required
    - `cents` integer, required
  - `previousWindow` object, required
    - `cutoff` string, required
    - `until` string, nullable, required
  - `previousTotalCents` integer, required
  - `roi` object, required
    - `planTier` string, required
    - `planPriceCents` integer, required
    - `multiple` number, required

## Other responses

- `401`: unauthorized
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
