Mixpanel · Arazzo Workflow

Mixpanel Cohort-Driven Segmentation

Version 1.0.0

List project cohorts then segment an event filtered to a chosen cohort.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AnalyticsData AnalysisEvent TrackingProduct AnalyticsUser BehaviorArazzoWorkflows

Provider

mixpanel

Workflows

cohort-driven-segmentation
List cohorts then segment an event scoped to one cohort.
Calls /cohorts/list to retrieve cohorts, then queries /segmentation for the event filtered with a cohort where expression.
2 steps inputs: cohortId, eventName, fromDate, projectId, toDate outputs: cohorts, values
1
listCohorts
Retrieve all cohorts defined in the project to confirm the requested cohort exists. Uses service account basic auth.
2
segmentByCohort
Query event segmentation for the event scoped to the chosen cohort using a where expression that references the cohort ID.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Mixpanel Cohort-Driven Segmentation
  summary: List project cohorts then segment an event filtered to a chosen cohort.
  description: >-
    A cohort-analysis workflow. The flow lists the cohorts defined in a project,
    then queries the Segmentation endpoint for an event filtered to a specific
    cohort using the where expression so an event's volume can be read for just
    the members of that cohort. Each step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: cohortsApi
  url: ../openapi/mixpanel-cohorts-api-openapi.yml
  type: openapi
- name: segmentationApi
  url: ../openapi/mixpanel-segmentation-api-openapi.yml
  type: openapi
workflows:
- workflowId: cohort-driven-segmentation
  summary: List cohorts then segment an event scoped to one cohort.
  description: >-
    Calls /cohorts/list to retrieve cohorts, then queries /segmentation for the
    event filtered with a cohort where expression.
  inputs:
    type: object
    required:
    - projectId
    - cohortId
    - eventName
    - fromDate
    - toDate
    properties:
      projectId:
        type: integer
        description: The Mixpanel project ID.
      cohortId:
        type: integer
        description: The cohort ID to scope the segmentation to.
      eventName:
        type: string
        description: The event name to segment.
      fromDate:
        type: string
        description: Segmentation start date (YYYY-MM-DD).
      toDate:
        type: string
        description: Segmentation end date (YYYY-MM-DD).
  steps:
  - stepId: listCohorts
    description: >-
      Retrieve all cohorts defined in the project to confirm the requested
      cohort exists. Uses service account basic auth.
    operationId: listCohorts
    parameters:
    - name: project_id
      in: query
      value: $inputs.projectId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cohorts: $response.body
  - stepId: segmentByCohort
    description: >-
      Query event segmentation for the event scoped to the chosen cohort using a
      where expression that references the cohort ID.
    operationId: querySegmentation
    parameters:
    - name: project_id
      in: query
      value: $inputs.projectId
    - name: event
      in: query
      value: $inputs.eventName
    - name: from_date
      in: query
      value: $inputs.fromDate
    - name: to_date
      in: query
      value: $inputs.toDate
    - name: where
      in: query
      value: '("$inputs.cohortId" in cohorts)'
    - name: type
      in: query
      value: unique
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      values: $response.body#/data/values
  outputs:
    cohorts: $steps.listCohorts.outputs.cohorts
    values: $steps.segmentByCohort.outputs.values

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/mixpanel-cohort-driven-segmentation-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.