Mixpanel Imports API

Manage and trigger warehouse import runs

OpenAPI Specification

mixpanel-imports-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Mixpanel Annotations Imports 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: Imports
  description: Manage and trigger warehouse import runs
paths:
  /projects/{projectId}/warehouse-sources/{sourceId}/tables:
    get:
      operationId: listWarehouseTables
      summary: Mixpanel List warehouse tables
      description: List all tables configured for import from a warehouse source.
      tags:
      - Imports
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/sourceId'
      responses:
        '200':
          description: List of configured tables
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/WarehouseTable'
        '401':
          description: Unauthorized
        '404':
          description: Source not found
  /projects/{projectId}/warehouse-sources/{sourceId}/runs:
    get:
      operationId: listWarehouseRuns
      summary: Mixpanel List import runs
      description: Retrieve the import run history for a specific warehouse source.
      tags:
      - Imports
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/sourceId'
      responses:
        '200':
          description: List of import runs
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/WarehouseRun'
        '401':
          description: Unauthorized
        '404':
          description: Source not found
    post:
      operationId: triggerWarehouseRun
      summary: Mixpanel Trigger import run
      description: Manually trigger an import run for a warehouse source connection.
      tags:
      - Imports
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/sourceId'
      responses:
        '200':
          description: Import run triggered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WarehouseRun'
        '401':
          description: Unauthorized
        '404':
          description: Source not found
        '429':
          description: Rate limit exceeded - too many runs triggered
components:
  parameters:
    projectId:
      name: projectId
      in: path
      required: true
      schema:
        type: integer
      description: The Mixpanel project ID
    sourceId:
      name: sourceId
      in: path
      required: true
      schema:
        type: string
      description: The warehouse source connection ID
  schemas:
    WarehouseTable:
      type: object
      properties:
        tableName:
          type: string
          description: Full table name
        importType:
          type: string
          enum:
          - event
          - user
          - group
          - lookup_table
          description: Import type
        rowCount:
          type: integer
          description: Number of rows in the table
        lastImportedAt:
          type: string
          format: date-time
          description: When this table was last imported
    WarehouseRun:
      type: object
      properties:
        id:
          type: string
          description: Run identifier
        status:
          type: string
          enum:
          - running
          - completed
          - failed
          description: Run status
        startTime:
          type: string
          format: date-time
          description: When the run started
        endTime:
          type: string
          format: date-time
          description: When the run completed
        recordsImported:
          type: integer
          description: Total records imported
        errors:
          type: array
          items:
            type: string
          description: Error messages if any
  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