Is there any way to delete user list?

369 views
Skip to first unread message

Max Drobin

unread,
Aug 15, 2018, 5:19:46 AM8/15/18
to AdWords API and Google Ads API Forum
 there any way to delete user list using AdWords API?

I way trying to do it this way:

    def clear_userList(self, userListId):
        mutate_members_operation = {
          'operand': {
              'userListId': str(userListId),
              'removeAll': 'true'
          },
          'operator': 'REMOVE'
        }

        return self.userListService.mutateMembers([mutate_members_operation])

and this:

    def delete_userList(self, userListId):
        mutate_members_operation = {
          'operand': {
              'userListId': userListId,
              'membersList': []
          },
          'operator': 'REMOVE'
        }

        return self.userListService.mutate([mutate_members_operation])


but nothing has worked out

Bharani Cherukuri (AdWords API Team)

unread,
Aug 15, 2018, 3:16:16 PM8/15/18
to AdWords API and Google Ads API Forum
Hello Max, 

The AdWordsUserListService can be used to manage and create user lists. However, it is currently not possible to Remove the complete user list using the AdWordsUserListService.mutate() as the REMOVE operator is not supported. However, you will be able to use the mutateMembers operation to update or remove the user list members. Based on the code snippet shared, it looks like you're using the REMOVE operator to remove the entire user list using the mutateMembers operation which is not possible to do so. 

Let me know if you have any other questions. 

Thanks,
Bharani, AdWords API Team
Reply all
Reply to author
Forward
0 new messages