Data Subject Request API Version 1 and 2
Data Subject Request API Version 3
Key Management
Platform API Overview
Accounts
Apps
Audiences
Calculated Attributes
Data Points
Feeds
Field Transformations
Services
Users
Workspaces
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
Audit Logs API
Bulk Profile Deletion API Reference
Calculated Attributes Seeding API
Custom Access Roles API
Data Planning API
Household Reach API Reference
Profile API
Pixel Service
Events API
mParticle JSON Schema Reference
IDSync
AMP SDK
Direct URL Routing FAQ
Web
Android
iOS
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
Workspace Switching
Linting Data Plans
Troubleshooting the Android SDK
API Reference
Upgrade to Version 5
Upgrade to Version 6
Workspace Switching
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
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
Upgrade to Version 9
Getting Started
Identity
Upgrade to Version 4
Getting Started
Identity
Upload Frequency
Getting Started
Opt Out
Initialize the SDK
Event Tracking
Commerce Tracking
Error Tracking
Screen Tracking
Identity
Location Tracking
Session Management
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 3 of the SDK
Alexa
Introduction
Outbound Integrations
Firehose Java SDK
Inbound Integrations
Compose ID
Migrate from Segment to mParticle
Migrate from Segment to Client-side mParticle
Migrate from Segment to Server-side mParticle
Segment-to-mParticle Migration Reference
Data Hosting Locations
Glossary
Rules Developer Guide
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
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 1. Create an input
Step 2. Create an output
Step 3. Verify output
Node SDK
Go SDK
Python SDK
Ruby SDK
Java SDK
API Credential Management
The Developer's Guided Journey to mParticle
Introduction
Navigating mParticle
The Overview Map
Create an Input
Start capturing data
Connect an Event Output
Create an Audience
Connect an Audience Output
Transform and Enhance Your Data
Overview
Explore Your Data
Build Audiences
Create Predictions
Data and Privacy
mParticle Agent FAQ
System Alerts
Trends
Connections
Feeds
Import Data with CSV Files
CSV File Reference
SFTP Credentials
Live Stream
Data Catalog
Rules
Plans
Filters
Event Forwarding
Event Match Quality
Data Retention
Tiered Events
Blocked Data Backfill Guide
Warehouse Setup Overview
Overview
Overview
User Profiles
Identity Dashboard
Identity Resolution Log
Household Reach
Calculated Attributes Overview
Using Calculated Attributes
Create with AI Assistance
Calculated Attributes Reference
Predictions Overview
What's Changed in the New Predictions UI
View and Manage Predictions
Future Behavior Predictions Overview
Create Future Behavior Prediction
Manage Future Behavior Predictions
Create an Audience with Future Behavior Predictions
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
Overview
Real-Time Personalization
Audiences Overview
Create an Audience
Connect an Audience
Manage Audiences
Audience Insights
Audience Sharing
Match Boost
Inclusive & Exclusive Audiences Overview
Using Logic Blocks in Audiences
Combining Inclusive and Exclusive Audiences
Inclusive & Exclusive Audiences FAQ
Audience Expansion
Probabilistic Reach
Predictive Audiences Overview
Using Predictive Audiences
Composable Audiences Overview
User Guide Overview
Audience Setup
Frequently Asked Questions
Troubleshooting mParticle
Default Service Limits
Glossary
Event
Audience
Audience
Feed
Event
Audience
Cookie Sync
Platform SDK Events
Server-to-Server Events
Audience
Audience
Event
Audience
Feed
Event
Event
Event
Event
Data Warehouse
Event
Audience
Feed
Event
Event
Event
Audience
Event
Event
Event
Event
Feed
Event
Event
Event
Audience
Feed
Event
Event
Event
Custom Feed
Event
Data Warehouse
Event
Audience
Audience
Audience
Event
Audience
Event
Event
Event
Event
Event
Audience
Audience
Event
Event
Audience
Data Warehouse
Event
Event
Event
Audience
Cookie Sync
Event
Event
Event
Feed
Event
Feed
Event
Event
Event
Kit
Audience
Event
Audience
Event
Event
Event
Event
Feed
Audience
Event
Audience
Event
Event
Audience
Audience
Audience
Microsoft Ads Audience Integration
Audience
Event
Audience
Event
Event
Event
Event
Feed
Event
Event
Event
Event
Feed
Event
Audience
Event
Event
Event
Event
Event
Feed
Event
Event
Event
Event
Event
Audience
Event
Event
Event
Custom Pixel
Feed
Audience
Event
Event
Event
Audience
Data Warehouse
Event
Event
Event
Audience
Audience
Audience
Event
Loyalty Feed
Feed
Event
Audience
Audience
Audience
Feed
Cookie Sync
Audience
Event
Audience
Event
Audience
Event
Audience
Audience
Event
Event
Event
Event
Feed
Audience
Cookie Sync
Audience
Audience
Cookie Sync
The Profile API can be used to query identities, user attributes, audience memberships, and other data available on an mParticle User Profile, anywhere you can make an HTTP request. Profile API can be used to drive one-to-one personalized experiences for your users across any channel:
The base URL for the Profile API is https://api.mparticle.com.
The Profile API is authenticated with a bearer token. To create a bearer token, first create a set of API credentials in the UI.
To create a bearer token, send a POST request to mParticle’s SSO token endpoint at https://sso.auth.mparticle.com/oauth/token.
The JSON body of the request must contain:
client_id - the client ID, issued by mParticle when creating the API credentialsclient_secret - the client secret, issued by mParticle when creating the API credentialsaudience - set to a value of "https://api.mparticle.com"grant_type - set to a value of "client_credentials"curl --request POST \
--url https://sso.auth.mparticle.com/oauth/token \
--header 'content-type: application/json' \
--data '{"client_id":"your-client-id","client_secret":"your-client-secret","audience":"https://api.mparticle.com","grant_type":"client_credentials"}'POST /oauth/token HTTP/1.1
Host: sso.auth.mparticle.com
Content-Type: application/json
{
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"audience": "https://api.mparticle.com",
"grant_type": "client_credentials"
}A successful POST request to the token endpoint results in a JSON response as follows:
{
"access_token": "YWIxMjdi883GHBBDnjsdKAJQxNjdjYUUJABbg6hdI.8V6HhxW-",
"expires_in" : 28800,
"token_type": "Bearer"
}Subsequent requests to the API can then be authorized by setting the authorization header to:
Authorization: Bearer YWIxMjdi883GHBBDnjsdKAJQxNjdjYUUJABbg6hdI.8V6HhxW-
mParticle imposes default service limits on the Profile API. For the specific limits on retrieving user profiles using the Profile API, see Default Service Limits.
Do not submit client-side queries to Profile API from your application’s frontend. Instead, maximize performance in your app by creating a backend personalization service to submit these queries, acting as an intermediary between your app and the mParticle Profile API. This service can be built directly into your app’s existing backend framework, or it can an independent service.
As an example workflow:
A simple example personalization service implemented with Node and Express is available on GitHub.
GET /userprofile/v1/{orgID}/{accountId}/{workspaceId}/{mpid}?fields=device_identities,user_identities,user_attributes,audience_memberships,attribution,partner_identities
| Path Parameter | Type | Description |
|---|---|---|
{orgID} |
Integer | ID of the mParticle organization containing the user profile. |
{accountID} |
Integer | ID of the mParticle account containing the user profile. |
{workspaceID} |
Integer | ID of the mParticle workspace containing the user profile. |
{mpid} |
Integer | The mParticle ID for the user profile you want to retrieve. |
| Query Parameter | Type | Required | Description |
|---|---|---|---|
{fields} |
String | Yes | A comma-separated list of fields you want returned for the user profile. See list below for permitted values. |
List of supported fields that can be returned with a user profile:
device_identitiesuser_identitiesuser_attributes (includes any calculated attributes)audience_membershipsattributionpartner_identitiescurl \
-X GET \
-H "Authorization: Bearer {accessToken}" \
"https://api.mparticle.com/userprofile/v1/{orgId}/{accountId}/{workspaceId}/{mpid}?fields=device_identities,user_identities,user_attributes,audience_memberships,attribution,partner_identities"No request body.
A successful request receives a 200 response with a JSON object for the user profile.
{
"mpid": 9080350317581165000,
"created_timestamp_ms": 1574704283462,
"last_stored_timestamp_ms": 1575301484215,
"is_opted_out": false,
"limit_ad_tracking": null,
"device_identities": [
{
"type": "android_id",
"encoding": "none",
"value": "8789c459016a94b0"
},
{
"type": "unknown",
"encoding": "none",
"value": "0c48aafbd6c69b3e1921fab5ccb528397eb1000854db2b99b1efc8507884b07a"
},
{
"type": "google_advertising_id",
"encoding": "none",
"value": "481c8a31-7d5d-4d96-93a0-2de7427167fc"
},
{
"type": "unknown",
"encoding": "none",
"value": "1b4469f3fb1f7bee7ba6705d1ce4b9d8a23e76592c34aa6c4a4eea3d0a07aa64"
}
],
"user_identities": [
{
"type": "customer_id",
"encoding": "none",
"value": "Example-Customer-mxr15"
},
{
"type": "email",
"encoding": "none",
"value": "Example-Customer-mxr15@example.com"
}
],
"account_user_attributes": null,
"user_attributes": {
"ml_product_recs": [
"123849",
"294933",
"937592",
"500422"
],
"view_preference": "Dark Mode",
"tp_age": "18-34",
"tp_gender": "male",
"last_purchase_category": "Home Decor",
"churn_risk_score": "4",
"ltv": "342.1",
"$city": "New York",
"$state": "NY",
"$country": "USA",
"$firstname": "Marky",
"$lastname": "Mark"
},
"audience_memberships": [
{
"audience_id": 17802,
"audience_name": "Meret final CA test",
"expiration_timestamp_ms": null
},
{
"audience_id": 17918,
"audience_name": "Decor Remarketing",
"expiration_timestamp_ms": null
}
],
"partner_identities": {
"partner_1": [
{
"name": "partner_1_customerId",
"value": "a94f3e20-1cb7-49de-bf6a-537a204c4e15"
}
],
"partner_2": [
{
"name": "partner_2_userId",
"value": "c2d18b7f-8a1e-4e6e-a9b0-7b7e1c9a5d34"
}
]
}
}POST /userprofile/v1/resolve/{orgId}/{accountId}/{workspaceId}
Allows you to retrieve a profile without the mParticle ID. To use this method, your account must have an immutable identity configured in your identity strategy. An immutable identity is set only once and cannot be changed once it is set. It is usually the Customer ID.
| Path Parameter | Type | Description |
|---|---|---|
{orgID} |
Integer | ID of the mParticle organization containing the user profile. |
{accountID} |
Integer | ID of the mParticle account containing the user profile. |
{workspaceID} |
Integer | ID of the mParticle workspace containing the user profile. |
| Query Parameter | Type | Required | Description |
|---|---|---|---|
{fields} |
String | Yes | A comma-separated list of fields you want returned for the user profile. See list below for permitted values. |
List of supported fields that can be returned with a user profile:
device_identitiesuser_identitiesuser_attributes (including any calculated attributes)audience membershipsattributionpartner_identities| Name | Type | Required | Description |
|---|---|---|---|
environment_type |
string |
Yes | Either development or production. |
identity.type |
string |
Yes | The type of identity being sent. Must be an immutable identity type, like customer_id or other |
identity.value |
string |
Yes | The identity value. |
curl \
-X POST \
-H "Authorization: Bearer {accessToken}" \
"https://api.mparticle.com/userprofile/v1/resolve/{orgId}/{accountId}/{workspaceId}?fields=device_identities,user_identities,user_attributes,audience_memberships,attribution,partner_identities" \
-d "{ \"environment_type\": \"production\", \
\"identity\": {\"type\": \"customer_id\",\"value\": \"12345\"}}"{
"environment_type": "production",
"identity": {
"type": "customer_id",
"value": "12345"
}
}A successful request receives a 200 response with a JSON object for the user profile.
{
"mpid": 9080350317581165000,
"created_timestamp_ms": 1574704283462,
"last_stored_timestamp_ms": 1575301484215,
"is_opted_out": false,
"limit_ad_tracking": null,
"device_identities": [
{
"type": "android_id",
"encoding": "none",
"value": "8789c459016a94b0"
},
{
"type": "unknown",
"encoding": "none",
"value": "0c48aafbd6c69b3e1921fab5ccb528397eb1000854db2b99b1efc8507884b07a"
},
{
"type": "google_advertising_id",
"encoding": "none",
"value": "481c8a31-7d5d-4d96-93a0-2de7427167fc"
},
{
"type": "unknown",
"encoding": "none",
"value": "1b4469f3fb1f7bee7ba6705d1ce4b9d8a23e76592c34aa6c4a4eea3d0a07aa64"
}
],
"user_identities": [
{
"type": "customer_id",
"encoding": "none",
"value": "Example-Customer-mxr15"
},
{
"type": "email",
"encoding": "none",
"value": "Example-Customer-mxr15@example.com"
}
],
"account_user_attributes": null,
"user_attributes": {
"ml_product_recs": [
"123849",
"294933",
"937592",
"500422"
],
"view_preference": "Dark Mode",
"tp_age": "18-34",
"tp_gender": "male",
"last_purchase_category": "Home Decor",
"churn_risk_score": "4",
"ltv": "342.1",
"$city": "New York",
"$state": "NY",
"$country": "USA",
"$firstname": "Marky",
"$lastname": "Mark"
},
"audience_memberships": [
{
"audience_id": 17802,
"audience_name": "Meret final CA test",
"expiration_timestamp_ms": null
},
{
"audience_id": 17918,
"audience_name": "Decor Remarketing",
"expiration_timestamp_ms": null
}
],
"partner_identities": {
"partner_1": [
{
"name": "partner_1_customerId",
"value": "a94f3e20-1cb7-49de-bf6a-537a204c4e15"
}
],
"partner_2": [
{
"name": "partner_2_userId",
"value": "c2d18b7f-8a1e-4e6e-a9b0-7b7e1c9a5d34"
}
]
}
}| Response code | Error message | Description |
|---|---|---|
| 400 | Bad request | The request syntax is invalid or the requested profile is invalid. |
| 401 | Unauthorized | Verify that you have created the correct API credentials for the FeatureName API and that you are using the correct authentication method. |
| 403 | Forbidden | Verify that you have created the correct API credentials for the FeatureName API and that you are using the correct authentication method. |
| 404 | Not found | The user profile either does not exist, or has expired. |
| 429 | Too Many Requests | You have exceeded your provisioned limit. The endpoints may return a Retry-After response header with a value containing a non-negative decimal integer indicating the number of seconds to delay. If the header is not present, we recommend retrying your request in an exponential backoff pattern. Learn more about API throttling in Default Service Limits. |
| 503 | Service Unavailable | The service is unavailable, we recommend retrying your request in an exponential backoff pattern. |
| 5xx | Server Error | A server-side error occurred, try your request again. |
User profiles expire and will not be returned by the Profile API if they are not accessed or updated for a period of 90 days. The default 90 day expiration period may be adjusted depending on your contract with mParticle. For more information about your account’s profile expiration period, contact your account representative.
Was this page helpful?