Delete all Custom Audience User using Facebook API
Asked Answered
W

2

8

Hi everyone I have a problem in Facebook Marketing API, I wan't to delete all the custom audience without uploading the same email again, all I want is to just delete every User/people from the Custom Audience and upload a new one. I already read the documentation (https://developers.facebook.com/docs/marketing-api/reference/custom-audience/users#Deleting) but unfortunately can't find a solution .

Wetmore answered 25/1, 2017 at 9:18 Comment(0)
R
4

The only way I have found that this can be done is by doing a mass delete with either all external ID's or Emails.

After deleting all users, it's a simply matter of adding users back to the audience.

Seems far from ideal, but from what I can tell there is no quick "Delete All" type function.

Raskin answered 13/2, 2017 at 19:23 Comment(0)
F
0

tldr

How to replace all users in a Custom Audience using the Facebook Marketing API

But there is a bug in facebook side Facebook custom audiences error: "There was a problem replacing your customer list Custom Audience. Try again later." - Marketing API

Long answer

Meta has release a usersreplace api. This can be used to achieve what you are trying to do.

The /<CUSTOM_AUDIENCE_ID>/usersreplace endpoint allows you to perform 2 actions with one API call:

Completely remove existing users from a specific audience Replace those users with a new set of users. Using the /<CUSTOM_AUDIENCE_ID>/usersreplace endpoint allows you to automatically delete all existing users rather than having to upload a list of users you want to delete. This endpoint does not reset your ad set's learning phase when an audience is part of active ad sets unlike POST or DELETE API calls to the /<CUSTOM_AUDIENCE_ID>/users endpoint.

The Replace Users API only works with audiences that meet the following requirements:

The number of users in place before running a replace process must be smaller than 100 million. If your audience is larger than 100 million, we suggest leveraging the /<CUSTOM_AUDIENCE_ID>/users endpoint to add and remove users. Subtype must be set to CUSTOM. You cannot replace a value-based customer file custom audience with a non-value based customer file custom audience, or vice-versa.

source. somehow this does not seems to be updated.

Fermata answered 28/6, 2023 at 6:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.