API Reference
Report events
/open_api/v1.3/event/track/https://tiktok-ads.mimicr.dev · provider: https://business-api.tiktok.comUse this endpoint to report web (event_source web, a Pixel code), offline or CRM events (offline/crm, an event set id), up to 1,000 per request. The token is a Marketing API token with scope 5 (Measurement) or the Pixel's own Events API token.
Unlike the Marketing API, failures return HTTP 4xx: 400 with 40002 naming the first invalid event (Invalid value for data.0.event_time.) or 40001 for a source the token cannot reach, and 401 for an empty token (40104) or over the rate limit (40100).
Emails, phones and external ids must be SHA-256 lowercase hex. Events with the same event_source_id, event and event_id are merged within 5 minutes and dropped within 48 hours. In Mimicr a web event whose ttclid came from a click on a sandbox ad is attributed to that ad and shows in its reports.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Headers
Authorized access token, sent in this header (not Authorization: Bearer). Marketing API tokens never expire.
Body
application/jsonThis field is used to specify the type of events you are uploading through Events API.
An Event Source ID that is used to measure events.
Returned data.
Show child attributes
For web, app, offline, and CRM events. Conversion event name.
For web, app, offline, and CRM events. The time when the event occurred, indicated as a Unix timestamp measured in seconds, and in UTC+0 time zone.
Event ID, used for deduplication with the Pixel: events with the same event_source_id, event and event_id are merged within 5 minutes and dropped within 48 hours. Required when the same event is also sent from the browser.
For web, app, offline, and CRM events. Information about the customer. To view the list of fields included in the user object, refer to the " user parameters " section below.
Show child attributes
TikTok Click ID, from the ttclid parameter of the landing page URL. When absent, Mimicr reads it from page.url.
Email of the customer, SHA-256 hashed (lowercase hex) after trimming and lowercasing; a string or an array.
Phone number of the customer in E.164 format, SHA-256 hashed (lowercase hex); a string or an array.
Your id of the customer, SHA-256 hashed (lowercase hex); a string or an array.
The _ttp cookie of the Pixel.
IP address of the browser, not hashed.
User agent of the browser, not hashed.
Locale of the browser (pt_BR).
For web, app, offline, and CRM events. Information about the product, order and additional information to help improve ad performance. To view the list of fields included in the properties object, refer to the " properties parameters " section below.
Show child attributes
Unique ID or array of multiple IDs of the products or content. Example: ["987", "654"]. We recommend using sku_id or item_group_id that matches the sku_id or item_group_id you set up in the catalog, if available. This field is required for Video Shopping Ads (VSA).
Relevant products in an event with product information. To view the list of fields included in the contents object, refer to the " contents parameters " section below.
Show child attributes
The price of the item.
Unique ID of the product or content. We recommend using sku_id or item_group_id if you have one. If you have set up sku_id or item_group_id in the catalog, the ID should match the sku_id or item_group_id.
Name of the page or product.
The type of content in the event. Enum values: product, product_group.
Recommended for revenue related events.
Recommended for revenue related events.
The quantity of items.
The user-entered string for search.
Description of the item or page.
Order ID.
Current page number. Default value: 1. Value range: ≥ 1.
Show child attributes
The browser URL where the event happened, for example, the value of location.href in the client side Javascript. It is recommended to use the full URL, including all URL parameters.
The referrer URL. For example, document.referrer in the client side Javascript, or the server side Referer http header.
Only for app and web events. Information about the ad. To view the list of fields included in the ad object, refer to the " ad parameters " section below.
Show child attributes
Ad callback string.
Campaign ID.
Ad ID.
Creative ID.
For web and app events. To learn more about the Limited Data Use feature, refer to Events API 2.0 - Limited Data Use.
Required for CRM events. Information about the lead. To view the list of fields included in the lead object, refer to the " lead parameters " section below.
Show child attributes
Required for CRM events. ID of TikTok leads. Every lead will have its lead_id when exported from TikTok.
Lead event source. You can set this field to the name of your CRM system, such as HubSpot or Salesforce.
Responses
200The events were accepted (code 0). Deduplicated events are accepted too.
Return code. 0 means success; see the return codes appendix for the others.
Return message: OK on success, otherwise the error description.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).
Returned data.
400Invalid payload (40002, naming the first invalid event), unknown or revoked token (40105) or no permission on the event source (40001). Error bodies have no data.
Return code. 0 means success; see the return codes appendix for the others.
Return message: OK on success, otherwise the error description.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).
401Empty access token (40104) or too many requests (40100).
Return code. 0 means success; see the return codes appendix for the others.
Return message: OK on success, otherwise the error description.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).