Documentation

Monetize API

Version: v1

Monetize API

Version: v1

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:

Rate limits

The API returns a
429
HTTP status code if a request exceeds one of the following rate limits:
  • 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 (
    POST
    or
    PUT
    ): 1000 requests per 30-minute period, or 5 times per a second.
  • 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 (
    POST
    or
    PATCH
    ): 10 times per 30-minute period, or 1 times per a second.

Type

Limit (requests/second)

Limit (requests/30 minutes)

All requests54000
PUT
,
POST
51000

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:
  1. 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.
  2. 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

  1. Added functionality to manipulate with Ad-Units
  2. Added IDs to target
  3. Added project create/patch endpoints

Authentication

To learn how to authenticate your requests, please visit the Getting Started section.

Authentication

Security Scheme TypeHTTP Authorization Scheme
HTTPbasic
Download OpenAPI specification:

Get Projects


Lists all Unity Projects, enabled for Ads by Organization.

Path parameters for "Get Projects"

organizationId

string
required
ID of the organization
pattern: ^\d+$

HTTP response status codes for "Get Projects":

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

Path parameters for "Create Project"

organizationId

string
required
ID of the organization
pattern: ^\d+$

Request body for "Create Project"

Media Type:
application/json

name

string
required
No description
example: project_name

adsProvider

string
required
No description
enum: "iron_source", "mopub", "admob", "max", "unity", "self_mediated", "other", "unity_mediation"
example: unity

coppa

string
required
No description
enum: "non_compliant", "compliant"

stores

object
No description

apple

object
No description

storeId

string
No description
pattern: ^$|^\d+$
example: 1479198816

storeUrl

string
No description
example: https://apps.apple.com/ca/app/test-game/id20220524

google

object
No description

storeId

string
No description
pattern: ^$|^[a-zA-Z]\w*(\.[a-zA-Z]\w*)+$
example: com.unity.trashdash

storeUrl

string
No description
example: https://play.google.com/store/apps/details?id=com.unity.testgame&gl=ca

HTTP response status codes for "Create Project":

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.

Path parameters for "Get Project Details"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

Query parameters for "Get Project Details"

showarchived

boolean
default: false
When
true
, displays archived Ad Units and Placements.

HTTP response status codes for "Get Project Details":

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.

Path parameters for "Update Project Details"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

Request body for "Update Project Details"

Media Type:
application/json

adsProvider

string
No description
enum: "iron_source", "mopub", "admob", "max", "unity", "self_mediated", "other", "unity_mediation"
example: unity

coppa

string
No description
enum: "non_compliant", "compliant"

stores

object
No description

apple

object
No description

storeId

string
No description
pattern: ^$|^\d+$
example: 1479198816

storeUrl

string
No description
example: https://apps.apple.com/ca/app/test-game/id20220524

google

object
No description

storeId

string
No description
pattern: ^$|^[a-zA-Z]\w*(\.[a-zA-Z]\w*)+$
example: com.unity.trashdash

storeUrl

string
No description
example: https://play.google.com/store/apps/details?id=com.unity.testgame&gl=ca

HTTP response status codes for "Update Project Details":

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.

Path parameters for "Get Ad-Units By Project"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

Query parameters for "Get Ad-Units By Project"

showarchived

boolean
default: false
When
true
, displays archived Ad Units and Placements.

HTTP response status codes for "Get 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.

Path parameters for "Get Ad-Units By Store"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

Query parameters for "Get Ad-Units By Store"

showarchived

boolean
default: false
When
true
, displays archived Ad Units and Placements.

HTTP response status codes for "Get Ad-Units By 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.

Path parameters for "Create Ad-Unit"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

Query parameters for "Create Ad-Unit"

dryrun

boolean
default: false
Dry run flag.

Request body for "Create Ad-Unit"

Media Type:
application/json
Array 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" } ] }]

HTTP response status codes for "Create Ad-Unit":

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.

Path parameters for "Update Ad-Units"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

Query parameters for "Update Ad-Units"

dryrun

boolean
default: false
Dry run flag.

Request body for "Update Ad-Units"

Media Type:
application/json
Schema:
{ "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 }}

HTTP response status codes for "Update Ad-Units":

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.

Path parameters for "Get Ad-Unit Details"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Get Ad-Unit Details"

showarchived

boolean
default: false
When
true
, displays archived Ad Units and Placements.

HTTP response status codes for "Get Ad-Unit Details":

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.

Path parameters for "Update Ad-Unit Details"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Update Ad-Unit Details"

dryrun

boolean
default: false
Dry run flag.

Request body for "Update Ad-Unit Details"

Media Type:
application/json

name

string
No description
pattern: ^[^\<]+$
example: ad_unit_name

adFormat

string
No description
enum: "rewarded", "interstitial", "banner"
example: rewarded

allowSkipInSeconds

number
No description

muteVideo

boolean
No description

adTypes

object
No description

display

boolean
default: false
No description

playable

boolean
default: true
No description

video

boolean
default: true
No description

bannerRefreshRate

number
No description
>= 10<= 40

archive

boolean
No description

placements

object
No 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}}

addPlacements

array[object]
No description

name

string
required
No description
pattern: ^[\da-zA-Z_-\s]+$
example: placement_name

id

string
No description
pattern: ^[\da-zA-Z_-]+$
example: placement_id

addTargets

array[object]
No description
example: [{"value":18.5,"type":"global"},{"value":20,"countryCodes":["US","CA"],"type":"standard"}]
One of

value

number
required
No description
>= 0.01
example: 18.5

type

string
required
No description
enum: "global"

placementType

string
No description

HTTP response status codes for "Update Ad-Unit Details":

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.

Path parameters for "Get Placements By Ad-Unit"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Get Placements By Ad-Unit"

showarchived

boolean
default: false
When
true
, displays archived Ad Units and Placements.

HTTP response status codes for "Get 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.

Path parameters for "Create Placements"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Create Placements"

dryrun

boolean
default: false
Dry run flag.

Request body for "Create Placements"

Media Type:
application/json
Array Type:
[ { "name": "placement_name", "id": "placement_id", "addTargets": [ { "value": 18.5, "type": "global" }, { "value": 20, "countryCodes": [ "US", "CA" ], "type": "standard" } ], "placementType": "string" }]

HTTP response status codes for "Create Placements":

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.

Path parameters for "Update Placements"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Update Placements"

dryrun

boolean
default: false
Dry run flag.

Request body for "Update Placements"

Media Type:
application/json
Schema:
{ "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 }}

HTTP response status codes for "Update Placements":

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.

Path parameters for "Get Placement's Details"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

placementId

string
required
The unique ID of the placement.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Get Placement's Details"

showarchived

boolean
default: false
When
true
, displays archived Ad Units and Placements.

HTTP response status codes for "Get Placement's 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.

Path parameters for "Update Placement"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

placementId

string
required
The unique ID of the placement.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Update Placement"

dryrun

boolean
default: false
Dry run flag.

Request body for "Update Placement"

Media Type:
application/json

name

string
No description
pattern: ^[^\<]+$
example: placement_name

targets

object
No description
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}

addTargets

array[object]
No description
example: [{"value":18.5,"type":"global"},{"value":20,"countryCodes":["US","CA"],"type":"standard"}]
One of

value

number
required
No description
>= 0.01
example: 18.5

type

string
required
No description
enum: "global"

archive

boolean
No description

HTTP response status codes for "Update Placement":

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


Lists Targets by Placement.

Path parameters for "Get Targets"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

placementId

string
required
The unique ID of the placement.
pattern: ^[\da-zA-Z_-]+$

HTTP response status codes for "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


Creates Targets by Placement.

Path parameters for "Create Targets"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

placementId

string
required
The unique ID of the placement.
pattern: ^[\da-zA-Z_-]+$

Query parameters for "Create Targets"

dryrun

boolean
default: false
Dry run flag.

Request body for "Create Targets"

Media Type:
application/json
Array of
One of

value

number
required
No description
>= 0.01
example: 18.5

type

string
required
No description
enum: "global"

HTTP response status codes for "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"}

Get Target Details


Returns Target details.

Path parameters for "Get Target Details"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

placementId

string
required
The unique ID of the placement.
pattern: ^[\da-zA-Z_-]+$

targetId

required
The unique ID of the target.
One of
"string"

HTTP response status codes for "Get Target Details":

Code samples for "Get Target Details":

Request example

curl -X GET \ "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"}

Update Target


Updates Targets.

Path parameters for "Update Target"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

placementId

string
required
The unique ID of the placement.
pattern: ^[\da-zA-Z_-]+$

targetId

required
The unique ID of the target.
One of
"string"

Query parameters for "Update Target"

dryrun

boolean
default: false
Dry run flag.

Request body for "Update Target"

Media Type:
application/json

value

number
No description
>= 0.01
example: 18.5

countryCodes

array[string]
No description
minItems: 1
items: enum: "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR"
example: ["US","CA"]

type

string
No description
enum: "standard"

HTTP response status codes for "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"}

Delete Target


Deletes Targets.

Path parameters for "Delete Target"

projectId

required
ID of the project
One of
"123e4567-e89b-12d3-a456-426652340000"

storeName

string
required
store name
enum: "apple", "google"

adUnitId

string
required
The unique ID of the Ad Unit.
pattern: ^[\da-zA-Z_-]+$

placementId

string
required
The unique ID of the placement.
pattern: ^[\da-zA-Z_-]+$

targetId

required
The unique ID of the target.
One of
"string"

Query parameters for "Delete Target"

dryrun

boolean
default: false
Dry run flag.

HTTP response status codes for "Delete Target":

Code samples for "Delete Target":

Request example

curl -X DELETE \ "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

Path parameters for "Get Google Acquire Optimization API Keys"

organizationId

string
required
ID of the organization
pattern: ^\d+$

Query parameters for "Get Google Acquire Optimization API Keys"

storeId

string
required
Store Id for which API keys are to be fetched

HTTP response status codes for "Get Google Acquire Optimization API Keys":

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

Path parameters for "Set Google Acquire Optimization API Keys"

organizationId

string
required
ID of the organization
pattern: ^\d+$

Request body for "Set Google Acquire Optimization API Keys"

Media Type:
application/json

apiKey

string
required
No description
example: 123e4567-e89b-12d3-a456-426652340000

storeId

string
required
No description
example: com.fakegame.android

HTTP response status codes for "Set Google Acquire Optimization API Keys":

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" }]