Monetize Manage API
Overview
The Monetize Manage API allows Unity Ads clients to manage their Ad Units and Placements programmatically.
The API currently offers endpoints that allow you to:
- Manage Placements
- Manage eCPM targets
Rate limits
The API returns a HTTP status code if a request exceeds one of the following rate limits:
429- The maximum number of requests per IP address: 5 requests per second, and 4000 requests per 30-minute period.
- The maximum number of operations that create or modify resources (or
POST): 1000 requests per 30-minute period, or 5 times per a second.PUT - The maximum number of Changes to an individual Placement: 5 per day, however you can bundle multiple changes into a single call.
- The maximum number of operations that create or modify projects (or
POST): 10 times per 30-minute period, or 1 times per a second.PATCH
Type | Limit (requests/second) | Limit (requests/30 minutes) |
|---|---|---|
| All requests | 5 | 4000 |
| 5 | 1000 |
Useful links
Deprecation Policy
If a newer version of the API is released or if the service is discontinued, the API or one of its versions may be deprecated and eventually shutdown.
Deprecation of an API version will occur in 2 steps:
- Unity will email Organization owners, informing them of the new version's immenent release and the current version's deprecation date. A deprecation notice will appear on the header of any deprecated API, and the documentation will be updated as such.
- After 3 months of continued support for a deprecated version, Unity may cease support or shut down the version entirely. A complete shutdown notice will be sent 1 month in advance.
Change Log
v1.0.0
- Added functionality to manipulate with Ad-Units
- Added IDs to target
- Added project create/patch endpoints
Authentication
To learn how to authenticate your requests, please visit the Getting Started section.
Authentication
| Security Scheme Type | HTTP Authorization Scheme |
| HTTP | basic |
Download OpenAPI specification:
Get Projects
Lists all Unity Projects, enabled for Ads by Organization.
Code samples for "Get Projects":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/organizations/{organizationId}/projects"
Response example
[ { "id": "123e4567-e89b-12d3-a456-426652340000", "name": "project_name", "coppa": "non_compliant", "adsProvider": "unity", "stores": { "apple": { "storeId": 1479198816, "gameId": 3835128 }, "google": { "storeId": "com.unity.trashdash", "gameId": 3835128 } } }]
Create Project
Creates a new Unity Project enabled for Ads. COPPA and Ads-Provider must be specified
Code samples for "Create Project":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "name": "project_name", "adsProvider": "unity", "coppa": "non_compliant", "stores": { "apple": { "storeId": 1479198816, "storeUrl": "https://apps.apple.com/ca/app/test-game/id20220524" }, "google": { "storeId": "com.unity.trashdash", "storeUrl": "https://play.google.com/store/apps/details?id=com.unity.testgame&gl=ca" } }}' \ "https://services.api.unity.com/monetize/v1/organizations/{organizationId}/projects"
Response example
{ "id": "123e4567-e89b-12d3-a456-426652340000", "name": "project_name", "coppa": "non_compliant", "adsProvider": "unity", "archivedAt": "string", "stores": { "apple": { "storeId": 1479198816, "gameId": 3835128, "adUnits": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } } }, "google": { "storeId": "com.unity.trashdash", "gameId": 3835128, "adUnits": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } } } }, "maxCaps": { "adUnit": 0, "placement": 0, "target": 0 }}
Get Project Details
Returns Project details, including Ad-Units, Placements, and eCPM Targets.
Code samples for "Get Project Details":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/projects/{projectId}"
Response example
{ "id": "123e4567-e89b-12d3-a456-426652340000", "name": "project_name", "coppa": "non_compliant", "adsProvider": "unity", "archivedAt": "string", "stores": { "apple": { "storeId": 1479198816, "gameId": 3835128, "adUnits": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } } }, "google": { "storeId": "com.unity.trashdash", "gameId": 3835128, "adUnits": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } } } }, "maxCaps": { "adUnit": 0, "placement": 0, "target": 0 }}
Update Project Details
Updates a limited number of Project details: Specifically COPPA and the Ads-Provider.
Code samples for "Update Project Details":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "adsProvider": "unity", "coppa": "non_compliant", "stores": { "apple": { "storeId": 1479198816, "storeUrl": "https://apps.apple.com/ca/app/test-game/id20220524" }, "google": { "storeId": "com.unity.trashdash", "storeUrl": "https://play.google.com/store/apps/details?id=com.unity.testgame&gl=ca" } }}' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}"
Response example
{ "id": "123e4567-e89b-12d3-a456-426652340000", "name": "project_name", "coppa": "non_compliant", "adsProvider": "unity", "archivedAt": "string", "stores": { "apple": { "storeId": 1479198816, "gameId": 3835128, "adUnits": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } } }, "google": { "storeId": "com.unity.trashdash", "gameId": 3835128, "adUnits": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } } } }, "maxCaps": { "adUnit": 0, "placement": 0, "target": 0 }}
Get Ad-Units By Project
Returns all Ad-Units by Project.
Code samples for "Get Ad-Units By Project":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/adunits"
Response example
{ "apple": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } }, "google": { "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } } }}
Get Ad-Units By Store
Returns all Ad-Units by Project and Store.
Code samples for "Get Ad-Units By Store":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits"
Response example
{ "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }}
Create Ad-Unit
Batch-creates Ad-Units by Store.
Request body for "Create Ad-Unit"
Media Type:
application/jsonArray Type:
[ { "name": "ad_unit_name", "id": "ad_unit_id", "adFormat": "rewarded", "allowSkipInSeconds": 0, "muteVideo": true, "adTypes": { "display": false, "playable": true, "video": true }, "bannerRefreshRate": 0, "addPlacements": [ { "name": "placement_name", "id": "placement_id", "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 20, "countryCodes": [ "US", "CA" ], "type": "standard" } ], "placementType": "string" } ] }]
Code samples for "Create Ad-Unit":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '[ { "name": "ad_unit_name", "id": "ad_unit_id", "adFormat": "rewarded", "allowSkipInSeconds": 0, "muteVideo": true, "adTypes": { "display": false, "playable": true, "video": true }, "bannerRefreshRate": 0, "addPlacements": [ { "name": "placement_name", "id": "placement_id", "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 20, "countryCodes": [ "US", "CA" ], "type": "standard" } ], "placementType": "string" } ] }]' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits"
Response example
{ "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }}
Update Ad-Units
Batch-updates Ad-Units by Store.
Request body for "Update Ad-Units"
Media Type:
application/jsonSchema:
{ "ad_unit_id_1": { "name": "ad_unit_name", "adFormat": "rewarded", "allowSkipInSeconds": 0, "muteVideo": true, "adTypes": { "display": false, "playable": true, "video": true }, "bannerRefreshRate": 40, "archive": false, "placements": { "placement_01": { "name": "placement_name", "addTargets": [ { "value": 12, "countryCodes": [ "FI" ], "type": "standard" } ], "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5 }, "3fa85f64-5717-4562-b3fc-2c963f66afa6": null } }, "placement_02": { "archive": false, "addTargets": [ { "value": 10.5, "type": "global" }, { "value": 12, "countryCodes": [ "US", "CA" ], "type": "standard" } ] }, "placement_03": { "archive": true } }, "addPlacements": [ { "name": "placement_name", "id": "placement_04", "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" } ] } ] }, "ad_unit_id_2": { "archive": true }, "ad_unit_id_3": { "name": "ad_unit_name", "adFormat": "rewarded", "allowSkipInSeconds": 0, "muteVideo": true }}
Code samples for "Update Ad-Units":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "ad_unit_id_1": { "name": "ad_unit_name", "adFormat": "rewarded", "allowSkipInSeconds": 0, "muteVideo": true, "adTypes": { "display": false, "playable": true, "video": true }, "bannerRefreshRate": 40, "archive": false, "placements": { "placement_01": { "name": "placement_name", "addTargets": [ { "value": 12, "countryCodes": [ "FI" ], "type": "standard" } ], "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5 }, "3fa85f64-5717-4562-b3fc-2c963f66afa6": null } }, "placement_02": { "archive": false, "addTargets": [ { "value": 10.5, "type": "global" }, { "value": 12, "countryCodes": [ "US", "CA" ], "type": "standard" } ] }, "placement_03": { "archive": true } }, "addPlacements": [ { "name": "placement_name", "id": "placement_04", "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" } ] } ] }, "ad_unit_id_2": { "archive": true }, "ad_unit_id_3": { "name": "ad_unit_name", "adFormat": "rewarded", "allowSkipInSeconds": 0, "muteVideo": true }}' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits"
Response example
{ "ad_unit_id_1": { "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }, "ad_unit_id_2": { "id": "ad_unit_id_2", "name": "ad_unit_name_2", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } } }}
Get Ad-Unit Details
Returns Ad-Unit details, including Placements and eCPM Targets.
Code samples for "Get Ad-Unit Details":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}"
Response example
{ "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } }}
Update Ad-Unit Details
Updates Ad-Unit details.
Request body for "Update Ad-Unit Details"
Media Type:
application/jsonNo description
example:
{"placement_01":{"name":"placement_name","addTargets":[{"value":12,"countryCodes":["FI"],"type":"standard"}],"targets":{"123e4567-e89b-12d3-a456-426652340000":{"value":18.5,"countryCodes":["US","CA"],"type":"standard"},"global":{"value":18.5},"3fa85f64-5717-4562-b3fc-2c963f66afa6":null}},"placement_02":{"archive":false,"addTargets":[{"value":10.5,"type":"global"},{"value":12,"countryCodes":["US","CA"],"type":"standard"}]},"placement_03":{"archive":true}}Code samples for "Update Ad-Unit Details":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "name": "ad_unit_name", "adFormat": "rewarded", "allowSkipInSeconds": 0, "muteVideo": true, "adTypes": { "display": false, "playable": true, "video": true }, "bannerRefreshRate": 0, "archive": true, "placements": { "placement_01": { "name": "placement_name", "addTargets": [ { "value": 12, "countryCodes": [ "FI" ], "type": "standard" } ], "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5 }, "3fa85f64-5717-4562-b3fc-2c963f66afa6": null } }, "placement_02": { "archive": false, "addTargets": [ { "value": 10.5, "type": "global" }, { "value": 12, "countryCodes": [ "US", "CA" ], "type": "standard" } ] }, "placement_03": { "archive": true } }, "addPlacements": [ { "name": "placement_name", "id": "placement_id", "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 20, "countryCodes": [ "US", "CA" ], "type": "standard" } ], "placementType": "string" } ]}' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}"
Response example
{ "id": "ad_unit_id_1", "name": "ad_unit_name_1", "allowSkipInSeconds": 5, "muteVideo": false, "adTypes": { "display": true, "playable": true, "video": true }, "bannerRefreshRate": 30, "adFormat": "rewarded", "placements": { "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } } }}
Get Placements By Ad-Unit
Lists all Placements by Ad-Unit.
Code samples for "Get Placements By Ad-Unit":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements"
Response example
{ "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }}
Create Placements
Batch-creates Placements and eCPM Targets by Ad-Unit.
Code samples for "Create Placements":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '[ { "name": "placement_name", "id": "placement_id", "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 20, "countryCodes": [ "US", "CA" ], "type": "standard" } ], "placementType": "string" }]' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements"
Response example
{ "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }}
Update Placements
Batch-creates Placements and eCPM Targets by Ad-Unit.
Request body for "Update Placements"
Media Type:
application/jsonSchema:
{ "placement_01": { "name": "placement_name", "addTargets": [ { "value": 12, "countryCodes": [ "FI" ], "type": "standard" } ], "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5 }, "3fa85f64-5717-4562-b3fc-2c963f66afa6": null } }, "placement_02": { "archive": false, "addTargets": [ { "value": 10.5, "type": "global" }, { "value": 12, "countryCodes": [ "US", "CA" ], "type": "standard" } ] }, "placement_03": { "archive": true }}
Code samples for "Update Placements":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "placement_01": { "name": "placement_name", "addTargets": [ { "value": 12, "countryCodes": [ "FI" ], "type": "standard" } ], "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5 }, "3fa85f64-5717-4562-b3fc-2c963f66afa6": null } }, "placement_02": { "archive": false, "addTargets": [ { "value": 10.5, "type": "global" }, { "value": 12, "countryCodes": [ "US", "CA" ], "type": "standard" } ] }, "placement_03": { "archive": true }}' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements"
Response example
{ "placement_id_1": { "id": "placement_id_1", "name": "placement_name_1", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }, "placement_id_2": { "id": "placement_id_2", "name": "placement_name_2", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" } } }}
Get Placement's Details
Returns Placement details.
Code samples for "Get Placement's Details":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements/{placementId}"
Response example
{ "id": "placement_id", "name": "placement_name", "archivedAt": "string", "placementType": "string", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" }, "123e4567-e89b-12d3-a456-426652340001": null }}
Update Placement
Batch-updates Placements and eCPM Targets by Ad-Unit.
Code samples for "Update Placement":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "name": "placement_name", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" }, "123e4567-e89b-12d3-a456-426652340001": null }, "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 20, "countryCodes": [ "US", "CA" ], "type": "standard" } ], "archive": true}' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements/{placementId}"
Response example
{ "id": "placement_id", "name": "placement_name", "archivedAt": "string", "placementType": "string", "targets": { "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" }, "123e4567-e89b-12d3-a456-426652340001": null }}
Get Targets
Code samples for "Get Targets":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements/{placementId}/targets"
Response example
{ "123e4567-e89b-12d3-a456-426652340000": { "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard" }, "global": { "value": 18.5, "type": "global" }, "123e4567-e89b-12d3-a456-426652340001": null}
Create Targets
Code samples for "Create Targets":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '[ { "value": 18.5, "type": "global" }, { "value": 20, "countryCodes": [ "US", "CA" ], "type": "standard" }]' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements/{placementId}/targets"
Response example
{ "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard"}
Update Target
Code samples for "Update Target":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard"}' \ "https://services.api.unity.com/monetize/v1/projects/{projectId}/stores/{storeName}/adunits/{adUnitId}/placements/{placementId}/targets/{targetId}"
Response example
{ "value": 18.5, "countryCodes": [ "US", "CA" ], "type": "standard"}
Get Google Acquire Optimization API Keys
Return all API keys for a given organization and store id
Code samples for "Get Google Acquire Optimization API Keys":
Request example
curl -X GET \ "https://services.api.unity.com/monetize/v1/organizations/{organizationId}/api-keys"
Response example
[ { "projectId": "123e4567-e89b-12d3-a456-426652340000", "apiKey": "123e4567-e89b-12d3-a456-426652340000", "storeId": "com.fakegame.android", "gameId": 1234567, "projectName": "Fake Game" }]
Set Google Acquire Optimization API Keys
Set Google Licencing key for a given project based on store id and organization id
Code samples for "Set Google Acquire Optimization API Keys":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "apiKey": "123e4567-e89b-12d3-a456-426652340000", "storeId": "com.fakegame.android"}' \ "https://services.api.unity.com/monetize/v1/organizations/{organizationId}/api-keys"
Response example
[ { "projectId": "123e4567-e89b-12d3-a456-426652340000", "apiKey": "123e4567-e89b-12d3-a456-426652340000", "storeId": "com.fakegame.android", "gameId": 1234567, "projectName": "Fake Game" }]