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) |
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:
/errorsshows which validation failures dominate (usually field-name mismatches — the 400 body'sactionsays the fix). - Budget pacing:
/creditsdaily series vs plan allowance (seeapi-auth-creditsfor the plan ladder) → project whether the month's credits will last. - MCP:
get_account_analytics,check_credit_balance.