Introduction

You can use the MMM Data API to create one-off or recurring projects.

In order to create projects ensure your service account Access level is set to 'Admin' or 'Writer'.

Set Writer Access
Level

When generating the OAuth Token use the https://www.googleapis.com/auth/mmm_data scope:

OAUTH_TOKEN=$(gcloud auth \
--impersonate-service-account=YOUR_SERVICE_ACCOUNT print-access-token \
--scopes=https://www.googleapis.com/auth/mmm_data)

In order to create a project send a POST request to the /projects endpoint:

curl -X POST -H "Authorization: Bearer $OAUTH_TOKEN" \
-H "Content-type: application/json" -d @project_example.json \
"https://mmmdata.googleapis.com/v0/accounts/YOUR_MMM_DATA_PLATFORM_ACCOUNT_ID/projects"

Sample payload

{
  "display_name": "My MMM Project",
  "start_date": {
    "year": 2024,
    "month": 1,
    "day": 1
  },
  "end_date": {
    "year": 2024,
    "month": 12,
    "day": 31
  },
  "region_code": "US",
  "brand_labels": [
    "MyBrand"
  ],
  "report_types": [
    "PERFORMANCE_GOOGLE_ADS",
    "PERFORMANCE_DV360"
  ],
  "contact_email": "my-email@domains.com",
  "data_time_granularity": "WEEKLY_MONDAY",
  "data_geo_granularity": "COUNTRY_LEVEL",
  "cadence": "CADENCE_ONCE",
  "model_type": "MERIDIAN",
  "requested_ad_entities": {
    "google_ads_campaign_ids": [
      "1111111111",
      "2222222222"
    ],
    "dv360_insertion_order_ids": [
      "3333333333"
    ]
  }
}

If you're a vendor also include the advertiser field. Set it to the selected advertiser path:

"advertiser": "accounts/YOUR_MMM_DATA_PLATFORM_ACCOUNT_ID/advertisers/ADVERTISER_ID"

API Limits

Be aware of the following limits when using the create project API.

Number of requested_ad_entities

The total number of ad entity IDs (e.g., google_ads_campaign_ids, dv360_insertion_order_ids) across all types in a single requested_ad_entities payload cannot exceed 10,000.

Quota Limits

There are some quota limits for how many projects can be created for the same account. There are three types of limits:

  • Daily limit -> how many projects can be created within 24 hours.
  • Monthly limit -> how many projects can be created within 30 days.
  • Total in progress limit -> how many projects are still in progressing state, for example, data collection or data delivery is in progress

If you are an advertiser creating project for yourself, you can ignore the "for each vendor" column.

Type For each vendor For each advertiser For each country
Daily 50 20 5
Monthly 150 50 20
Total in progress 80 25 20