Analytics
Mixpanel in your product and your AI agents, through one API
The Mixpanel toolkit covers projects, saved Insights and Funnels reports, event names and properties, event counts, retention, cohorts, user profiles and annotations, in US data residency. Through Connect your product or AI agent calls them with one endpoint, while Connect stores the service account credentials and logs every execution.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/mixpanel_list_cohorts/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"project_id": 1
}
}How it works
From a connected customer to the first Mixpanel call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their Mixpanel account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with Mixpanel.
Embed product analytics
A SaaS reads a saved report or event counts from the customer's Mixpanel project and shows them inside its own dashboard.
Answer questions about usage
An AI agent lists event names, then gets event counts or a retention report for a date range to answer a question about usage.
Mark launches on the charts
A release tool creates an annotation on the day of a campaign or release, and updates or deletes it later.
Tools
12 Mixpanel tools
- List projectsGETReturns, under results, the service account itself and the organizations, projects and workspaces it can access, each keyed by id. The keys of results.projects are the project_id the other tools ask for, and results.workspaces has the workspace_id of projects that use data views.
- Get saved reportGETReturns the data of a saved Insights or Funnels report, computed with the date range and filters saved in the report. Counts toward the Query API limit of 60 queries per hour.
- List event namesGETLists the names of the most common events of the project in the last 31 days, to use as the event arguments of the other tools. Counts toward the Query API limit of 60 queries per hour.
- List event propertiesGETLists the most common property names of one event, to build the on and where expressions of Get retention report. Counts toward the Query API limit of 60 queries per hour.
- Get event countsGETReturns, period by period, the total, unique or average count of one or more events between two dates. Counts toward the Query API limit of 60 queries per hour.
- Get retention reportGETReturns, for each cohort date, how many users entered the cohort (first) and how many came back in each interval after it (counts). Counts toward the Query API limit of 60 queries per hour.
- List cohortsPOSTLists the saved cohorts of the project with id, name, number of users, description, creation date and visibility. Counts toward the Query API limit of 60 queries per hour.
- Search profilesPOSTReturns the user profiles that match a where expression, a cohort or a list of distinct_ids, with their properties. A page holds up to page_size profiles: for the next one, repeat the call with the same filters, the session_id of the response and page plus one. Counts toward the Query API limit of 60 queries per hour.
- List annotationsGETLists the annotations of the project, the notes pinned to a date on its charts, with id, date, description, author and tags.
- Create annotationPOSTCreates an annotation, a note shown at a date on the charts of the project, such as a campaign launch. The service account needs the Analyst role or higher on the project.
Username and password
Your customer enters the app credentials on a Connect screen, or your system sends them with POST /api/customer-toolkits, with no screen.
Questions about the Mixpanel toolkit
Do I need to build against the Mixpanel API?
No. Connect ships 12 Mixpanel tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their Mixpanel account?
With the mode the toolkit accepts: Username and password. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
