Hi,
Thank you for reaching out. You could refer to this code example on how to create and add emails to a user list. But keep in mind that you could only mutate the whole user list instead of adding or removing members in the user list. Let us know if you have any further concerns.
Thanks and regards,
Xiaoming, Google Ads API Team
Hi,
Since the mutateMembers does not support SET operator, in order to mutate, You would need to remove the old user list and add in a new one. This is the only possible way for using mutateMembers method.
Thanks and regards,
Xiaoming, Google Ads API Team
Hi,
Thank you for reaching out. The link you sent me clearly shows that the SET operator is not supported in this method. The MutateMembersOperation represents a request to add or remove members from a user list. As for the REMOVE operation, you could change the operator to REMOVE here and change other codes accordingly. Once the user list is removed, you would need to create a new user list with a new userListId. Please bear in mind that the API does not necessarily always have the same functionality as the Google Ads UI. The Member object does not contain the size field. However, you could get this data when you create a new user list by checking the member size. In order to add new email, you would need to create a new user list with the new email rather than just add the email to the existing user list.
I hope this helps.
Thanks and regards,
Xiaoming, Google Ads API Team
Hi,
Thank you for reaching out. Please find my response to your questions below:
Please give it a try to REMOVE the whole user list members by using mutateMembers() and set the operator as REMOVE. Then you could ADD the user list members by using mutateMembers() again with the existing userListId and ADD operator.
With the existing userListId, the new members would be appended to the existing user list.