Team analytics
Programmatic access to the same credit usage data available in your dashboard and CSV export.
Credit usage
Query credit consumption over time withPOST /v1/analytics/team-credit-usage. Each response includes per-user breakdown with email addresses and per-project grouping automatically.
Example response
Filtering
Narrow down results to specific subsets of your team:Time granularity
Thegranularity parameter controls the time bucket size. Defaults to day.
Date range limits
- If no dates are provided, returns the last 7 days
- Enterprise: maximum 365 days
- Business: maximum 180 days
Discovery endpoints
Four companion endpoints let you list team resources and get the IDs needed for filtering credit usage:
Cache discovery results — team composition changes infrequently.
Authentication
All endpoints authenticate with theX-Magnific-API-Key header. Your team is identified automatically from the API key. See Authentication for details.
Rate limits
All Analytics API endpoints are limited to 100 requests per day (100 RPD).API reference
Credit Usage
Query credit consumption over time with filters
Team Members
List members with email, role, and status
API Keys
List API keys with name and status
Team Groups
List groups with member count
Team Projects
List projects with name
Frequently Asked Questions
What data does the Analytics API provide?
What data does the Analytics API provide?
The same data available in your Credit Usage dashboard and CSV export: date, tool (display name), user email, usage count, credits consumed, project, and group. The difference is structured JSON instead of flat CSV rows.
Does using the Analytics API cost credits?
Does using the Analytics API cost credits?
No. The Analytics API is included with your Business or Enterprise plan at no additional cost.
How do I know which IDs to use for filtering?
How do I know which IDs to use for filtering?
Call the discovery endpoints first. For example,
GET /v1/analytics/team-groups returns all your groups with their group_id. Pass those IDs into the group_ids filter when querying credit usage. The same applies to projects (project_references) and API keys (api_key_ids).What is the maximum date range?
What is the maximum date range?
Enterprise plans can query up to 365 days. Business plans can query up to 180 days. If no dates are provided, the API defaults to the last 7 days.