Method: accounts.adUnitMappings.batchCreate

Batch create the ad unit mappings under the specific AdMob account. The maximum allowed batch size is 100.

HTTP request

POST https://admob.googleapis.com/v1beta/{parent=accounts/*}/adUnitMappings:batchCreate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The AdMob account which owns this collection of ad unit mappings. Format: accounts/{publisherId} See https://support.google.com/admob/answer/2784578 for instructions on how to find your AdMob publisher ID.

Request body

The request body contains data with the following structure:

JSON representation
{
  "requests": [
    {
      object (CreateAdUnitMappingRequest)
    }
  ]
}
Fields
requests[]

object (CreateAdUnitMappingRequest)

Required. The request message specifying the ad unit mappings to create. A maximum of 100 ad unit mappings can be created in a batch. If the number of ad unit mappings in the batch request exceed 100, the entire request will be rejected and no ad unit mappings will be created.

Response body

Response containing a batch of created ad unit mappings.

If successful, the response body contains data with the following structure:

JSON representation
{
  "adUnitMappings": [
    {
      object (AdUnitMapping)
    }
  ]
}
Fields
adUnitMappings[]

object (AdUnitMapping)

The Ad units mappings created under the requested account.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/admob.monetization

For more information, see the OAuth 2.0 Overview.

CreateAdUnitMappingRequest

Request to create an ad unit mapping under the specific AdMob account and ad unit.

JSON representation
{
  "parent": string,
  "adUnitMapping": {
    object (AdUnitMapping)
  }
}
Fields
parent

string

Required. The parent which owns the ad unit mapping. Format: accounts/{publisherId}/adUnits/{adUnitId}

adUnitMapping

object (AdUnitMapping)

Required. The ad unit mapping to create.