Create a Custom Audience by POSTing to /act_{ad_account_id}/customaudiences via Graph API v22.0+, setting subtype to CUSTOM and customer_file_source to USER_PROVIDED_ONLY
Retrieve the audience ID from the response, then prepare your customer data by normalizing and SHA-256-hashing each PII field (email, phone, first name, last name) according to Meta's hashing specification
Structure the payload as an array of schema keys (e.g. EMAIL, PHONE) and a corresponding data array, encoding hashed values as hex strings
POST the hashed data to /{audience_id}/users with the payload, respecting the 10,000-row batch limit per request
Paginate additional batches via subsequent POST requests until all records are uploaded; each batch appends to the audience
Monitor audience delivery_status and approximate_count via a GET on the audience ID to confirm population before targeting
Known gotchas
Meta requires PII to be SHA-256 hashed before transmission; do not send plaintext emails or phone numbers even over HTTPS — this violates the API terms of service
Phone numbers must be normalized to E.164 format (country code prefix, no spaces or dashes) before hashing, or match rates will be very low
Audience approximate_count is suppressed (shows '<1000') until the audience reaches Meta's minimum threshold; campaigns can still be targeted but delivery estimates will be unavailable until then
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp