# Analytics Observability

> LeadMagic account analytics — usage, credit spend, per-product breakdowns, daily history, found rates, data quality, and error reporting via the free GET /v1/analytics endpoints. Use when reporting credit spend, auditing what a workflow cost, checking match or found rates, tracking usage by product, or debugging error patterns in an integration.

- Skill: `leadmagic/analytics-observability` (Agent Skill)
- Install (CLI): `npx skillmds@latest add leadmagic/analytics-observability`
- Raw SKILL.md: https://api.skillmd.com/api/skills/leadmagic/analytics-observability/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- License: MIT
- Author: LeadMagic (https://skillmd.com/u/leadmagic)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/leadmagic/analytics-observability

---


# LeadMagic — Analytics & observability

Every endpoint here is **free** (0 credits). Use them liberally to report on runs instead of guessing.

## Endpoints (all `GET`, all under `/v1/analytics`)

| Endpoint | Returns |
|---|---|
| `/dashboard` | Headline usage overview |
| `/usage` | Request volume over time |
| `/products` | Per-product breakdown (which products consume the credits) |
| `/credits` | Credit spend over time |
| `/summary` | Compact account summary |
| `/daily` | Day-by-day history |
| `/day/{date}` | One day in detail (`YYYY-MM-DD`) |
| `/requests` | Recent request log |
| `/quality` · `/quality/daily` | Data-quality metrics |
| `/errors` | Error patterns (4xx/5xx by type) |

```bash
curl -sS "https://api.leadmagic.io/v1/analytics/summary" -H "X-API-Key: $LEADMAGIC_API_KEY"
```

## Patterns

- **After any bulk run:** `/day/{date}` + `/products` → report actual credits spent vs the preflight estimate.
- **Weekly ops report:** `/summary` + `/products` + `/errors` → spend, match quality, and integration health in three calls.
- **Debugging a noisy integration:** `/errors` shows which validation failures dominate (usually field-name mismatches — the 400 body's `action` says the fix).
- **Budget pacing:** `/credits` daily series vs plan allowance (see `api-auth-credits` for the plan ladder) → project whether the month's credits will last.
- MCP: `get_account_analytics`, `check_credit_balance`.

