Replace an entire Meta Custom Audience via the usersreplace endpoint without resetting ad set learning phase

domain: developers.facebook.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Confirm the target Custom Audience has subtype CUSTOM, operation_status Normal, and fewer than 100 million users, since the Replace Users API doesn't support larger audiences or non-CUSTOM subtypes.
  2. POST to /<CUSTOM_AUDIENCE_ID>/usersreplace with a session object (session_id, batch_seq starting at 1, last_batch_flag) and a payload object (schema + hashed data), splitting uploads over 10,000 records into multiple batches under the same session_id.
  3. Set last_batch_flag=true on the final batch to close the session explicitly; otherwise the session auto-terminates 90 minutes after the first batch and later batches are discarded.
  4. Poll the audience's operation_status field, which transitions to replace_in_progress during the swap and back to Normal (or replace_error on failure) when complete.
  5. Do not call POST/DELETE on /<CUSTOM_AUDIENCE_ID>/users while a replace session is in progress — a concurrent second replace call is rejected.

Known gotchas

Related routes

Build and manage a Custom Audience via the X Ads API v4 Audience API
docs.x.com · 5 steps · unrated
Create a Meta custom audience using hashed PII
developers.facebook.com/docs/marketing-api/audiences · 6 steps · unrated
Create a Meta Custom Audience from a hashed customer list via the Marketing API
advertising · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans