canonical: https://jentic.com/apis/mixpanel.com/mixpanel

# Mixpanel API

Jentic publishes the only available OpenAPI specification for Mixpanel API, keeping it validated and agent-ready. Track user interactions, query event data with segmentation and funnels, and build behavioral cohorts across web and mobile applications. The API supports bulk event ingestion, raw data export, JQL custom queries, retention analysis, and lookup table management for enriching event properties with external metadata.

## For AI agents

Ingest product events, query segmentation and funnel reports, export raw event data, and manage user cohorts and lookup tables for behavioral analytics.

## Scope

Does not handle A/B testing, feature flags, or session recording - use for product analytics event tracking and querying only.

## Capabilities

- Ingest millions of events in bulk via the import endpoint with automatic deduplication
- Query segmentation reports to measure how often users trigger specific events over time
- Analyze multi-step conversion funnels to identify where users drop off
- Export raw event data for a specified date range to external warehouses
- Build and retrieve behavioral cohorts based on event sequences and user properties
- Run custom JQL queries against raw event data for ad-hoc analysis
- Enrich event properties with external metadata using lookup tables

## Use cases

### AI Agent Product Analytics Integration

AI agents query Mixpanel segmentation and funnel endpoints to surface product usage insights without manual dashboard interaction. Through Jentic, an agent searches for the analytics operation it needs, receives the schema, and executes queries against the Mixpanel API to return conversion rates, retention metrics, or event counts directly within a workflow. Integration takes minutes rather than days of custom code.

Example prompt: Query the segmentation endpoint for the 'page_view' event over the last 7 days grouped by 'browser' property and return the daily counts

### Conversion Funnel Analysis

Measure multi-step user flows from first visit through purchase completion by defining funnel steps as event sequences. The funnels endpoint returns step-by-step conversion counts, drop-off rates, and median time-to-convert. Teams use this to identify friction points in onboarding, checkout, or upgrade paths, then iterate on product changes and re-measure impact.

Example prompt: Query the funnels endpoint with steps 'sign_up', 'add_to_cart', and 'purchase' for the last 30 days and return the conversion rate between each step

### Bulk Event Ingestion Pipeline

Import historical or high-volume event data into Mixpanel using the import endpoint, which accepts batches of up to 2000 events per request with automatic deduplication via insert_id. This supports backfilling analytics data from warehouses, migrating from other analytics platforms, or streaming server-side events that cannot be captured client-side.

Example prompt: POST a batch of 100 events to the /import endpoint with event name 'purchase', distinct_id, and insert_id for deduplication

### Retention and Engagement Reporting

Measure how well a product retains users after their initial engagement by querying the retention endpoint with configurable born-event and return-event parameters. Results show what percentage of users come back on day 1, 7, 14, and 30, segmented by acquisition cohort or user property. This powers weekly business reviews and investor reporting.

Example prompt: Query the retention endpoint with born_event 'sign_up' and return_event 'login' over the last 60 days to get the day-1 through day-30 retention curve

### Raw Data Export to Warehouse

Export raw event data for any date range using the export endpoint, which streams newline-delimited JSON containing every event property. Teams pipe this into Snowflake, BigQuery, or Redshift for cross-platform analysis, custom modeling, or compliance archival. Each record includes the original timestamp, distinct_id, and all custom properties captured at ingest time.

Example prompt: GET raw event data from the /api/2.0/export endpoint for the date range 2026-04-01 to 2026-04-07 and return the first 50 records

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /import | Bulk-import events with deduplication |
| GET | /api/2.0/export | Export raw event data for a date range |
| GET | /api/2.0/segmentation | Query event segmentation reports |
| GET | /api/2.0/funnels | Analyze multi-step conversion funnels |
| GET | /api/2.0/retention | Query user retention curves |
| GET | /api/2.0/insights | Retrieve saved insights data |
| GET | /api/2.0/jql | Run custom JQL queries on raw data |
| GET | /api/2.0/cohorts | List behavioral cohorts |

## Key resources

- **Events** — Import events in bulk and export raw event data for specified date ranges
- **Segmentation** — Query event-based segmentation reports with property breakdowns
- **Funnels** — Define and query multi-step conversion funnels
- **Retention** — Measure user retention with born-event and return-event configuration
- **Cohorts** — List and retrieve behavioral user cohorts
- **Annotations** — Create and list timeline annotations for releases or incidents
- **Lookups** — Upload and retrieve lookup tables for property enrichment

## Why Jentic

- **Setup:** Wiring the Mixpanel API by hand means handling its bearer auth, learning the split between the import host and the api.2.0 query paths, and formatting each analytics query yourself. Through Jentic you install once, import the Mixpanel API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Mixpanel's analytics targets travel in query and request parameters rather than the URL path, so scope your agent by limiting it to the operations it needs, such as segmentation, funnels, or retention queries. You leave out event import or JQL so the agent reads product analytics without writing events or running arbitrary queries.
- **Credential handling:** Your Mixpanel token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run a funnel report' or 'query event segmentation', and Jentic returns the matching Mixpanel operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Amplitude API** — Amplitude offers similar product analytics with behavioral cohorts and retention, competing directly with Mixpanel
- **PostHog API** — PostHog provides open-source product analytics with feature flags and session recording in a single platform
- **Segment API** — Segment collects and routes event data from multiple sources into Mixpanel and other destinations
- **Heap API** — Heap auto-captures all user interactions without manual instrumentation, competing with Mixpanel's event-based approach

## FAQ

### Why is there no official OpenAPI spec for Mixpanel API?

Mixpanel does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Mixpanel API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Mixpanel API use?

The Mixpanel API uses Bearer token authentication. You include a service account token or project API secret in the Authorization header. Through Jentic, your Bearer token is stored encrypted in the credential vault and agents receive scoped access without the raw token entering their context.

### Can I query funnel conversion rates with the Mixpanel API?

Yes. The GET /api/2.0/funnels endpoint accepts an array of event steps and returns step-by-step conversion counts, drop-off percentages, and median time between steps for a specified date range.

### What are the rate limits for the Mixpanel API?

Mixpanel enforces rate limits per project based on plan tier. The data export endpoint allows up to 60 requests per hour on free plans and higher limits on paid plans. The import endpoint accepts batches of up to 2000 events per request with no per-minute cap for most plans.

### How do I export raw event data through the Mixpanel API via Jentic?

Search Jentic for 'export raw events from mixpanel' to discover the /api/2.0/export operation. Load the schema, provide from_date and to_date parameters, and execute. The endpoint streams newline-delimited JSON containing every event with all properties. Install the SDK with pip install jentic to get started.

### Can I run custom queries against Mixpanel event data?

Yes. The GET /api/2.0/jql endpoint accepts a JQL script parameter that lets you write JavaScript-based queries against raw event data, applying custom filters, aggregations, and transformations beyond what the standard segmentation endpoint offers.

### How do I import server-side events into Mixpanel?

POST event batches to the /import endpoint with each event containing an event name, distinct_id, time, and properties object. Include an insert_id per event for automatic deduplication. The endpoint accepts up to 2000 events per request in JSON array format.

### Can I limit what my agent is allowed to do with the Mixpanel API?

Yes. Because you run Jentic One yourself, your own rules decide which Mixpanel operations and credentials the agent may use. Since Mixpanel's targets travel in query and request parameters rather than the URL path, you scope the agent by allowing only the operations it needs, such as the segmentation, funnels, or retention queries, and leaving out the import and JQL operations. That way the agent reads product analytics without writing events or running arbitrary queries.
