Method: bidders.pretargetingConfigs.addTargetedPublishers
Stay organized with collections
Save and categorize content based on your preferences.
Adds targeted publishers to the pretargeting config.
HTTP request
POST https://realtimebidding.googleapis.com/v1/{pretargetingConfig=bidders/*/pretargetingConfigs/*}:addTargetedPublishers
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
pretargetingConfig |
string
Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}
|
Request body
The request body contains data with the following structure:
JSON representation |
{
"publisherIds": [
string
],
"targetingMode": enum (TargetingMode )
} |
Fields |
publisherIds[] |
string
A list of publisher IDs to target in the pretargeting configuration. These values will be added to the list of targeted publisher IDs in PretargetingConfig.publisherTargeting.values . Publishers are identified by their publisher ID from ads.txt / app-ads.txt. See https://iabtechlab.com/ads-txt/ and https://iabtechlab.com/app-ads-txt/ for more details.
|
targetingMode |
enum (TargetingMode )
Required. The targeting mode that should be applied to the list of publisher IDs. If are existing publisher IDs, must be equal to the existing PretargetingConfig.publisherTargeting.targetingMode or a 400 bad request error will be returned.
|
Response body
If successful, the response body contains an instance of PretargetingConfig
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/realtime-bidding
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
[null,null,["Last updated 2025-05-07 UTC."],[[["\u003cp\u003eAdds targeted publishers to the specified pretargeting configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a list of publisher IDs and a targeting mode to be applied.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the updated PretargetingConfig object.\u003c/p\u003e\n"],["\u003cp\u003eThe endpoint requires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/realtime-bidding\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eUses an HTTP POST request to \u003ccode\u003ehttps://realtimebidding.googleapis.com/v1/{pretargetingConfig=bidders/*/pretargetingConfigs/*}:addTargetedPublishers\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: bidders.pretargetingConfigs.addTargetedPublishers\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nAdds targeted publishers to the pretargeting config.\n\n### HTTP request\n\n`POST https://realtimebidding.googleapis.com/v1/{pretargetingConfig=bidders/*/pretargetingConfigs/*}:addTargetedPublishers`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `pretargetingConfig` | `string` Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId} |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"publisherIds\": [ string ], \"targetingMode\": enum (/authorized-buyers/apis/realtimebidding/reference/rest/v1/bidders.pretargetingConfigs#TargetingMode) } ``` |\n\n| Fields ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `publisherIds[]` | `string` A list of publisher IDs to target in the pretargeting configuration. These values will be added to the list of targeted publisher IDs in [PretargetingConfig.publisherTargeting.values](/authorized-buyers/apis/realtimebidding/reference/rest/v1/bidders.pretargetingConfigs#PretargetingConfig.FIELDS.publisher_targeting). Publishers are identified by their publisher ID from ads.txt / app-ads.txt. See \u003chttps://iabtechlab.com/ads-txt/\u003e and \u003chttps://iabtechlab.com/app-ads-txt/\u003e for more details. |\n| `targetingMode` | `enum (`[TargetingMode](/authorized-buyers/apis/realtimebidding/reference/rest/v1/bidders.pretargetingConfigs#TargetingMode)`)` Required. The targeting mode that should be applied to the list of publisher IDs. If are existing publisher IDs, must be equal to the existing [PretargetingConfig.publisherTargeting.targetingMode](/authorized-buyers/apis/realtimebidding/reference/rest/v1/bidders.pretargetingConfigs#PretargetingConfig.FIELDS.publisher_targeting) or a 400 bad request error will be returned. |\n\n### Response body\n\nIf successful, the response body contains an instance of [PretargetingConfig](/authorized-buyers/apis/realtimebidding/reference/rest/v1/bidders.pretargetingConfigs#PretargetingConfig).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/realtime-bidding`"]]