Mixpanel Group Profiles API

Manage group analytics profiles

OpenAPI Specification

mixpanel-group-profiles-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Mixpanel Annotations Group Profiles API
  description: API for creating, retrieving, updating, and deleting annotations that label specific points in time on Mixpanel charts with descriptions, useful for marking product launches, campaigns, or data anomalies.
  version: '1.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://mixpanel.com/api/app
  description: Mixpanel US Data Residency
- url: https://eu.mixpanel.com/api/app
  description: Mixpanel EU Data Residency
security:
- basicAuth: []
tags:
- name: Group Profiles
  description: Manage group analytics profiles
paths:
  /groups:
    post:
      operationId: updateGroupProfile
      summary: Mixpanel Update group profile
      description: Create or update group profile properties. Groups allow you to associate events with entities like companies, accounts, or any custom group type.
      tags:
      - Group Profiles
      parameters:
      - $ref: '#/components/parameters/verbose'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/GroupUpdate'
              - type: array
                items:
                  $ref: '#/components/schemas/GroupUpdate'
                maxItems: 2000
      responses:
        '200':
          description: Group profile updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrackResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
      security:
      - projectToken: []
components:
  schemas:
    GroupUpdate:
      type: object
      required:
      - $token
      - $group_key
      - $group_id
      properties:
        $token:
          type: string
          description: Mixpanel project token
        $group_key:
          type: string
          description: The group key (e.g., company)
        $group_id:
          type: string
          description: The group identifier value
        $set:
          type: object
          additionalProperties: true
          description: Properties to set on the group profile
        $set_once:
          type: object
          additionalProperties: true
          description: Properties to set only if not already set
        $unset:
          type: array
          items:
            type: string
          description: Property names to remove from the group profile
        $delete:
          type: string
          description: Set to empty string to delete the group profile
    TrackResponse:
      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
  parameters:
    verbose:
      name: verbose
      in: query
      schema:
        type: integer
        enum:
        - 0
        - 1
      description: When set to 1, returns a JSON response with status and error details
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Service account credentials for API authentication.
externalDocs:
  description: Mixpanel Annotations API Documentation
  url: https://developer.mixpanel.com/reference/create-annotation