---
title: "Per-member run/usage breakdown"
method: GET
path: "/v1/runs-stats/by-member"
tags: ["usage"]
---

# Per-member run/usage breakdown

`GET /v1/runs-stats/by-member`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/runs-stats/by-member`
- Auth: HTTP bearer

Tenant-scoped per-member usage over a UTC window: runs and credits (metered COGS → whole credits, never dollars; tokens carried for internal callers) attributed per teammate by the run's actor, most credits first. Runs with no actor (scheduled / system work) collapse into a single null-actor slice the dashboard labels 'Automated'; members with no runs in the window are omitted. `start` and `end` are required, timezone-aware ISO-8601 (normalized to UTC); `end` must be after `start` and the window must not exceed 366 days (else 422). Requires `usage:read`.

## Query parameters

- `start` string, date-time, required: Window start (inclusive). Required, timezone-aware ISO-8601; normalized to UTC.
- `end` string, date-time, required: Window end (exclusive). Required, timezone-aware ISO-8601; normalized to UTC.

## Headers

- `X-Tenant-Id` string, nullable

## Response `200`

Successful Response

- RunStatsByMemberResponse: Per-member run/usage breakdown for a tenant over a UTC date window. Backs the Usage → "Per team" table: usage attributed per teammate (per actor), in **credits** (never dollars; pricing-v2 §8a), most credits first. Members with no runs in the window are omitted (the table shows only who was active).
  - `members` RunStatsMemberSlice[], required: Per-actor slices, most credits first (then tokens, runs, actor_id); active members only.
    - `actor_id` string, uuid, nullable, required: The run actor's id, or null for unattributed (automated / system) runs.
    - `name` string, nullable, required: The actor's display name; null for the automated slice or a removed member.
    - `handle` string, nullable, required: The actor's chat handle (e.g. Slack @handle) when known, else null.
    - `email` string, nullable, required: The actor's email when known, else null.
    - `runs` integer, required: Runs this teammate triggered in the window.
    - `credits` integer, required: Credits consumed by this teammate's runs (metered COGS converted to whole credits).
    - `total_tokens` integer, required: Summed input + output tokens for this teammate's runs (internal/admin; dashboard uses credits).

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)
- `422`: Validation error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
