v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-13253679.9 KB
accounts

Creates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method. Note that ad units can only be created for ad clients with an "AFC" product code. For more info see the AdClient resource. For now, this method can only be used to create DISPLAY ad units. See: https://support.google.com/adsense/answer/9183566

post/v2/{+parent}/adunits

Path parameters

parentstring required

Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}

Request body

reportingDimensionIdstring

Output only. Unique ID of the ad unit as used in the AD_UNIT_ID reporting dimension.

displayNamestring

Required. Display name of the ad unit, as provided when the ad unit was created.

state'STATE_UNSPECIFIED' | 'ACTIVE' | 'ARCHIVED'

Required. State of the ad unit.

namestring

Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}

Response

Successful response