Hi,

Thank you for reaching out to the Google Ads API support team.

Based on the information provided, I understand that you are looking for 
guidance in targeting the audiences to demand gen campaigns using the Google 
Ads API. I would recommend you to refer to this 'Target audiences' 
documentation for more information. You can use the adGroupCriteria method to 
target the audiences for the demand gen campaign using the Google Ads API. I 
would recommend you to refer to this help center article as this summarizes 
which audience segment type is available for each campaign type. We have tried 
this approach and we were successfully able to attach the audiences to the 
demand gen campaign using this method. So, I would request you to try and let 
us know how it goes from your end. However, I am attaching the sample request 
and response logs for your reference.

Request Body: 
POST https://googleads.googleapis.com/v17/customers/{customer 
ID}/adGroupCriteria:mutate?key=[YOUR_API_KEY] HTTP/1.1

developer-token: **********************
login-customer-id: 9569181458
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json

{
  "operations": [
    {
      "create": {
        "adGroup": "customers/{customer ID}/adGroups/{ad group ID}",
        "audience": {
          "audience": "customers/{customer ID}/audiences/{audience ID}"
        }
      }
    }
  ]
}

Response: 
HTTP/1.1 200 
cache-control: private
content-encoding: gzip
content-length: 127
content-type: application/json; charset=UTF-8
date: Wed, 11 Sep 2024 10:46:46 GMT
server: ESF
vary: Origin, X-Origin, Referer

{
  "results": [
    {
      "resourceName": "customers/{customer ID}/adGroupCriteria/{ad group 
ID}~{ad group criterion ID}"
    }
  ]
}

I hope this helps.
This message is in relation to case "ref:!00D1U01174p.!5004Q02vG1sQ:ref" 
(ADR-00267780)

Thanks,

Google Ads API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/BpsUv000000000000000000000000000000000000000000000SJNC3Z00_L1xEmfrTECBkDrPS1Xhrg%40sfdc.net.

Reply via email to