# Hermoso: send_tiktok_ads_events · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/send_tiktok_ads_events/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / send_tiktok_ads_events

# `send_tiktok_ads_events`

Send server-side conversion events to TikTok (Events API 2.0) destructive

Area: MEASUREMENT · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

SERVER-SIDE CONVERSION TRACKING — report a purchase, signup, form submission or lead to TikTok straight from a server, so TikTok can attribute it and optimise delivery toward it. This is what makes a pixel useful: a pixel with no events is inert, and a conversion campaign optimising toward an event nobody sends has nothing to learn from. ALWAYS OFFER testEventCode FIRST: an event carrying it lands in the Test Events tab of Events Manager and is EXCLUDED from reporting, attribution and optimisation, whereas an event sent WITHOUT it is a real, permanent conversion that TikTok will optimise against and that NO endpoint deletes. The code is copied out of Events Manager in a browser (open the pixel or event set > Test Events > the code button under "Test Server Events") and no API mints one, exactly like a Spark Ads authorization code. eventTime is a Unix timestamp in SECONDS — milliseconds are refused here for free, because TikTok accepts them and reads them as a date tens of thousands of years away, so the event is silently attributed to nothing. Emails, phones and external ids are trimmed, lower-cased, E.164-normalized and SHA-256 hashed by Hermoso exactly as TikTok specifies before anything leaves the process; a value that is already a 64-character hash is passed through untouched, so nothing is ever double-hashed. A phone with no "+" country code is refused rather than guessed. Free.

## Parameters

Parameter Type Description

`advertiserId` `string` TikTok ad account id from list_tiktok_ads_accounts; omit when only one account is shared with this profile

`eventSource` required `"web" | "app" | "offline" | "crm"` web = a website pixel · app = a mobile app (TikTok gates this behind an allowlist) · offline = a physical store · crm = lead events from a CRM

`eventSourceId` required `string` web: the pixel CODE from list_tiktok_ads_pixels (NOT the pixelId) · app: the TikTok App ID · offline: the Offline Event Set ID · crm: the CRM Event Set ID

`testEventCode` `string` from Events Manager > Test Events. WITH it nothing reaches reporting or optimisation; WITHOUT it these are real permanent conversions. Offer it before sending anything live.

`events` required `object[]` up to 1000 per request — above that TikTok rejects the WHOLE request, not the overflow

`events[].event` required `string` a TikTok standard event (CompletePayment, Purchase, AddToCart, CompleteRegistration, SubmitForm, ViewContent …) or your own custom name

`events[].eventTime` required `number` Unix timestamp in SECONDS, UTC

`events[].eventId` `string` REQUIRED if the same event is also sent by the browser pixel — TikTok deduplicates on event_source_id + event_id + event

`events[].user` `object` { email, phone, external_id, ttclid, ttp, ip, user_agent } — email/phone/external_id are hashed for you

`events[].properties` `object` { value, currency, contents:[{content_id, content_name, price, quantity}], order_id … }

`events[].page` `object` { url, referrer } — REQUIRED for web events

`events[].app` `object` REQUIRED for app events

`events[].ad` `object` optional TikTok ad-attribution object (for example a callback value), passed through as sent

`events[].lead` `object` REQUIRED for crm events

`events[].limitedDataUse` `boolean` true marks the event as limited data use, for a person who opted out of data processing

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/send_tiktok_ads_events`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"send_tiktok_ads_events","arguments":{"eventSource":"<one of the listed values>","eventSourceId":"<string>","events":"<array>"}}}`
**CLI**

`hermoso call send_tiktok_ads_events --json '{"eventSource":"<one of the listed values>","eventSourceId":"<string>","events":"<array>"}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
