Documentation

Developers

API References
Data Subject Request API

Data Subject Request API Version 1 and 2

Data Subject Request API Version 3

Platform API

Platform API Overview

Accounts

Apps

Audiences

Calculated Attributes

Data Points

Feeds

Field Transformations

Services

Users

Workspaces

Warehouse Sync API

Warehouse Sync API Overview

Warehouse Sync API Tutorial

Warehouse Sync API Reference

Data Mapping

Warehouse Sync SQL Reference

Warehouse Sync Troubleshooting Guide

ComposeID

Warehouse Sync API v2 Migration

Bulk Profile Deletion API Reference

Calculated Attributes Seeding API

Custom Access Roles API

Data Planning API

Group Identity API Reference

Pixel Service

Profile API

Events API

mParticle JSON Schema Reference

IDSync

Client SDKs
AMP

AMP SDK

Android

Initialization

Configuration

Network Security Configuration

Event Tracking

User Attributes

IDSync

Screen Events

Commerce Events

Location Tracking

Media

Kits

Application State and Session Management

Data Privacy Controls

Error Tracking

Opt Out

Push Notifications

WebView Integration

Logger

Preventing Blocked HTTP Traffic with CNAME

Linting Data Plans

Troubleshooting the Android SDK

API Reference

Upgrade to Version 5

Cordova

Cordova Plugin

Identity

Flutter

Getting Started

Usage

API Reference

Direct Url Routing

Direct URL Routing FAQ

Web

Android

iOS

iOS

Initialization

Configuration

Event Tracking

User Attributes

IDSync

Screen Tracking

Commerce Events

Location Tracking

Media

Kits

Application State and Session Management

Data Privacy Controls

Error Tracking

Opt Out

Push Notifications

Webview Integration

Upload Frequency

App Extensions

Preventing Blocked HTTP Traffic with CNAME

Linting Data Plans

Troubleshooting iOS SDK

Social Networks

iOS 14 Guide

iOS 15 FAQ

iOS 16 FAQ

iOS 17 FAQ

iOS 18 FAQ

API Reference

Upgrade to Version 7

React Native

Getting Started

Identity

Roku

Getting Started

Identity

Media

Unity

Upload Frequency

Getting Started

Opt Out

Initialize the SDK

Event Tracking

Commerce Tracking

Error Tracking

Screen Tracking

Identity

Location Tracking

Session Management

Xbox

Getting Started

Identity

Web

Initialization

Configuration

Content Security Policy

Event Tracking

User Attributes

IDSync

Page View Tracking

Commerce Events

Location Tracking

Media

Kits

Application State and Session Management

Data Privacy Controls

Error Tracking

Opt Out

Custom Logger

Persistence

Native Web Views

Self-Hosting

Multiple Instances

Web SDK via Google Tag Manager

Preventing Blocked HTTP Traffic with CNAME

Facebook Instant Articles

Troubleshooting the Web SDK

Browser Compatibility

Linting Data Plans

API Reference

Upgrade to Version 2 of the SDK

Xamarin

Getting Started

Identity

Web

Alexa

Server SDKs

Node SDK

Go SDK

Python SDK

Ruby SDK

Java SDK

Quickstart
Android

Overview

Step 1. Create an input

Step 2. Verify your input

Step 3. Set up your output

Step 4. Create a connection

Step 5. Verify your connection

Step 6. Track events

Step 7. Track user data

Step 8. Create a data plan

Step 9. Test your local app

HTTP Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

iOS Quick Start

Overview

Step 1. Create an input

Step 2. Verify your input

Step 3. Set up your output

Step 4. Create a connection

Step 5. Verify your connection

Step 6. Track events

Step 7. Track user data

Step 8. Create a data plan

Java Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

Node Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

Python Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

Web

Overview

Step 1. Create an input

Step 2. Verify your input

Step 3. Set up your output

Step 4. Create a connection

Step 5. Verify your connection

Step 6. Track events

Step 7. Track user data

Step 8. Create a data plan

Tools

mParticle Command Line Interface

Linting Tools

Smartype

Media SDKs

iOS

Web

Android

Guides
Partners

Introduction

Outbound Integrations

Outbound Integrations

Firehose Java SDK

Inbound Integrations

Kit Integrations

Overview

Android Kit Integration

JavaScript Kit Integration

iOS Kit Integration

Compose ID

Data Hosting Locations

Glossary

Rules Developer Guide

Migrate from Segment to mParticle

Migrate from Segment to mParticle

Migrate from Segment to Client-side mParticle

Migrate from Segment to Server-side mParticle

Segment-to-mParticle Migration Reference

API Credential Management

The Developer's Guided Journey to mParticle

Guides

Getting Started

Create an Input

Start capturing data

Connect an Event Output

Create an Audience

Connect an Audience Output

Transform and Enhance Your Data

Platform Guide
The New mParticle Experience

The new mParticle Experience

The Overview Map

Observability

Observability Overview

Observability User Guide

Observability Span Glossary

Introduction

Data Retention

Connections

Activity

Live Stream

Data Filter

Rules

Tiered Events

mParticle Users and Roles

Analytics Free Trial

Troubleshooting mParticle

Usage metering for value-based pricing (VBP)

Analytics

Introduction

Setup

Sync and Activate Analytics User Segments in mParticle

User Segment Activation

Welcome Page Announcements

Settings

Project Settings

Roles and Teammates

Organization Settings

Global Project Filters

Portfolio Analytics

Analytics Data Manager

Analytics Data Manager Overview

Events

Event Properties

User Properties

Revenue Mapping

Export Data

UTM Guide

Query Builder

Data Dictionary

Query Builder Overview

Modify Filters With And/Or Clauses

Query-time Sampling

Query Notes

Filter Where Clauses

Event vs. User Properties

Group By Clauses

Annotations

Cross-tool Compatibility

Apply All for Filter Where Clauses

Date Range and Time Settings Overview

Understanding the Screen View Event

Analyses

Analyses Introduction

Segmentation: Basics

Getting Started

Visualization Options

For Clauses

Date Range and Time Settings

Calculator

Numerical Settings

Segmentation: Advanced

Assisted Analysis

Properties Explorer

Frequency in Segmentation

Trends in Segmentation

Did [not] Perform Clauses

Cumulative vs. Non-Cumulative Analysis in Segmentation

Total Count of vs. Users Who Performed

Save Your Segmentation Analysis

Export Results in Segmentation

Explore Users from Segmentation

Funnels: Basics

Getting Started with Funnels

Group By Settings

Conversion Window

Tracking Properties

Date Range and Time Settings

Visualization Options

Interpreting a Funnel Analysis

Funnels: Advanced

Group By

Filters

Conversion over Time

Conversion Order

Trends

Funnel Direction

Multi-path Funnels

Analyze as Cohort from Funnel

Save a Funnel Analysis

Explore Users from a Funnel

Export Results from a Funnel

Cohorts

Getting Started with Cohorts

Analysis Modes

Save a Cohort Analysis

Export Results

Explore Users

Saved Analyses

Manage Analyses in Dashboards

Journeys

Getting Started

Event Menu

Visualization

Ending Event

Save a Journey Analysis

Users

Getting Started

User Activity Timelines

Time Settings

Export Results

Save A User Analysis

Dashboards

Dashboards––Getting Started

Manage Dashboards

Dashboard Filters

Organize Dashboards

Scheduled Reports

Favorites

Time and Interval Settings in Dashboards

Query Notes in Dashboards

User Aliasing

Analytics Resources

The Demo Environment

Keyboard Shortcuts

Tutorials

Analytics for Marketers

Analytics for Product Managers

Compare Conversion Across Acquisition Sources

Analyze Product Feature Usage

Identify Points of User Friction

Time-based Subscription Analysis

Dashboard Tips and Tricks

Understand Product Stickiness

Optimize User Flow with A/B Testing

User Segments

APIs

User Segments Export API

Dashboard Filter API

IDSync

IDSync Overview

Use Cases for IDSync

Components of IDSync

Store and Organize User Data

Identify Users

Default IDSync Configuration

Profile Conversion Strategy

Profile Link Strategy

Profile Isolation Strategy

Best Match Strategy

Aliasing

Data Master
Group Identity

Overview

Create and Manage Group Definitions

Introduction

Catalog

Live Stream

Data Plans

Data Plans

Blocked Data Backfill Guide

Personalization
Predictive Attributes

Predictive Attributes Overview

Create Predictive Attributes

Assess and Troubleshoot Predictions

Use Predictive Attributes in Campaigns

Predictive Audiences

Predictive Audiences Overview

Using Predictive Audiences

Introduction

Profiles

Calculated Attributes

Calculated Attributes Overview

Using Calculated Attributes

Create with AI Assistance

Calculated Attributes Reference

Audiences

Audiences Overview

Real-time Audiences

Standard Audiences

Journeys

Journeys Overview

Manage Journeys

Download an audience from a journey

Audience A/B testing from a journey

Journeys 2.0

Warehouse Sync

Data Privacy Controls

Data Subject Requests

Default Service Limits

Feeds

Cross-Account Audience Sharing

Approved Sub-Processors

Import Data with CSV Files

Import Data with CSV Files

CSV File Reference

Glossary

Video Index

Analytics (Deprecated)
Identity Providers

Single Sign-On (SSO)

Setup Examples

Settings

Debug Console

Data Warehouse Delay Alerting

Introduction

Developer Docs

Introduction

Integrations

Introduction

Rudderstack

Google Tag Manager

Segment

Data Warehouses and Data Lakes

Advanced Data Warehouse Settings

AWS Kinesis (Snowplow)

AWS Redshift (Define Your Own Schema)

AWS S3 (Snowplow Schema)

AWS S3 Integration (Define Your Own Schema)

BigQuery (Snowplow Schema)

BigQuery Firebase Schema

BigQuery (Define Your Own Schema)

GCP BigQuery Export

Snowflake (Snowplow Schema)

Snowplow Schema Overview

Snowflake (Define Your Own Schema)

APIs

REST API

Dashboard Filter API (Deprecated)

User Segments Export API (Deprecated)

SDKs

SDKs Introduction

React Native

iOS

Android

Java

JavaScript

Python

Object API

Developer Basics

Aliasing

IDSync

Overview

The Identity HTTP API is utilized by the mParticle iOS, Android, and Web SDKs, and can also be used directly. See our IDSync guide for more information.

Base URL

The mParticle Identity endpoint is available at:

https://identity.mparticle.com/v1

Swagger Documentation

For a full API reference, download the Swagger spec file and open it in the Swagger Editor.

Authentication

The mParticle Identity API supports three methods of authentication:

  1. Basic Authentication
  2. HMAC-based digest
  3. API key only

All methods use platform-level API credentials. To find or create API credentials, navigate to Setup > Inputs in the mParticle dashboard, and select a platform (iOS, Android, Web, etc).

Basic Authentication

You can use basic authentication in 2 ways:

  1. Many HTTP clients support basic authentication out of the box. Use the platform API Key for the “username” and your API Secret for “password”.
  2. Manually set the authentication header by encoding your key and secret together:

    2.1 Concatenate your API Key and API Secret together with a colon (:) separating the two: example-api-key:example-api-secret

    2.2 Base64 with UTF-8 encode the result:

ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlY3JldA==

2.3 Prefix the encoded string with Basic, including a space:

Basic ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlY3JldA==

2.4 Set resulting string as the Authorization header in your HTTP requests:

Authorization: Basic ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlY3JldA==

HMAC-based digest Authentication

The HMAC digest authentication method should be used by all clients of the Identity API. The requirements are as follows:

  1. Include your mParticle platform API Key as the x-mp-key header in the request.
  2. Include the current date in ISO 8601 format (ex 20170712T224127Z) as the Date header in the request.
  3. Include the signature described below as the x-mp-signature header in the request.

Building the signature

  1. Concatenate the following:

    • HTTP method (ex POST) + newline
    • ISO 8601 date from above (ex 20170712T224127Z) + newline
    • Path of the request (ex /v1/identify) + Body of the request

    For example, your concatenation should look similar to:

    POST
    20170712T224127Z
    /v1/identify{"client_sdk":{"platform":"android","sdk_vendor":"mparticle","sdk_version":"5.0.0"},"environment":"development","request_timestamp_ms":1499875715564,"request_id":"ad58a7c1-cf35-4be5-8c42-a09989f85cc1","known_identities":{"android_uuid":"f924f1e5707b34b7"}}
  2. Encode the string

    Using the utf-8 bytes of your mParticle platform API Secret (matching the API Key in the x-mp-key header), and the string above, create a byte encoding using HMAC SHA256 and convert the result to a hexadecimal string. Include that string as the x-mp-signature header.

API key-only Authentication

On devices that cannot support the above algorithm, you may use only the mParticle platform API Key for authentication, by providing it as the x-mp-key header. This is only selectively enabled - and is disabled by default.

Paths

/identify

The identify request should be used to establish a user identity, typically when an app is first initialized. It accepts a set of known identities and returns an mParticle ID, in accordance with an Identity Strategy. You should provide all available identifying information for the given user.

Request Body

The identify, search, login, and logout requests accept a POST body with the following schema.

You must always supply at least one known identity

{
  "client_sdk": {
    "platform": "ios",
    "sdk_vendor": "string",
    "sdk_version": "string"
  },
  "context": "string",
  "environment": "production",
  "request_id": "string",
  "request_timestamp_ms": 0,
  "previous_mpid": "string",
  "known_identities": {
    "ios_idfa": "string",
    "android_aaid": "string",
    "amp_id": "string",
    "android_uuid": "string",
    "ios_idfv": "string",
    "push_token": "string",
    "roku_publisher_id": "string",
    "roku_aid": "string",
    "fire_aid": "string",
    "customerid": "string",
    "email": "string",
    "facebook": "string",
    "facebookcustomaudienceid": "string",
    "google": "string",
    "microsoft": "string",
    "other": "string",
    "twitter": "string",
    "yahoo": "string",
    "device_application_stamp": "string"
  }
}
Property Type Required Description
client_sdk.platform enum Accepted values are ios, android, web, tvos, roku, alexa, smart_tv, fire, xbox, and other.
context string An encoded string representing the result of the previous request. This is available in the Response body.
environment enum Required Either production or development.
request_id string A UUID for the request.
request_timestamp_ms integer Unix timestamp for the request.
previous_mpid string The mParticle ID returned by the previous request.
known_identities object Required An object containing all available identifiers for a user, to be used by mParticle to match and return a user profile. This object must include at least one identifier. See the example for a full list of allowed identifiers.

Response Body

The identify, search, login, and logout return a body with the following schema:

{
  "context": "string",
  "mpid": "string",
  "matched_identities": {
    "ios_idfa": "string",
    "android_aaid": "string",
    "amp_id": "string",
    "android_uuid": "string",
    "ios_idfv": "string",
    "push_token": "string",
    "roku_publisher_id": "string",
    "roku_aid": "string",
    "fire_aid": "string",
    "customerid": "string",
    "email": "string",
    "facebook": "string",
    "facebookcustomaudienceid": "string",
    "google": "string",
    "microsoft": "string",
    "other": "string",
    "twitter": "string",
    "yahoo": "string",
    "device_application_stamp": "string"
  },
  "is_ephemeral": true
}
Property Type Description
context string Encoded version of the response, may be used as the context parameter in the next request
mpid string The mParticle ID of the matched user profile
matched_identities object Each identifier from the known_identities object in the request body that matched to an identifier in the returned user profile. N.B - only identifiers which were matched from your request will be returned. This is not a complete list of all identities associated with the user profile.
is_ephemeral bool The returned identity can be removed from local storage when you transition to the next identity

The search path should be used when you wish to determine the existence of a user identity. It is similar to identify in that it accepts a set of known identities and returns an mParticle ID. You should provide all available identifying information for the given user. However, the search path is different from identify in that if there are no matches, it will not create a new mParticle ID, it will return a user not found error message.

Request / Response

The search endpoint takes the same request and response objects as the Identify request.

/login and /logout

These paths should be used when you wish to transition user states in your app. For example, you may use /login to transition from your initial state with an anonymous user, to a logged in state with a known user. Just as with /identify, these paths accept a set of known identities and return an mParticle ID, in accordance with an Identity Strategy. You should provide all available identifying information for the given user.

For both /login and /logout, the known_identities object should refer to the user profile you wish to transition to. For logout, this may mean that you only include a device id or a device_application_stamp that you generate to associate with the unauthenticated user/device.

Request / Response

The login, and logout endpoints take the same request and response objects as the Identify request.

/{mParticle ID}/modify

Modify must be performed on an existing mParticle ID. It will mutate an existing user, and will never result in a new user. Use the JSON null sentinel to convey the addition or removal of an ID:

Request Body

{
  "client_sdk": {
    "platform": "ios",
    "sdk_vendor": "string",
    "sdk_version": "string"
  },
  "environment": "production",
  "request_id": "string",
  "request_timestamp_ms": 0,
  "identity_changes": [
    {
      "old_value": "string",
      "new_value": "string",
      "identity_type": "ios_idfa"
    },
    {
      "old_value": "string",
      "new_value": null,
      "identity_type": "ios_idfv"
    },
    {
      "old_value": null,
      "new_value": "email@example.com",
      "identity_type": "email"
    }
  ]
}

Errors

Error Description
400 Bad Request See the response body for detailed error message.
401 Unauthorized Request failed authentication.
429 Too Many Requests Too many requests have been submitted. To correct, perform an exponential backoff. Learn more about API throttling in Default Service Limits.
5xx Server Error A server-side error has occured. Try your request again.

Error Body

{
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ]
}

Was this page helpful?

    Last Updated: November 12, 2024