Authenticate using an access token obtained via TikTok's OAuth 2.0 flow; the token must have the Audience Management permission scope.
Prepare the contact list file: hash each email or phone number individually using SHA-256; phone numbers should be normalized to E.164 format before hashing.
Use the audience file upload endpoint to upload the hashed file; specify file_type as CUSTOM_AUDIENCE_FILE and audience_type as CUSTOMER_FILE.
After upload, create the audience by calling the audience creation endpoint with the file_id returned from the upload step; set audience_type to CUSTOMER_FILE and select the matching identifier type (EMAIL or PHONE).
Wait for the audience status to transition to READY before attaching it to a campaign; poll the audience status endpoint or listen for a webhook event if available.
Attach the audience to an ad group in the audience targeting section using the audience_ids field in the ad group's targeting_spec.
Known gotchas
Customer file custom audiences require a minimum size to be eligible for targeting; audiences below this threshold will show a 'Too small' status and cannot be used in campaign targeting.
TikTok custom audiences built from file uploads cannot be used as optimization goals; they are available only for targeting include/exclude, not for lookalike seed or conversion optimization.
File upload and audience creation are two separate API calls; the file_id from the upload step expires if not used within a certain window — create the audience record promptly after the upload completes.
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