Mixpanel Identity API

Manage user identity resolution and merging

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /identity/create Link an anonymous device ID to a known user · Mixpanel Create identity #
Ask an LLM
“How do I connect a user's anonymous activity to their logged-in account?”
“Can I link a device ID to a known user ID so events match up?”
Tell an agent
Create an identity mapping from device ID {anon_id} to user {identified_id}.
Link anonymous activity on {anon_id} to known user {identified_id}.
POST /identity/create-alias Create an alias for a distinct ID · Mixpanel Create alias #
Ask an LLM
“How do I map an old distinct_id to a new one?”
“Is there a legacy way to alias one user ID to another?”
Tell an agent
Create alias {alias} for distinct ID {distinct_id}.
Map old user ID {distinct_id} to alias {alias}.
POST /identity/merge Merge two distinct IDs into one identity · Mixpanel Merge identities #
Ask an LLM
“How do I combine all events and profile data for two user IDs?”
“Can I merge two distinct_id values into one identity cluster?”
Tell an agent destructive · confirm first
Merge distinct IDs {distinct_ids} into a single identity.
Combine user clusters {distinct_ids} so events and profiles are joined.

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/mixpanel:mixpanel-identity-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

mixpanel-identity-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mixpanel Identity API
  description: API for managing user identity in Mixpanel, including creating identities, creating aliases, and merging identities to accurately resolve users across multiple devices.
  version: '2.0'
  contact:
    name: Mixpanel Support
    email: support@mixpanel.com
    url: https://mixpanel.com/get-support
  termsOfService: https://mixpanel.com/legal/terms-of-use
servers:
- url: https://api.mixpanel.com
  description: Mixpanel US Data Residency
- url: https://api-eu.mixpanel.com
  description: Mixpanel EU Data Residency
security:
- basicAuth: []
tags:
- name: Identity
  description: Manage user identity resolution and merging
paths:
  /identity/create:
    post:
      operationId: createIdentity
      summary: Mixpanel Create identity
      description: Create an identity mapping between an anonymous (device) ID and an identified (user) ID. This links pre-login anonymous activity to a known user.
      tags:
      - Identity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - $identified_id
              - $anon_id
              - $token
              properties:
                $identified_id:
                  type: string
                  description: The known user ID (e.g., user ID from your database)
                $anon_id:
                  type: string
                  description: The anonymous device ID to link
                $token:
                  type: string
                  description: Mixpanel project token
      responses:
        '200':
          description: Identity created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
  /identity/create-alias:
    post:
      operationId: createAlias
      summary: Mixpanel Create alias
      description: Create an alias that maps one distinct_id to another. This is a legacy method for identity management. For new implementations, use the create identity endpoint with ID merge instead.
      tags:
      - Identity
      deprecated: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - alias
              - distinct_id
              - $token
              properties:
                alias:
                  type: string
                  description: The new alias to create
                distinct_id:
                  type: string
                  description: The existing distinct_id to link
                $token:
                  type: string
                  description: Mixpanel project token
      responses:
        '200':
          description: Alias created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
  /identity/merge:
    post:
      operationId: mergeIdentities
      summary: Mixpanel Merge identities
      description: Merge two distinct_id values into a single identity cluster. All events and profile data associated with both IDs will be combined. This operation is irreversible.
      tags:
      - Identity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - $distinct_ids
              - $token
              properties:
                $distinct_ids:
                  type: array
                  items:
                    type: string
                  minItems: 2
                  maxItems: 2
                  description: Array of two distinct_ids to merge
                $token:
                  type: string
                  description: Mixpanel project token
      responses:
        '200':
          description: Identities merged successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentityResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
components:
  schemas:
    IdentityResponse:
      type: object
      properties:
        status:
          type: integer
          enum:
          - 0
          - 1
          description: 1 for success, 0 for failure
        error:
          type: string
          description: Error message if status is 0
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Service account credentials for API authentication.
externalDocs:
  description: Mixpanel Identity API Documentation
  url: https://developer.mixpanel.com/reference/create-identity