Hi
I'm researching google ads API and started to work out the whole ad create 
process via API (only using CURL not using client library).

As per documentation, we should use mutate for CREATE/UPDATE/REMOVE 
operations for an endpoint. In the way, I've created campaign budget, 
campaign, adgroups successfully via API mutate operation. However, I'm 
trying to create an ad. But I'm facing some issues while creating that.

Here I'll explain two cases which I've tried.

1. First I've used mutate create operation for google ads endpoint.
https://googleads.googleapis.com/v6/customers/{customer_id}/ads:mutate
With the corresponding request body.
But I got the following error.
*Invalid JSON payload received. Unknown name \"create\" at 'operations[0]': 
Cannot find field.*
As per this error, I thought, we don't have create mutate for ads API. So 
I've tried adGroupAds endpoint.

2. 
https://googleads.googleapis.com/v6/customers/{customer-id}/adGroupAds:mutate
*Request Body*

*{*
*  "operations": [*
*    {*
*    "create": {*
*        "status": "PAUSED",*
*        "ad": {*
*            "final_urls": "https://developers.google.com/",*
*            "name": "My Test ad"*
*        },*
*        "ad_group": "customers/{customer_id}/adGroups/{adGroupId}"*
*      }*
*    }*
*  ]*
*}*

But I got *resource not found* error. I've also passed the resource_name 
param in the request body in the following ways
1. "resource_name": "customers/{customer_id}/adGroupAds/{adGroupId}/-1",
2. "resource_name": "customers/{customer_id}/adGroupAds/{adGroupId}~-1"

I'm not what I'm missing and how to create an ad using CURL. Please help me 
to overcome this. I'm not having a proper example for this endpoint in the 
API documentation using CURL. It will be more helpful if you help me with 
the sample request body, endpoint CURL, and what are the necessary params 
should be passed for the endpoint.

Thanks in advance.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/993d3b0a-743d-4cae-9559-95462b475d86n%40googlegroups.com.

Reply via email to