---
title: "Get Marketing Client Metrics"
method: GET
path: "/internal/reliability/marketing/client-metrics"
tags: ["internal"]
---

# Get Marketing Client Metrics

`GET /internal/reliability/marketing/client-metrics`

Client metrics digest for a company: one fortnight vs the one before.

The risk metrics cover four complete ISO weeks ending at `end_week`; the
in-progress week is never included, since it always under-reads until
reviewing catches up. Eligible uploads reviewed is reported by month instead
-- see `_client_metrics_month_spans` for why those months end where the weeks
do rather than at the generation date.

`team_ids` scopes the whole document. Every figure then covers those teams
together, and from two teams up the document also carries a per-team drilldown
of each of them -- summed from the same query rows as the totals, so the parts
add up to the whole by construction.

## Query parameters

- `company_id` string, uuid, required
- `team_ids` string[], nullable — Marketing teams to scope the digest to, repeated. Omit the parameter entirely for the whole company -- an empty value is a malformed uuid, not company-wide. The whole company is not the same as naming every team: collateral belonging to no team, and a risk raised on a file that is not marketing collateral, are only counted when no team is named. Two or more teams add a per-team drilldown of every headline metric. At most 12.
- `end_week` string, date, nullable — Monday of the last week to include. Defaults to the most recent complete week; a mid-week date snaps back to its Monday.

## Response `200`

Successful Response

- ClientMetricsReportResponse — Copy-pasteable client metrics digest for one company's fortnight. ``markdown`` is the whole deliverable -- summary table, weekly breakdown, top submitters, the per-team drilldown, and the metric definitions -- rendered server-side so the definitions live next to the SQL that computes them.
  - `company_id` string, uuid, required
  - `company_name` string, required
  - `teams` ClientMetricsTeam[], required
    - `team_id` string, uuid, required
    - `name` string, required
  - `company_team_count` integer, required
  - `current_start` string, date, required
  - `current_end` string, date, required
  - `prior_start` string, date, required
  - `markdown` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/3ff4c0bd276b/schema)
