if (addedAdGroups != null) {
try {
List<AdGroupOperation> operations = new ArrayList<>(10000);
for (AdGroup adGroup : addedAdGroups) {
adGroup.setStatus(AdGroupStatus.REMOVED);
AdGroupOperation operation = new AdGroupOperation();
operation.setOperand(adGroup);
operation.setOperator(Operator.SET);
operations.add(operation);
}
adGroupService.mutate(operations.toArray(new AdGroupOperation[0]));
} catch (ApiException e2) {
throw new AdwordsFailureException(e2, currentAdwordsAccount);
}
}
Hi Artem,
Thank you for reaching out. It is possible to remove adgroup. Could you please share the complete request and response logs along with the client customer id via the Reply privately to author option for me to further investigate?
Thanks and regards,
Xiaoming, Google Ads API Team