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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[[["\u003cp\u003eThis endpoint updates existing \u003ccode\u003eDISPLAY\u003c/code\u003e ad units, primarily for AdSense for Platforms publishers.\u003c/p\u003e\n"],["\u003cp\u003eOnly specific fields within the ad unit can be modified using the \u003ccode\u003eupdateMask\u003c/code\u003e query parameter in the request.\u003c/p\u003e\n"],["\u003cp\u003eTo use this endpoint, your project must have the \u003ccode\u003ehttps://www.googleapis.com/auth/adsense\u003c/code\u003e authorization scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request should contain an \u003ccode\u003eAdUnit\u003c/code\u003e object in its body, specifying the desired modifications, and a successful response will also return an updated \u003ccode\u003eAdUnit\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe ad unit to update is identified through the \u003ccode\u003eadUnit.name\u003c/code\u003e path parameter, following a specific format.\u003c/p\u003e\n"]]],["This method updates a `DISPLAY` ad unit via a `PATCH` request to a specific URL using gRPC Transcoding syntax. It requires a restricted set of project owners, primarily AdSense for Platforms publishers. The request includes the ad unit's resource name as a path parameter. Updates are performed via the `updateMask` query parameter. The request and response bodies both utilize the `AdUnit` instance. The request requires the `https://www.googleapis.com/auth/adsense` OAuth scope.\n"],null,["# Method: accounts.adclients.adunits.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates an ad unit.\n\nThis method can be called only by a restricted set of projects, which are usually owned by [AdSense for Platforms](https://developers.google.com/adsense/platforms/) publishers. Contact your account manager if you need to use this method.\n\nFor now, this method can only be used to update `DISPLAY` ad units. See: \u003chttps://support.google.com/adsense/answer/9183566\u003e\n\n### HTTP request\n\n`PATCH https://adsense.googleapis.com/v2/{adUnit.name=accounts/*/adclients/*/adunits/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|----------------------------------------------------------------------------------------------------------------------|\n| `adUnit.name` | `string` Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit} |\n\n### Query parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` The list of fields to update. If empty, a full update is performed. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [AdUnit](/adsense/management/reference/rest/v2/accounts.adclients.adunits#AdUnit).\n\n### Response body\n\nIf successful, the response body contains an instance of [AdUnit](/adsense/management/reference/rest/v2/accounts.adclients.adunits#AdUnit).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/adsense`"]]