Obtain an Events API access token from TikTok for Business and retrieve your Pixel ID from Events Manager.
Structure each event payload with the required fields: pixel_code, event, event_time (Unix timestamp), and a context object containing user data (email, phone, external_id — all SHA-256 hashed).
Set event_id to a stable, unique identifier for each event instance (e.g., order ID + event type); this value must match the event_id sent by the browser pixel for the same event so TikTok can deduplicate.
POST the event(s) to the Events API endpoint as a JSON array in the 'data' field; batching up to 1,000 events per request is supported.
Check the response for a 'code' of 0 (success); non-zero codes indicate validation errors on individual events, which are reported per-event in the 'errors' array.
Verify deduplication is working in Events Manager by comparing web event counts against server event counts over a 24-hour window; a near-1:1 ratio for the same event type signals correct dedup.
Known gotchas
TikTok custom events (non-standard events) are available for reporting and audience creation but cannot be used as campaign optimization goals; only standard events (Purchase, AddToCart, etc.) are eligible for optimization.
The event_id field is the sole deduplication key; if you omit it on either the pixel or the server side, TikTok will count both events, inflating conversion numbers.
User data fields must be individually SHA-256 hashed before sending; sending plaintext PII will cause the API to reject the event and may violate platform policy.
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