Developers
API References
Data Subject Request API

Data Subject Request API Version 1 and 2

Data Subject Request API Version 3

Platform API

Key Management

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

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

Client SDKs
AMP

AMP SDK

Direct Url Routing

Direct URL Routing FAQ

Web

Android

iOS

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

Workspace Switching

Linting Data Plans

Troubleshooting the Android SDK

API Reference

Upgrade to Version 5

Upgrade to Version 6

Cordova

Cordova Plugin

Identity

Upgrade to Version 5

Flutter

Getting Started

Usage

API Reference

iOS

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

React Native

Getting Started

Identity

Upgrade to Version 4

.NET MAUI

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

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 3 of the SDK

Xbox

Getting Started

Identity

Alexa

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

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

Data Hosting Locations

Glossary

Rules Developer Guide

Media SDKs

iOS

Android

Web

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

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

HTTP 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

Server SDKs

Node SDK

Go SDK

Python SDK

Ruby SDK

Java SDK

Tools

mParticle Command Line Interface

Linting Tools

Smartype

API Credential Management

The Developer's Guided Journey to mParticle

Guides
Platform Overview

Introduction

Navigating mParticle

The Overview Map

Getting Started

Create an Input

Start capturing data

Connect an Event Output

Create an Audience

Connect an Audience Output

Transform and Enhance Your Data

mParticle Agent

Overview

Explore Your Data

Build Audiences

Create Predictions

Data and Privacy

mParticle Agent FAQ

Oversight

System Alerts

Observability

Observability Overview

Observability User Guide

Observability Troubleshooting Examples

Observability Span Glossary

Privacy

Data Subject Requests

Consent Filters

Data Privacy Controls

Data Platform

Trends

Setup

Connections

Feeds

Import Data with CSV Files

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

Data Warehouse
Composable Audiences

Warehouse Setup Overview

Connections

Connections Overview

Google BigQuery

Databricks

Amazon Redshift

Snowflake

Data Models

Data Models Overview

Create a User Data Model

Create an Event Data Model

Create a Generic Data Model

Warehouse Sync

Warehouse Sync User Guide

Historical Data and Warehouse Sync

Customer 360

Overview

User Profiles

Overview

User Profiles

Identity Dashboard

Identity Resolution Log

Household Reach

Calculated Attributes

Calculated Attributes Overview

Using Calculated Attributes

Create with AI Assistance

Calculated Attributes Reference

Predictions

Predictions Overview

What's Changed in the New Predictions UI

View and Manage Predictions

Predict Future Behavior

Future Behavior Predictions Overview

Create Future Behavior Prediction

Manage Future Behavior Predictions

Create an Audience with Future Behavior Predictions

Next Best Action

Next Best Action Overview

Create a Next Best Action Prediction

Manage Next Best Actions

Create an Audience with Next Best Actions

Find Similar Customers

Similar Customer Predictions Overview

Create Similar Customer Prediction

Manage Similar Customer Predictions

Build an Audience with Similar Customer Predictions

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

Probabilistic Identity Resolution

Overview

Real-Time Personalization

Audiences

Audiences Overview

Create an Audience

Connect an Audience

Manage Audiences

Audience Insights

Audience Sharing

Match Boost

Inclusive & Exclusive Audiences (Early Access)

Inclusive & Exclusive Audiences Overview

Using Logic Blocks in Audiences

Combining Inclusive and Exclusive Audiences

Inclusive & Exclusive Audiences FAQ

Audience Expansion

Probabilistic Reach

Predictive Audiences

Predictive Audiences Overview

Using Predictive Audiences

Composable Audiences

Composable Audiences Overview

User Guide

User Guide Overview

Audience Setup

Frequently Asked Questions

Settings
Platform

Platform Configuration

mParticle Users and Roles

Key Management

Notifications

Audit Logs

Billing

Usage and Billing Report

Usage metering for value-based pricing (VBP)

Troubleshooting mParticle

Default Service Limits

Glossary

Integrations
24i

Event

Aarki

Audience

ABTasty

Audience

Actable

Feed

Adikteev

Audience

Event

AdChemix

Event

Adjust

Feed

Event

AdMedia

Audience

Adobe Marketing Cloud

Cookie Sync

Platform SDK Events

Server-to-Server Events

Adobe Audience Manager

Audience

Adobe Campaign Manager

Audience

Adobe Experience Platform

Event

Adobe Target

Audience

AdPredictive

Feed

AgilOne

Event

Airship

Audience

Event

Feed

Algolia

Event

Amazon Advertising

Audience

Event

Amazon Kinesis

Event

Amazon Kinesis Firehose

Audience

Event

Amazon S3

Audience

Event

Amazon SNS

Event

Amazon Redshift

Data Warehouse

Amazon SQS

Event

Amobee

Audience

Amplitude

Event

Forwarding Data Subject Requests

Ampush

Audience

Event

Antavo

Feed

Anodot

Event

AppLovin

Audience

Event

Apteligent

Event

Attentive

Event

Feed

AppsFlyer

Event

Feed

Forwarding Data Subject Requests

Microsoft Azure Blob Storage

Event

Bidease

Audience

Awin

Event

Batch

Audience

Event

Bluecore

Event

Bing Ads

Event

Apptimize

Event

Bluedot

Feed

Blueshift

Event

Feed

Forwarding Data Subject Requests

Branch S2S Event

Event

Branch

Feed

Event

Forwarding Data Subject Requests

Apptentive

Event

Braze

Audience

Feed

Forwarding Data Subject Requests

Event

Bugsnag

Event

Button

Audience

Event

Cadent

Audience

Census

Feed

CleverTap

Feed

Audience

Event

Conversant

Event

comScore

Event

Cordial

Audience

Feed

Cortex

Event

Forwarding Data Subject Requests

Feed

Criteo

Audience

Event

Crossing Minds

Event

CustomerGlu

Feed

Event

Custom Feed

Custom Feed

Customer.io

Audience

Feed

Event

Datadog

Event

Databricks

Data Warehouse

Didomi

Event

Dynamic Yield

Audience

Event

Edge226

Audience

Eagle Eye

Audience

Emarsys

Audience

Epsilon

Event

Everflow

Audience

Facebook

Audience

Event

Google Analytics for Firebase

Event

Facebook Offline Conversions

Event

Flurry

Event

ForeSee

Event

Foursquare

Feed

Audience

Flybits

Event

FreeWheel Data Suite

Audience

Google Ads

Event

Audience

Google Ad Manager

Audience

Google Analytics

Event

Friendbuy

Event

Google BigQuery

Audience

Data Warehouse

Google Enhanced Conversions

Event

Google Cloud Storage

Audience

Event

Google Analytics 4

Event

Google Tag Manager

Event

Google Marketing Platform

Audience

Cookie Sync

Event

Google Pub/Sub

Event

Google Marketing Platform Offline Conversions

Event

Herow

Feed

Heap

Event

Hightouch

Feed

Hyperlocology

Event

Impact

Event

Ibotta

Event

ID5

Kit

InMarket

Audience

Insider

Audience

Event

Feed

Inspectlet

Event

InMobi

Audience

Event

ironSource

Audience

Intercom

Event

Iterable

Event

Audience

Feed

iPost

Audience

Feed

Jampp

Audience

Event

Kafka

Event

Kissmetrics

Event

Kayzen

Audience

Event

Klaviyo

Audience

Event

Kochava

Event

Forwarding Data Subject Requests

Feed

Kubit

Event

Leanplum

Audience

Event

Feed

Liftoff

Event

Audience

LaunchDarkly

Feed

LifeStreet

Audience

LinkedIn

Audience

LinkedIn Conversions API Integration

LiveLike

Event

Liveramp

Audience

mAdme Technologies

Event

Localytics

Event

MadHive

Audience

Mailchimp

Audience

Feed

Event

Marigold

Audience

Mautic

Audience

Event

MediaMath

Audience

Microsoft Ads

Microsoft Ads Audience Integration

Mediasmart

Audience

Moloco

Audience

Event

Mixpanel

Audience

Event

Mixpanel Cohort Feed Integration

Forwarding Data Subject Requests

Microsoft Azure Event Hubs

Event

Mintegral

Audience

MoEngage

Audience

Feed

Event

Monetate

Event

Movable Ink

Event

Multiplied

Event

Movable Ink - V2

Event

Nami ML

Feed

myTarget

Audience

Event

Nanigans

Event

Narrative

Audience

Feed

Event

Neura

Event

NCR Aloha

Event

OneTrust

Event

OpenAI

Event

Audience

Optimizely

Audience

Event

Oracle Responsys

Audience

Event

Paytronix

Feed

Oracle BlueKai

Event

Persona.ly

Audience

Personify XP

Event

PieEye

Inbound Data Subject Requests

Plarin

Event

Pilgrim

Feed

Event

Pinterest

Audience

Event

Postie

Audience

Event

Primer

Event

Pushwoosh

Audience

Event

Punchh

Audience

Feed

Event

Rakuten

Event

Qualtrics

Event

Radar

Event

Feed

Reddit

Audience

Event

RevenueCat

Feed

Regal

Event

Remerge

Audience

Event

Quantcast

Event

Retina AI

Feed

Event

Reveal Mobile

Event

Sailthru

Audience

Event

Rokt

Audience

Event

Rokt Thanks and Pay+

RTB House

Audience

Event

Salesforce Email

Audience

Event

Feed

Salesforce Sales and Service Cloud

Event

Feed

Salesforce Mobile Push

Event

Samba TV

Audience

Event

Scalarr

Event

SessionM

Event

Feed

SFTP

Audience

SendGrid

Audience

Feed

ShareThis

Audience

Feed

SimpleReach

Event

Singular

Event

Feed

Singular-DEPRECATED

Event

Skyhook

Event

Shopify

Custom Pixel

Feed

Smadex

Audience

Slack

Event

SmarterHQ

Event

Snapchat Conversions

Event

Snapchat

Audience

Event

Snowflake

Audience

Data Warehouse

Split

Event

Feed

Spotify

Event

Splunk MINT

Event

Snowplow

Event

Sprig

Audience

Event

StartApp

Audience

Stormly

Audience

Event

Statsig

Event

Feed

Tapad

Audience

Talon.One

Audience

Event

Loyalty Feed

Feed

Swrve

Feed

Event

Taplytics

Event

Taptica

Audience

Tapjoy

Audience

Teak

Audience

Ticketure

Feed

TikTok Event

Audience

Audience (Deprecated)

Audience Migration

Event

The Trade Desk

Cookie Sync

Audience

Event

Treasure Data

Event

Audience

Triton Digital

Audience

TUNE

Event

Twitter

Audience

Event

Vibe

Audience

Valid

Event

Voucherify

Event

Audience

Vkontakte

Audience

Vungle

Audience

Webtrends

Event

White Label Loyalty

Event

Wootric

Event

X

Event

Webhook

Event

Yotpo

Feed

Yahoo (formerly Verizon Media)

Audience

Cookie Sync

Z2A Digital

Audience

Event

YouAppi

Audience

Zendesk

Event

Feed

Xandr

Audience

Cookie Sync

Calculated Attributes Seeding API

The Calculated Attributes (CA) Seeding API allows you to programmatically set calculated attribute seed values and user attributes for your users. Before using this API, we recommend that you read about the workflow of calculated attribute seeding here.

Authentication

The CA Seeding API is secured via basic authentication. Credentials are issued at the level of an mParticle Workspace. You can obtain credentials for your Workspace from the Workspace Settings screen.

To view workspace credentials:

  1. Click on the current workspace name in the upper left corner.
  2. Click Settings.
  3. Click on the name of a workspace to display the Edit Workspace settings page. Edit workspace settings

You can authenticate in 2 ways:

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

    • Concatenate your application key and secret together with a colon (:) separating the two: example-api-key:example-api-secret
    • Base64 with UTF-8 encode the result: ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlY3JldA==
    • Prefix the encoded string with the authorization method, including a space: Basic ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlY3JldA==
    • Set resulting string as the Authorization header in your HTTP requests: Authorization: Basic ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlY3JldA==

Endpoint

Our HTTP base URL is: https://s2s.mparticle.com. If you are using a non-US data center, look up your base URL here.

Paths

This API supports two paths: one for setting calculated attribute seeds for a single user and one for updating many users in bulk.

Single User Seeds

The path is: /v2/calculatedattributes.

This allows you to set seed values and user attributes for a single user at a time.

Overall Structure

{
  "environment": "development",
  "mpid": 7346244611012968789,
  "identities": {...},
  "calculated_attributes": {
    "workspace": [...]
  },
  "user_attributes": {...}
}

Properties

Property Name Data Type Required Description
environment string Required production or development
mpid Numeric Optional The MPID of the user being updated, if known.
identities object Optional The identities of the user to update.
calculated_attributes object Required The seed values of calculated attributes to set.
user_attributes object Optional The user attributes of the user to update.

Either mpid or identities are required to find the correct user profile. If mpid is set, then the identities will be ignored.

Identities Object

This object contains identities used to identify the user to which updates are made. The identities block is a key-value object of many identity or device types and their corresponding identity.

  • User identity types:

  • Device identity types:

    • android_id
    • google_advertising_id
    • ios_advertising_id
    • ios_vendor_id
    • roku_advertising_id
    • roku_publisher_id
    • fire_advertising_id
    • microsoft_advertising_id
    • microsoft_publisher_id

Example identities objects:

"identities": {
    "email": "example@sample.com",
    "other_id_4": "user_example4",
    "ios_advertising_id": "016a9968-abea-d0b1-b0d8-4d3e4ed0c57a"
  }
"identities": {
    "google_advertising_id": "33ef01aa-401f-0f4e-29ce-bd142e68233a",
    "customer_id": "1234"
  }

Calculated Attributes Object

This object contains the calculated attribute and seeding information. It is used only for seeding and cannot be used for any other action on a calculated attribute.

  "calculated_attributes": {
      "workspace": [
        {
          "attribute_name": "LTV",
          "calculation_type": "sum",
          "cutoff_date": "2019-12-01",
          "seed": {...}
        }
      ]
  }

The calculated attribute seed information is set under the workspace property. The structure of these objects depends on the calculation_type of the calculated attribute (also passed in the corresponding field).

Property Name Data Type Required Description
attribute_name string Required The name of the calculated attribute to seed.
calculation_type string Required The calculation type for this calculated attribute, see below for available calculation types.
cutoff_date Date value in yyyy-MM-dd Required The cutoff date prior to which mParticle should ignore events in CA calculation.
seed object Required CA seed.
Seed Object

This object contains the seed values for a single calculated attribute. The fields depend on the calculation type as defined below.

{
  "seed": {
    "value": "100"
  }
}
Property Name Data Type Required Description
value string Optional The value to seed, used for single value.
key_value_pairs object Optional A map with keys and values of type string.
list array Optional An array of strings, used for list data.

One of the value, key_value_pairs, or list objects are required, depending on the below table:

Calculation Type Value format Description
count value Pass in the current count.
sum value Pass in the current sum.
minimum value Pass in the current minimum value.
maximum value Pass in the current maximum value.
average key_value_pairs Pass values for the keys sum and count in to calculate average. count must be a positive integer.
first_occurrence value Pass in the first value seen.
last_occurrence value Pass in the last value seen.
first_occurrence_timestamp value Pass in the first seen timestamp as UNIX epoch in milliseconds.
last_occurrence_timestamp value Pass in the last seen timestamp as UNIX epoch in milliseconds.
unique_list list Pass in the unique list.
unique_values_count list Pass in the unique list of values.
most_frequent key_value_pairs Pass in values and counts in pairs.

User Attributes

This object contains user attributes to update.

  "user_attributes": {
      "workspace": [
        {
          "attribute_name": "User Tier",
          "attribute_value": "Free"
        }
      ]
  }

Updates to user attributes are nested under the workspace property. Each user attribute will either be created or updated if exists.

Property Name Data Type Required Description
attribute_name string Required The name of the user attribute.
attribute_value string Required The value of the user attribute.

Bulk Seeds

The path is: /v2/bulkcalculatedattributes

This allows you to send an array of users, each user with its CA seeds and user attributes. The whole request will either succeed or fail, i.e., we don’t partially ingest data.

Overall Structure

[
  {
    "environment": "development",
    "mpid": 7346244611012968789,
    "identities": {...},
    "calculated_attributes": {
      "workspace": [...]
    },
    "user_attributes": {
      "workspace": [...]
    }
  },
  {
    "environment": "development",
    "mpid": 482309279432794321,
    "identities": {...},
    "calculated_attributes": {
      "workspace": [...]
    },
    "user_attributes": {
      "workspace": [...]
    }
  }
]

The structure of each object in the array is the same as defined above for single user requests: calculated attributes object.

Sample Requests

Single User Updates

POST https://s2s.mparticle.com/v2/calculatedattributes/
Content-Type: application/json
Authorization: Basic <your-token-here>

{
  "environment": "development",
  "identities": {
    "customer_id": "123xyz",
    "google_advertising_id": "82416a37-84d7-417f-84f3-a5b5c6a9c570"
  },
  "user_attributes": {
    "workspace": [
      {
        "attribute_name": "User Tier",
        "attribute_value": "Free",
      }
    ]
  },
  "calculated_attributes": {
    "workspace": [
      {
        "attribute_name": "LTV",
        "calculation_type": "sum",
        "cutoff_date": "2019-12-01",
        "seed": {
          "value": 100.5
        }
      },
      {
        "attribute_name": "Product Interests",
        "calculation_type": "unique_list",
        "cutoff_date": "2019-12-01",
        "seed": {
          "list": [
            "travel",
            "pets",
            "kitchen"
          ]
        }
      },
      {
        "attribute_name": "Unique product view count",
        "calculation_type": "unique_values_count",
        "cutoff_date": "2019-12-01",
        "seed": {
          "list": [
            "air jordan",
            "cup",
            "microwave"
          ]
        }
      },
      {
        "attribute_name": "Average Session Length",
        "calculation_type": "average",
        "cutoff_date": "2019-12-01",
        "seed": {
          "key_value_pairs": {
            "sum": 299.2,
            "count": 20
          }
        }
      },
      {
        "attribute_name": "Last seen value",
        "calculation_type": "last_occurrence",
        "cutoff_date": "2019-12-01",
        "seed": {
          "value": "some value"
        }
      },
      {
        "attribute_name": "First seen value",
        "calculation_type": "first_occurrence",
        "cutoff_date": "2019-12-01",
        "seed": {
          "value": "some value"
        }
      },
      {
        "attribute_name": "Last seen time",
        "calculation_type": "last_occurrence_timestamp",
        "cutoff_date": "2019-12-01",
        "seed": {
          "value": 1582589378000
        }
      },
      {
        "attribute_name": "First seen time",
        "calculation_type": "first_occurrence_timestamp",
        "cutoff_date": "2019-12-01",
        "seed": {
          "value": 1582589378000
        }
      },
      {
        "attribute_name": "Min value",
        "calculation_type": "min",
        "cutoff_date": "2019-12-01",
        "seed": {
          "value": 123
        }
      },
      {
        "attribute_name": "Max value",
        "calculation_type": "max",
        "cutoff_date": "2019-12-01",
        "seed": {
          "value": 123
        }
      },
      {
        "attribute_name": "Favorite Item",
        "calculation_type": "most_frequent",
        "cutoff_date": "2019-12-01",
        "seed": {
          "key_value_pairs": {
            "ice cream": 10,
            "vegen": 5,
            "steak": 2
          }
        }
      }
    ]
  }
}

Bulk Updates

POST https://s2s.mparticle.com/v2/bulkcalculatedattributes/
Content-Type: application/json
Authorization: Basic <your-token-here>

[
  {
    "environment": "development",
    "identities": {
      "customer_id": "123xyz",
      "google_advertising_id": "82416a37-84d7-417f-84f3-a5b5c6a9c570"
    },
    "user_attributes": {
      "workspace": [
        {
          "attribute_name": "User Tier",
          "attribute_value": "Free",
        }
      ]
    },
    "calculated_attributes": {
      "workspace": [
        {
          "attribute_name": "LTV",
          "calculation_type": "sum",
          "cutoff_date": "2019-12-01",
          "seed": {
            "value": 100.5
          }
        },
        {
          "attribute_name": "Average Session Length",
          "calculation_type": "average",
          "cutoff_date": "2019-12-01",
          "seed": {
            "key_value_pairs": {
              "sum": 299.2,
              "count": 20
            }
          }
        }
      ]
    }
  },
  {
    "environment": "development",
    "identities": {
      "customer_id": "abc234"
    },
    "calculated_attributes": {
      "workspace": [
        {
          "attribute_name": "LTV",
          "calculation_type": "sum",
          "cutoff_date": "2019-12-01",
          "seed": {
            "value": 80
          }
        }
      ]
    }
  }
]

Rate Limits

Requests sent to the Calculated Attributes Seeding API contribute to the request rate of the Events API.

For more information about default service limits related to event batches, see Default Service Limits.

Response

You should inspect the status code of the response to determine if the POST has been accepted or if an error occurred.

Status Code Notes
202 Accepted The POST was accepted.
400 Bad Request The request JSON was malformed JSON or had missing fields.
401 Unauthorized The authentication header is missing.
403 Forbidden The authentication header is present, but invalid.
429 Too Many Requests You have exceeded your provisioned limit. We recommend retrying your request in an exponential backoff pattern. Learn more about API throttling in Default Service Limits.
503 Service Unavailable We recommend retrying your request in an exponential backoff pattern
5xx Server Error A server-side error has occurred, please try your request again.

The whole request either succeed or fail, i.e., we don’t partially accept the data.

Response Body

In some cases, the server can provide additional information the error that occurred in the response body.

The response body is optionally sent from the server and will not be included if additional details on the error are not known.

The format of the error message is CA name: error message.

{
    "errors" :
    [
        {
            "code": "BAD_REQUEST",
            "message": "test sum: No matching calculated attribute definition found"
        },
        {
            "code": "BAD_REQUEST",
            "message": "LTV: Seed value must be numeric"
        }
    ]
}

Was this page helpful?

    Last Updated: December 3, 2026