Skip to main content
GET
Service Accounts

Service Accounts API

Manage service accounts for programmatic access to Mixpanel APIs.

Base URL

Authentication

Use Service Account credentials with HTTP Basic Auth.

List Service Accounts

Get all service accounts for your organization.
integer
required
Your Mixpanel organization ID

Example Request

Response


Create Service Account

Create a new service account for your organization.
integer
required
Your Mixpanel organization ID
string
required
A descriptive name for the service account
string
The service account’s roleOptions: owner, admin, analyst, consumer
string
Expiration date and time in ISO formatExample: 2025-12-31T23:59:59Z
array
List of projects to add the service account to

Example Request

Response

The token (secret) is only returned once during creation. Store it securely - it cannot be retrieved later.

Get Service Account

Retrieve details of a specific service account.
integer
required
Your Mixpanel organization ID
integer
required
The service account ID

Example Request


Delete Service Account

Remove a service account from your organization.
integer
required
Your Mixpanel organization ID
integer
required
The service account ID to delete

Example Request


Add Service Account to Projects

Add one or more service accounts to one or more projects.
integer
required
Your Mixpanel organization ID
array
required
List of projects and roles
array
required
Array of service account IDs to add

Example Request


Remove Service Account from Projects

integer
required
Your Mixpanel organization ID
array
required
List of projects to remove from

Example Request

Best Practices

Use dedicated service accounts for different integrations:
  • data-pipeline-bot: For data exports
  • ci-cd-bot: For CI/CD integrations
  • analytics-dashboard: For custom dashboards
Grant only the minimum required permissions:
Always set expiration dates for security:
Rotate service account credentials periodically: