I am able to create DEMAND_GEN type campaigns with the same request but not this one.
Here is the curl of the request I am trying to run, followed by the api response -
curl --location '
https://googleads.googleapis.com/v17/customers/{{CUSTOMER_ID}}/campaigns:mutate' \
--header 'developer-token: {{DEVELOPER_TOKEN}}' \
--header 'login-customer-id: {{LOGIN_CUSTOMER_ID}} \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{TOKEN}}' \
--data '{
"operations": [
{
"create": {
"name": "A smart campaign",
"status": "PAUSED",
"campaignBudget": "customers/{{CUSTOMER_ID}}/campaignBudgets/{{BUDGET_ID}}",
"advertisingChannelType": "SMART",
"advertisingChannelSubType": "SMART_CAMPAIGN",
"targetCpa": {
"targetCpaMicros": 5000000
}
}
}
]
}
'
Here is the response from the api -
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "
type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"contextError": "OPERATION_NOT_PERMITTED_FOR_CONTEXT"
},
"message": "The operation is not allowed for the given context.",
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "target_cpa"
}
]
}
},
{
"errorCode": {
"mutateError": "RESOURCE_NOT_IN_GOOGLE_ADS"
},
"message": "The resource isn't in Google Ads. It belongs to another ads system.",
"trigger": {
"int64Value": "13772297422"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "campaign_budget"
}
]
}
}
],
"requestId": "MlaH1pp2485Ww4E768Do0g"
}
]
}
}
Thanks for your help